set diameter programmatically

Stimulsoft Reports.NET discussion
Max Shamanov
Posts: 285
Joined: Tue Sep 07, 2021 10:11 am

Re: set diameter programmatically

Post by Max Shamanov »

Hello,

Please check the attached report.

Thank you.
Attachments
DoughnutChart.mrt
(53.55 KiB) Downloaded 8 times
User avatar
dmasterplan
Posts: 76
Joined: Thu Mar 17, 2022 4:04 am
Location: Philippines

Re: set diameter programmatically

Post by dmasterplan »

Hi,

Attached are the database and sample report.

I want the pie chart to programmatically set the diameter depending on the number of legends.

By the way, how to properly set the Value Data Column and Argument Data Column?

Value Data Column = int data type
Argument Data Column = varchar data type

Is it correct?

Legend doesn't turn to texts, only numbers

Please see attached files.

Great Thanks
Attachments
themasterplan.7z
(195.65 KiB) Downloaded 10 times
PMM-0001 (for testing laang).mrt
(25.53 KiB) Downloaded 7 times
Lech Kulikowski
Posts: 4586
Joined: Tue Mar 20, 2018 5:34 am

Re: set diameter programmatically

Post by Lech Kulikowski »

Hello,

You can set the necessary option in the designer then open the Code tab and check how it should be set. Then you can use the similar code where you need it.

Thank you.
Attachments
Screenshot 2022-05-21 110554.png
Screenshot 2022-05-21 110554.png (150.93 KiB) Viewed 65 times
Screenshot 2022-05-21 110643.png
Screenshot 2022-05-21 110643.png (233.93 KiB) Viewed 65 times
Screenshot 2022-05-21 121041.png
Screenshot 2022-05-21 121041.png (176.37 KiB) Viewed 65 times
User avatar
dmasterplan
Posts: 76
Joined: Thu Mar 17, 2022 4:04 am
Location: Philippines

Re: set diameter programmatically

Post by dmasterplan »

thanks a lot.
much appreciated!
Lech Kulikowski
Posts: 4586
Joined: Tue Mar 20, 2018 5:34 am

Re: set diameter programmatically

Post by Lech Kulikowski »

Hello,

You are welcome.
User avatar
dmasterplan
Posts: 76
Joined: Thu Mar 17, 2022 4:04 am
Location: Philippines

Re: set diameter programmatically

Post by dmasterplan »

Hi,

Apologies for not replying fast to this. I experimented with the code and realized that I wasn't using a Doughnut chart. I was using a Pie chart.
so I instead, I used this code

Code: Select all

(this.CPStage.Series[0] as Stimulsoft.Report.Chart.StiPieSeries).Diameter = 120F;
and it worked smoothly!

Great Thanks
Max Shamanov
Posts: 285
Joined: Tue Sep 07, 2021 10:11 am

Re: set diameter programmatically

Post by Max Shamanov »

Hello,

You are welcome!
Post Reply