Pie Chart Respecting Group

Stimulsoft Reports.PHP discussion
Post Reply
brightsg
Posts: 5
Joined: Wed Aug 28, 2024 12:33 pm

Pie Chart Respecting Group

Post by brightsg »

I want to place a pie chart that respects the grouping on a report

For example, I have 3 Columns

ServiceName
ValueCharged
ValueUncharged

I want to group by ServiceName, then have 2 segments in the Pie Chart, one for UnchargedValue and one for ChargedValue, so if I have 7 services I would want to see the pie chart repeated 7 times (once for each group value), with the charge/uncharged values changing in each in respect of the service. Is this possible - I have tried various combinations of setting the datasource in the databand and/or the chart itself. I havealso tried placing the chart in the group header as well as a databand but I only ever get one chart (in the databand), or I get a chart for each service value but the segments are always the same.

Regards,
Lech Kulikowski
Posts: 7284
Joined: Tue Mar 20, 2018 5:34 am

Re: Pie Chart Respecting Group

Post by Lech Kulikowski »

Hello,

in this case, you need to use master-detail instead of groping:
https://demo.stimulsoft.com/#Net/Produc ... Categories

Thank you.
brightsg
Posts: 5
Joined: Wed Aug 28, 2024 12:33 pm

Re: Pie Chart Respecting Group

Post by brightsg »

Is there a setp by step guide to this? I can't understand how this report is built. I also only have 1 data source which has all data. How is the report in this example linked to the chart?

Thanks
Lech Kulikowski
Posts: 7284
Joined: Tue Mar 20, 2018 5:34 am

Re: Pie Chart Respecting Group

Post by Lech Kulikowski »

Hello,

In this case, you can make the following:
- add DataTransformation source with grouping by ServiceName
- add relation between new source and original source by via column ServiceName
- use new source as master band instead of grouping

Thank you.
Post Reply