Hey
I'm generating charts based on the output from SQL, I have the SQL set to sort the output in a certain order, but when the Report Designer is displaying the chart, It's sorting the legend alphabetically. I must have my legend in the format:
Good
Fair
Poor
Which is exactly how my SQL is outputting the data. I've even added an addition ORDER BY statement in the SQL statement INSIDE the designer and it's not working.
Apparently you can you can fix this with the expression editor, so please provide me the syntax / code to do this, I must have the legends in this format.
To quote the documentation in your own system:
"Items are ordered in the legend according to the order that they are processed by the processing engine. You can change the order by changing the Graph.SeriesGroups SortingsExpression or Direction."
How is the chart processing the data in the wrong order, being I delivering to the system in the exact order it should be processing it.
Thanks
Andrew
6 Answers, 1 is accepted
Please check the attached video in IE browser. It illustrates how the order of legend items depends on the order of series in the Graph.Series collection, or if the series are generated dynamically - the order set in the Graph.SeriesGroups.
Regards,
Stef
Telerik by Progress

I fail to see the usefulness in that video, I want to control the legend order, not reverse it.
Here are the two scenario's that I can work with:
1) Load the chart from a properly formatted SQL statement so that the data gets returned, exactly as I want the chart formatted, but as already shown, Telerik ignores the output.
2) Load the chart from three separate SQL statements and control how the chart constructs the stacks so the display is correct.
Lets use that video you sent me, I want you to show how to move the Quality Assurance bar, the green bar to be first, the Manufacturing bar to be second and the Executive General bar to be third.
Also use a stacked chart, which is what I'm working with.
Thanks
Andrew

The Graph item is data-driven template. There is no direct access to the generated bars and legend items in code.
Instead you can add a field in the data that determines at which position you want to have the bar and then use it in the Graph.SeriesGroups.Sortings collection. The newly attached video illustrates the suggestion.
Regards,
Stef
Telerik by Progress

Thanks for that video, I think it actually addresses the question I have.
However, well that's a usable work around, you guys need to make the system accept either user driving rearrangement, or at least obey the SQL output from the system.
For instance if I tell the SQL output to order via a set of ORDER BY instructions, the process engine, MUST obey it. Well I can accept that's not a current feature as it seems to have been overlooked, please make it a feature in the next release.
Thanks
Andrew
The order of data in the data source will be respected if no other sorting is applied. Test deleting all Graph.SeriesGroups.Sortings entries.
Regards,
Stef
Telerik by Progress