Inherit Series Color from DataSource

3 posts, 0 answers
  1. Phil
    Phil avatar
    44 posts
    Member since:
    Mar 2015

    Posted 13 Apr 2015 Link to this post

    I am making chart that will read from a data source holding the name, count, and color for a certain score (ex: series1, 2, #00ff00;  series2, 4, #ffff00; series3, 5, #ff0000).

     I am creating a 100% stacked bar chart in which I want the counts of each color as the values and the colors as series. 

     My issue come with my color palette.  I want each series to show up as the color value which is held in the dataset.  I can't create a custom palette because the colors will not always be the same.  I will have a hex color in the dataset which needs to be the color of each corresponding segment of the 100% stacked bar graph.

     Has anyone ever done this?

  2. Phil
    Phil avatar
    44 posts
    Member since:
    Mar 2015

    Posted 13 Apr 2015 in reply to Phil Link to this post

    I think this is what I am looking for:

     "In case you need to bind the series colors to actual color codes stored in your database - this is currently not possible, but you can rest assured we will consider it for future implementation."

    Does anyone know if this is possible yet?

  3. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 16 Apr 2015 Link to this post

    Hi Phil,

    Binding the series color to a value from a field is not supported. Please feel free to use the public feedback portal to log a feature request.


    Meanwhile, you can test an approach where data is read and analyzed at run-time, and then the Graph item is modified. Thus you will be able to specify the color via conditional formatting (DataPointConditionalFormatting, LegendItem.MarkConditionalFormatting)..

    For example check the attached demo project. The report is designed with the VS Report Designer, and modified at run-time prior to displaying it. The demo project requires Telerik Reporting Q1 2015 SP1 v9.0.15.324 or to be updated with the Upgrade Wizard.


    I hope the provided information is helpful.

    Regards,
    Stef
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top