Is it possible to sort the order of x-axis labels in a bar chart on an item other than the one used as label for the x-axis?

0
It is now in alphabetical order, which does not presenting the distinct option values anymore in the same order as they were presented to the user in the Questionnaire.
asked
1 answers
0

Yvonne,

Highcharts (one of the options in SimpleChart widget) plots the series in the order that the series are passed to the chart object. So, to accomplish this, you would need to perform some customization of the SimpleCharts widget to sort the data series passed into the chart as you wish to have them sorted while using the label you want to use. You would need a 'sort order' attribute on the option values, to be used for sorting, and then once they are sorted, you can pass the series into the bar chart itself. I assume FLOT works the same way, so the data need to be sorted before they are passed into the chart for FLOT too.

Mike

answered