This is a migrated thread and some comments may be shown as answers.

LegendItem color when using DefaultVisualStyle or PointTemplate

1 Answer 103 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Mitchell
Top achievements
Rank 1
Mitchell asked on 09 Jan 2014, 06:59 PM
I've got charts where a series can be a user defined color and where specific points can be a user defined color. The models for my series & all my points already have that info & so I'm binding to those colors via styles for LineSeries, PointSeries, etc.  Whenever I use a DefaultVisualStyle or a PointTemplate, the legend markers in my RadLegend lose their color.  Is there a way to get all three things: series color via DefaultVisualStyle, point color via Point template, LegendItem Colors? PS - I have the ability to set the palette for the chart as well if that matters.

1 Answer, 1 is accepted

Sort by
0
Mitchell
Top achievements
Rank 1
answered on 10 Jan 2014, 03:55 PM

My resolution:


I was already using a custom palette, but I was just filling it with colors from a user defined set of colors. All I had to do was continue to add entries into the GlobalEntries collection of the palette. That way I could insert whatever logic generated colors into the palette at whatever point I wanted.  So, instead of an original palette length of 8 and number of series = 13, I know have palette length of 13 as well & don't bother trying to rotate colors back through a palette collection of shorter length. Using a point template in this scenario still allows me to change the color of an individual point & the legend color appears correctly.



Thanks - Mitch

Tags
ChartView
Asked by
Mitchell
Top achievements
Rank 1
Answers by
Mitchell
Top achievements
Rank 1
Share this question
or