Order Stacked Bar Chart

  
Hi everyone,

I am trying to order a this Bar Chart





The order would be linked to the total of the bar value 47,37,28,23,12,11,10,10,5,4,4...

But as you can see the next value is 13, and it shouldn't. Do you know of any way to achieve this? Any Highchart trick? 

The dataset is built in an Advanced Query and the output is sequenced as it is supposed to.
The sequences in the dataset and in the chart don't match.

Thank you in advance,
Filipe Cardoso
 
Hi,

highcharts doesn;t do it by default.
and there are no options to do so, you have to extend it.
however, why not sort it yourself in the aggregrate/advanced query?


J. wrote:
Hi,

highcharts doesn;t do it by default.
and there are no options to do so, you have to extend it.
however, why not sort it yourself in the aggregrate/advanced query?

 
 Thank you for the reply.
?It is sorted in the advanced query, at least when I test it, the output is sorted as I want.
But the chart doesn't match the sort I see in the output of the query.
 
well,

can you share the output then?
bit hard to see the code in an image :)

J. wrote:
well,

can you share the output then?
bit hard to see the code in an image :)
 
  

 The last column is the sum of the total per Instance in the label. I just put it in the color column so that you can see it is ordered.

SELECT {Source}.[Description],
  Count (distinct{Action}.[IdAction]),
  {Status}.[Description] ,
  concat({Status}.[Description], ': ', Count (distinct{Action}.[IdAction])),
  Count(distinct Action2.[IdAction])
FROM {Action}
    Inner JOIN {Status} ON {Action}.[Status] = {Status}.[IdStatus]
    Inner JOIN {Source} ON {Action}.[Source] = {Source}.[IdSource]
    Inner JOIN {Action} as Action2 ON Action2.[Source] = {Source}.[IdSource]
    where {Status}.[Is_Active] = 1
    GROUP BY {Action}.[Status], {Status}.[Description], {Action}.[Source], {Source}.[Description],
{Status}.[Order]
ORDER BY Count(distinct Action2.[IdAction]) DESC,
{Status}.[Order] asc
Solution
And I figured it out what the prioblem might be,

here's a fiddle to sort it correctly.
hope it will help ya:

http://jsfiddle.net/eecvsj7s/
Solution