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
Chart 'Target Value' Series
Hello, Jon.
Thank you.
You should use the Constant Lines Editor in your Chart.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?
Thank you.
- Attachments
-
- 1518.ChartConstantLines.png (63.04 KiB) Viewed 1428 times
Chart 'Target Value' Series
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.
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
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?
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
Hello,
Please send us a sample report with test data for analysis.
Thank you.
Please send us a sample report with test data for analysis.
Thank you.