Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
UltraChart legend icons
posted

I have a form with an UltraChart that often has more than one line graphs on it concurrently.  There is also an UltraDockManager on the form, with a panel that allows the user to select which series they want to show on the graph.  When I hide one series and show it again, the icons seem to be chosen at random and re-selected every time the list of series displayed on the chart changes.  I would like the legend icon and line color of a series to be the same each time a series is shown.

The chart's FillSceneGraph() event fires every time I check or uncheck one of the series on the graph.  So I was thinking of saving the legend icons and line colors in lists or dictionaries the first time that FillSceneGraph() fires on an instance of the chart.  Is this the best strategy?  Or is there a simpler way to do this?