Search found 7 matches

Go to advanced search

by JoMer
Tue Mar 09, 2021 10:24 pm
Forum: Highcharts Usage
Topic: Trigger sort of stacked bar chart
Replies: 11
Views: 1775
 
Jump to post

Re: Trigger sort of stacked bar chart

Follow up. If anyone else is trying to do this, see https://jsfiddle.net/jmerson/5g6p8ezr/71/ Turns out the data had to be sliced differently within each series, so that it would only return the correct columns from the 2-D array. I used this when the chart is initialized and in the update function....
by JoMer
Tue Mar 09, 2021 9:35 pm
Forum: Highcharts Usage
Topic: Trigger sort of stacked bar chart
Replies: 11
Views: 1775
 
Jump to post

Re: Trigger sort of stacked bar chart

HI again. I logged the bug, and I was pointed to an existing bug report and workaround: https://github.com/highcharts/highcharts/issues/15276 The workaround helped with triggering the sort on a bar chart, unfortunately, this solution messed up the stacked values. Here is my implementation of the wor...
by JoMer
Fri Mar 05, 2021 6:55 pm
Forum: Highcharts Usage
Topic: Trigger sort of stacked bar chart
Replies: 11
Views: 1775
 
Jump to post

Re: Trigger sort of stacked bar chart

That's disappointing. Bug reported.
by JoMer
Tue Mar 02, 2021 6:07 pm
Forum: Highcharts Usage
Topic: Trigger sort of stacked bar chart
Replies: 11
Views: 1775
 
Jump to post

Re: Trigger sort of stacked bar chart

Right. That is what I tried to do with the functions triggered by the buttons. The function sortChart (the first button) gets the current value and should switch it by assigning the new value to the series options. The title and sort direction change to show that the function generally works, just n...
by JoMer
Mon Mar 01, 2021 11:15 pm
Forum: Highcharts Usage
Topic: Trigger sort of stacked bar chart
Replies: 11
Views: 1775
 
Jump to post

Re: Trigger sort of stacked bar chart

I realize the fiddle had a CORS error (I didn't notice it previously as I use, a chrome extension to work around those). I have an updated fiddle here that uses an embedded CSV. I don't think this effects the sort.
https://jsfiddle.net/jmerson/Lj1nqkd0/1/
by JoMer
Mon Mar 01, 2021 11:00 pm
Forum: Highcharts Usage
Topic: Trigger sort of stacked bar chart
Replies: 11
Views: 1775
 
Jump to post

Re: Trigger sort of stacked bar chart

I want to sort the bars by either the value of the first category "focused" or alphabetically by the "name" of the categories. I can set either sort programmatically, by setting the parameter: dataSorting: { enabled: true, sortKey: sortVal, // "name" or "value"...
by JoMer
Wed Feb 24, 2021 1:19 am
Forum: Highcharts Usage
Topic: Trigger sort of stacked bar chart
Replies: 11
Views: 1775
 
Jump to post

Trigger sort of stacked bar chart

I am trying to add a button that will allow a user to sort a stacked bar chart that has been loaded via CSV. I have seen other solutions that involve writing sort functions and parsing the data. However, there is an existing sort value that I can set, so I think I should be able to change that value...

Go to advanced search