Page 1 of 1

Order of Series in Legend Box

Posted: Fri May 04, 2018 7:25 am
by Martin Schmidt
Hello,

I have a question regarding the order of series in a legend box.

In our case we have multiple series in one chart, one can be a SampleDataSeries, the next can be a PointLineSeries. For our users it's of no interest. They are all named CH1 to CH64.
I want to see the series sorted by their names and numbers (what is generally done fine) and not by series type. But even if I set the property Categorization to None, they are sorted by series type. The only difference is the missing series type name as category headline.

Is there a way to achieve this? Maybe I'm missing something.

Thank you in advance
Martin

Re: Order of Series in Legend Box

Posted: Fri May 04, 2018 2:52 pm
by ArctionKestutis
Hello Martin,

The LegendBox 'sorting' comes from the reading/rendering order. Original list is created by adding all FreeformPointLineSeries, then PointLineSeries, SampleDataSeries, LineCollections etc. Besides that each series list (e.g. PointLineSeries) is taken in the same order they have been added (that is rendering order as well).
If none of categories suitable for you, probably easiest solution is to create dummy/empty series in order you like with corresponding Title and Line style, while original series set

Code: Select all

Series.ShowInLegendBox = false
Hope this helps.
All the best.

Re: Order of Series in Legend Box

Posted: Wed Jul 31, 2019 7:53 pm
by sri
hi, is there any way to sort series itself before rendering. In my case i want to display stock series first and bar series second. but i am unable to find and work around. And is there any select all checkbox functionality in legend?

Re: Order of Series in Legend Box

Posted: Thu Aug 01, 2019 7:51 am
by Arction_LasseP
Hello,

Unfortunately there currently isn't a way to change the order of the series in a LegendBox. The order is determined by the rendering order of the various series types in our source code, meaning that for instance BarSeries is always shown before StockSeries. So unless you have bought access to the source code, this cannot be changed.

A workaround could be to use several LegendBoxes and modify their position (via Offset -property) and visual style so that they seem to appear as one box. Alternatively, an empty dummy series can be created. Disable ShowInLegendBox for the main series and enable it for the dummy series. Use another series type for the dummy to change its position in the LegendBox.

As for the question of selecting all functionality, check the other thread where it is explained how this can be implemented.
https://forum.arction.com/viewtopic.php?f=16&t=2253

Best regards,
Lasse