coloring pie slices from datatable

Stimulsoft Reports.NET discussion
Post Reply
kathleen.grevendonck
Posts: 4
Joined: Thu Feb 05, 2026 3:12 pm

coloring pie slices from datatable

Post by kathleen.grevendonck »

Hi,
I am using a pie chart and I am trying to give the pie slices a color from the datasource I am using. I filled the following fields of the series:
Value data column: the percentage value
Auto series Key data column : the key of the data
Auto series Color data column : the hex color of the data

I also set allow apply style of the chart to false and the allow apply style of the series to false

But I can't get it working. What am I doing wrong?
Lech Kulikowski
Posts: 7691
Joined: Tue Mar 20, 2018 5:34 am

Re: coloring pie slices from datatable

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.
kathleen.grevendonck
Posts: 4
Joined: Thu Feb 05, 2026 3:12 pm

Re: coloring pie slices from datatable

Post by kathleen.grevendonck »

In design time I create the .mrt with .xsd files (describing a dataset) as datasource. In runtime I create the report in .Net by using the following methods:
Load
Dictionary.Clear
RegData to provide the datasets
Dictionary.Synchronize
Render
ExportDocument to save the report as pdf.
When I save my dataset to csv during debug and attach it directly as a datasource in the .mrt and preview I get the expected result. What am I missing?
Lech Kulikowski
Posts: 7691
Joined: Tue Mar 20, 2018 5:34 am

Re: coloring pie slices from datatable

Post by Lech Kulikowski »

Hello,

Without a sample, it is difficult to say why it happens.

Thank you.
kathleen.grevendonck
Posts: 4
Joined: Thu Feb 05, 2026 3:12 pm

Re: coloring pie slices from datatable

Post by kathleen.grevendonck »

I have found why this is happening. On my report I have different subreports which I set in footerbands. If my pie chart is in a subreport and the previous subreport extends so that the subreport with the pie in it overflows to a next page, I have the behavior that the colors are not taken into account. If I put a "New Page After" true in the previous footerband/subreport, so that the pie chart is anyway on a new page I don't have the behavior. This solution works for me.
Lech Kulikowski
Posts: 7691
Joined: Tue Mar 20, 2018 5:34 am

Re: coloring pie slices from datatable

Post by Lech Kulikowski »

Hello,

Thank you for the information.
Post Reply