set diameter programmatically
- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
set diameter programmatically
how can I set the pie chart's diameter programmatically?
I don't know how to find it in code.
Please help!
I don't know how to find it in code.
Please help!
-
- Posts: 790
- Joined: Tue Sep 07, 2021 10:11 am
Re: set diameter programmatically
Hello,
You can use the following code:
Thank you.
You can use the following code:
Code: Select all
((sender as Stimulsoft.Report.Chart.StiChart).Series[0] as Stimulsoft.Report.Chart.StiDoughnutSeries).Diameter = 200F;
- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
Re: set diameter programmatically
Hi,
Thanks for answering BUT
I can't make it work.
How about if I have a pie chart named ProcurementAwards, how can I set it's diameter programmatically?
and how can I find it in code?
Great Thanks!
Thanks for answering BUT
I can't make it work.
How about if I have a pie chart named ProcurementAwards, how can I set it's diameter programmatically?
and how can I find it in code?
Great Thanks!
-
- Posts: 790
- Joined: Tue Sep 07, 2021 10:11 am
Re: set diameter programmatically
Hello,
Do you want set diameter in events or runtime?
Thank you.
Do you want set diameter in events or runtime?
Thank you.
- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
Re: set diameter programmatically
What's the difference?
I want to set the diameter in events? BeforePrintEvent to be specific. Changing the diameter depending on the number of legends.
I want to set the diameter in events? BeforePrintEvent to be specific. Changing the diameter depending on the number of legends.
-
- Posts: 6263
- Joined: Tue Mar 20, 2018 5:34 am
Re: set diameter programmatically
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.
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.
- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
Re: set diameter programmatically
Hi,
When you set Design > Area > Border Color, you do:
this.Chart1_Area.BorderColor = System.Drawing.Color.Transparent;
How to do if Design > Series > Diameter?
You can't do Chart1_Series.Diameter right?
Please help, I don't have any idea how to do it.
When you set Design > Area > Border Color, you do:
this.Chart1_Area.BorderColor = System.Drawing.Color.Transparent;
How to do if Design > Series > Diameter?
You can't do Chart1_Series.Diameter right?
Please help, I don't have any idea how to do it.
-
- Posts: 790
- Joined: Tue Sep 07, 2021 10:11 am
Re: set diameter programmatically
Hello,
You can use the following code:
Thank you.
You can use the following code:
Code: Select all
(this.Chart1.Series[0] as Stimulsoft.Report.Chart.StiDoughnutSeries).Diameter = 200F;
- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
Re: set diameter programmatically
Hi,
I have Chart2 and applied the code:
but it didn't work. Can you please help?
Great Thanks!
I have Chart2 and applied the code:
Code: Select all
(this.Chart2.Series[0] as Stimulsoft.Report.Chart.StiDoughnutSeries).Diameter = 120F;
Great Thanks!
-
- Posts: 6263
- Joined: Tue Mar 20, 2018 5:34 am
Re: set diameter programmatically
Hello,
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.