Page 1 of 1

Chart 'Target Value' Series

Posted: Mon Dec 19, 2011 12:34 pm
by Ink
Hi,

I have a chart which plots daily data over a date range.
I need to add a line to the chart which displays the 'target value'.
The would be a flat line, with a constant value (like another series where each value is the same).
Then I can see which data points are above/below target.
Is tehre a way to do this with a line chart?

Regards,

jon.

Chart 'Target Value' Series

Posted: Tue Dec 20, 2011 3:05 am
by HighAley
Hello, Jon.
Ink wrote:I have a chart which plots daily data over a date range.
I need to add a line to the chart which displays the 'target value'.
The would be a flat line, with a constant value (like another series where each value is the same).
Then I can see which data points are above/below target.
Is tehre a way to do this with a line chart?
You should use the Constant Lines Editor in your Chart.

Thank you.

Chart 'Target Value' Series

Posted: Tue Dec 20, 2011 4:08 am
by Ink
Thanks Aleksey,

The constant value is actually stored in the XML that feeds the chart.
How can I set the constant line to a value in the data source?

JOn.

Chart 'Target Value' Series

Posted: Tue Dec 20, 2011 6:37 am
by Ink
Found the answer on the forum!

I have put this code in the bands before print event

Chart3.ConstantLines.Clear()

Dim myItem As New Stimulsoft.Report.Chart.StiConstantLines()
myItem.AxisValue = ConstantValueGrid.Constant1
myItem.LineColor = System.Drawing.Color.Black
myItem.Text = "GDA"
myItem.Font = New System.Drawing.Font("Arial", 7F)
Chart3.ConstantLines.AddRange(New Stimulsoft.Report.Chart.StiConstantLines() {myItem})

Works perfectly, Except if I change myItem.LineColor = System.Drawing.Color.Black to myItem.LineColor = System.Drawing.Color.Red the line is still displayed in balck not red. Is there something else I need to do?

Chart 'Target Value' Series

Posted: Tue Dec 20, 2011 8:11 am
by Alex K.
Hello,

Please send us a sample report with test data for analysis.

Thank you.