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

Inherit Series Color from DataSource

2 Answers 46 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 13 Apr 2015, 04:35 PM

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 Answers, 1 is accepted

Sort by
0
Phil
Top achievements
Rank 1
answered on 13 Apr 2015, 06:52 PM

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?

0
Stef
Telerik team
answered on 16 Apr 2015, 12:23 PM
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.

 
Tags
General Discussions
Asked by
Phil
Top achievements
Rank 1
Answers by
Phil
Top achievements
Rank 1
Stef
Telerik team
Share this question
or