LegendItem color when using DefaultVisualStyle or PointTemplate

2 posts, 0 answers
  1. Mitchell
    Mitchell avatar
    45 posts
    Member since:
    Mar 2013

    Posted 09 Jan 2014 Link to this post

    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.
  2. Mitchell
    Mitchell avatar
    45 posts
    Member since:
    Mar 2013

    Posted 10 Jan 2014 Link to this post

    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

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top