I am looking for the best way to represent my data.
What I want is a bar graph report that has 10 bars representing data. Data at these points is updated every second or so, but it is always 10 bars. Over time I want a line or a marker at the minimum value since data pulling started, a line or marker at the maximum value since data pulling. A marker or line at a maximum allowed value and line or marker at a target value.
I have investigated and have it working to some degree with Linear Gauge, but this series does not seem as polished and easy to work with as others and just having 10 in the designer slows down and feels heavy. In the Gauge the maximum is automatic, but the rest has to be done with the redline and greenline and I do not have an option to add two more marks/lines for target and max allowed.
I also am trying stacked bar chart, but this involves a lot of stacked bars and calculations to represent my data.
Are these the best two options? Any suggestions? Thanks.
A bar chart where I can simply add a line or mark at specific value would be ideal.
Looking for best series option
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Looking for best series option
Apologies for the delay in our reply to your question.
You're best bet would be to use the Canvas Events - the following is a screenshot from the Feature Demo on GitHub:
You can use these canvas events to draw anything to the chart - lines, shapes (circles, rectangles) - basically anything TeeChart can draw. To draw something at a specific series value, you can use something like this:
Which here gives me:
You're best bet would be to use the Canvas Events - the following is a screenshot from the Feature Demo on GitHub:
You can use these canvas events to draw anything to the chart - lines, shapes (circles, rectangles) - basically anything TeeChart can draw. To draw something at a specific series value, you can use something like this:
Code: Select all
private void InitializeChart()
{
var bar = new Bar(_tChart.Chart);
bar.FillSampleValues();
_tChart.AfterDraw += _tChart_AfterDraw;
void _tChart_AfterDraw(object sender, Graphics3D g)
{
//draw from max to min
var maxIndex = bar.YValues.IndexOf(bar.YValues.Maximum);
var minIndex = bar.YValues.IndexOf(bar.YValues.Minimum);
var minPoint = new Point(bar.CalcXPosValue(bar.XValues[minIndex]), bar.CalcYPosValue(bar.YValues[minIndex]));
var maxPoint = new Point(bar.CalcXPosValue(bar.XValues[maxIndex]), bar.CalcYPosValue(bar.YValues[maxIndex]));
g.Pen.Color = Color.Red;
g.Line(minPoint, maxPoint);
}
}
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |