Chart 'Target Value' Series

Stimulsoft Reports.NET discussion
Post Reply
Ink
Posts: 50
Joined: Sat Jul 02, 2011 2:26 am
Location: UK

Chart 'Target Value' Series

Post 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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Chart 'Target Value' Series

Post 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.
Attachments
1518.ChartConstantLines.png
1518.ChartConstantLines.png (63.04 KiB) Viewed 1434 times
Ink
Posts: 50
Joined: Sat Jul 02, 2011 2:26 am
Location: UK

Chart 'Target Value' Series

Post 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.
Ink
Posts: 50
Joined: Sat Jul 02, 2011 2:26 am
Location: UK

Chart 'Target Value' Series

Post 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?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Chart 'Target Value' Series

Post by Alex K. »

Hello,

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

Thank you.
Post Reply