Setting colors of a pie chart out of values from sql

Stimulsoft Reports.NET discussion
apre
Posts: 1
Joined: Thu Oct 08, 2009 7:49 am

Setting colors of a pie chart out of values from sql

Post by apre »

Hello,

sample table:

name, value, color
------------------------
first, 5, 8844593
first, 10, 8844593
second, 11, 1052896
second, 5, 1052896
third, 20, 16777215

if the color is converted to hex, you'll get a html color code.
the rows must be grouped to get the sums for the chart.

and now my question: is it possible to set color of the parts of the pie chart with the value stored in my table?

if not, it would be a great feature to have :grinder:

best regards
apre
drysz
Posts: 3
Joined: Thu Oct 08, 2009 11:51 am
Location: USA

Setting colors of a pie chart out of values from sql

Post by drysz »

I have the same question. We have colors assigned to data system wide and need the charts to print out in the same color we define in our table. Is there a way to map the colors to a chart?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Setting colors of a pie chart out of values from sql

Post by Edward »

Hi guys,

Sorry, that option is available only for 'AutoSeries', when series are automatically generated according to 'AutoSeriesKeyDataColumn'.

To colour each element of chart separately is not available for now.

Thank you.
SWhitty
Posts: 13
Joined: Wed Jul 25, 2012 4:00 pm

Re: Setting colors of a pie chart out of values from sql

Post by SWhitty »

Hi Guys,

i know this thread has been dead for quite some time, but i am wondering if this functionality has been added in over the past 5 years? :D

Simon
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Setting colors of a pie chart out of values from sql

Post by HighAley »

Hello.

There is a Auto Series Color Data Column property that could be set with Auto Series Key Data Column.

Thank you.
SWhitty
Posts: 13
Joined: Wed Jul 25, 2012 4:00 pm

Re: Setting colors of a pie chart out of values from sql

Post by SWhitty »

Thanks for the Reply Aleksey,
I have tried that, my data structure is as follows:-
entityID - Argument - Value - DisplayColour (rgb values)

Is the issue that the colour needs to be a specific type? e.g. hex value?
Also, are there any other settings i need to change, such as turning off apply style?

Simon
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Setting colors of a pie chart out of values from sql

Post by HighAley »

Hello.

You could use either hex value or string in the Auto Series Color Data Column property.
Let us know if you need any help with this.

Thank you.
sandynith
Posts: 64
Joined: Thu Dec 12, 2013 4:03 am

Re: Setting colors of a pie chart out of values from sql

Post by sandynith »

Hi, I have a similar issue. I am using 2014.1.1900 (WPF)

In a Pie chart I am trying to assign colors to the pie chart. Say my sample data is:

Name,MyColors,Value
A,Black,18
B,Blue,20
C,Orange,15
D,Yellow,40
E,Pink,25

Now in Pie chart properties I set following:
ValueDataColumn = Value
ArgumentDataColumn = Name (I also tried leaving it blank)
AutoSeriesKeyDataColumn = Name
AutoSeriesColorDataColumn = Color

But it doesn't assign specified colors to the Pie chart (StiPieSeries). Please note it works fine for StiLineSeries or StiClusteredColumnSeries.

Any help would be appreciated.
Thanks,
Sandeep
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Setting colors of a pie chart out of values from sql

Post by Alex K. »

Hello,

Please try to set the AllowApplyStyle property to false for the Series.

Thank you.
sandynith
Posts: 64
Joined: Thu Dec 12, 2013 4:03 am

Re: Setting colors of a pie chart out of values from sql

Post by sandynith »

Thanks Aleksey for your reply, unfortunately I still couldn't get that going by saying AllowApplyStyle=false (on chart properties, I couldn't find this property on Pie series)

Can you show me how to do it? Attached my report template and sample data.
All I want is assign different colors to the Pie chart manually specified in MyColors column.
Stimulsoft version: 2014.1.1900 (WPF)

Thanks,
Sandeep
Attachments
report_demo_PieChartData.csv
Sample data
(79 Bytes) Downloaded 331 times
Report_demo_PieChartColors.mrt
Report template (Pie chart)
(7.31 KiB) Downloaded 388 times
Post Reply