Page 1 of 1

Chart Constant Lines

Posted: Thu Mar 10, 2011 3:59 pm
by scott
Is there a way to set a Constant Line value for a Chart at runtime?

Thanks!

Chart Constant Lines

Posted: Fri Mar 11, 2011 7:19 am
by Alex K.
Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.

Chart Constant Lines

Posted: Fri Mar 11, 2011 9:50 am
by scott
For a Chart component in the Stimulsoft designer -> Properties -> 3. Chart Additional -> Constant Lines you can add values for lines in the chart to show constant values. Is there a way to add constant lines values at the time of report generation? Or from C# code?

Chart Constant Lines

Posted: Mon Mar 14, 2011 2:18 am
by Alex K.
Hello,

You can use the following code:

Code: Select all

StiReport report = new StiReport();
report.Load();
StiChart chart1 = report.GetComponents()["Chart1"] as StiChart;
StiConstantLines lines1 = new Stimulsoft.Report.Chart.StiConstantLines();
lines1.AxisValue = "0.3";
lines1.LineColor = System.Drawing.Color.Black;
lines1.Text = "Constant Line 1";
lines1.Font = new System.Drawing.Font("Arial", 7F);
lines1.Chart = chart1;
chart1.ConstantLines.Add(lines1);
report.Show();
Thank you.

Chart Constant Lines

Posted: Mon Mar 21, 2011 1:20 pm
by scott
Awesome! Thanks, Aleksey.

Chart Constant Lines

Posted: Mon Mar 21, 2011 1:24 pm
by Andrew
We are always glad to help you.

Thank you.