programmatically set labels
- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
programmatically set labels
How can I programmatically set Labels?
this.ChartName.?
I want my Label to be set to "Value"
this.ChartName.?
I want my Label to be set to "Value"
- Attachments
-
- labels - value.png (166.97 KiB) Viewed 1261 times
- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
Re: programmatically set labels
Hi Guys,
Did I break a rule or commit mistakes or anything? I am not getting an answer to my queries.
I want to apologize if I did. I'm really sorry. Please tell me what my violations are and I will not do it again.
Sincerely,
dmasterplan
Did I break a rule or commit mistakes or anything? I am not getting an answer to my queries.
I want to apologize if I did. I'm really sorry. Please tell me what my violations are and I will not do it again.
Sincerely,
dmasterplan
Re: programmatically set labels
A little patience would be advisable
This forum is not your personal coach...

- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
-
- Posts: 7338
- Joined: Tue Mar 20, 2018 5:34 am
Re: programmatically set labels
Hello,
The best way - it is set the necessary option in the designer, then open the Code Tab, check the code, and use the similar code in the necessary place.
Thank you.
The best way - it is set the necessary option in the designer, then open the Code Tab, check the code, and use the similar code in the necessary place.
Thank you.
- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
Re: programmatically set labels
This is the way in setting the step in "Area", "X Axis" then in the properties "Labels" then "Step"
this.Chart3_Area.YAxis.Labels.Step = N
I just can't figure out the code for Labels (Chart Editor > Labels > Value)
this.Chart3_Area.YAxis.Labels.Step = N
I just can't figure out the code for Labels (Chart Editor > Labels > Value)
-
- Posts: 7338
- Joined: Tue Mar 20, 2018 5:34 am
Re: programmatically set labels
Hello,
The next code:
this.Chart1.SeriesLabels = new Stimulsoft.Report.Chart.StiValueAxisLabels();
Thank you.
The next code:
this.Chart1.SeriesLabels = new Stimulsoft.Report.Chart.StiValueAxisLabels();
Thank you.
- Attachments
-
- Screenshot 2022-05-03 154744.png (76.59 KiB) Viewed 1205 times
- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
Re: programmatically set labels
Hi,
Thanks for replying. I tried it inside the BeforePrint event of the chart, however, I am getting an error
Cannot implicitly convert type 'Stimulsoft.Report.Chart.StiValueAxisLabels' to
'Stimulsoft.Report.Chart.StiInsideBaseAxisLabels()'
this is my code:
I am changing the Label to "Value" when Packages = 200
otherwise change it to "InsideBase"
Great Thanks
Thanks for replying. I tried it inside the BeforePrint event of the chart, however, I am getting an error
Cannot implicitly convert type 'Stimulsoft.Report.Chart.StiValueAxisLabels' to
'Stimulsoft.Report.Chart.StiInsideBaseAxisLabels()'
this is my code:
Code: Select all
if(vTotalPackages == 200) {
this.Chart3_SeriesLabels = new Stimulsoft.Report.Chart.StiValueAxisLabels();
} else {
this.Chart3_SeriesLabels = new Stimulsoft.Report.Chart.StiInsideBaseAxisLabels();
}
otherwise change it to "InsideBase"
Great Thanks
-
- Posts: 7338
- Joined: Tue Mar 20, 2018 5:34 am
Re: programmatically set labels
Hello,
You should use "this.Chart.SeriesLabels" not "this.Chart_SeriesLabels"
Thank you.
You should use "this.Chart.SeriesLabels" not "this.Chart_SeriesLabels"
Thank you.
- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
Re: programmatically set labels
Hurray! It perfectly works!
Great thanks!
My code:
Great thanks!
My code:
Code: Select all
if(vTotalPackages >= 200) {
this.Chart3.SeriesLabels = new Stimulsoft.Report.Chart.StiValueAxisLabels();
} else {
this.Chart3.SeriesLabels = new Stimulsoft.Report.Chart.StiInsideBaseAxisLabels();
}