Legend item color not matching with bar color

2 posts, 0 answers
  1. Oliver
    Oliver avatar
    33 posts
    Member since:
    Jan 2011

    Posted 07 Nov 2012 Link to this post

    I've set UseAutoGeneratedItems = false and add in the legenditems manually by setting the color of each item randomly.
    How do I get the legenditem color to match the bar color

  2. Petar Marchev
    Petar Marchev avatar
    968 posts

    Posted 08 Nov 2012 Link to this post

    Hello Oliver,

    I have attached a very simple project for your reference. The project does not have the UseAutoGeneratedItems property set to false. I have just attached it to show you that an output similar to yours is possible without manually adding legend items.

    Can you explain what is your scenario? Why do you need to add the legend items manually? Is it possible that you use the approach in the attached project?

    If you demand to add items in the legend manually - you might need to define chart palette brushes. The chart will use these brushes for the bars and you can use these brushes for the legend items.   

    All the best,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
Back to Top