Hi All,
Can someone point me to an example or the documentation for adding a marker to a chart. I am trying to implement adding 1, 2, or 3 markers and the functions move marker to min, max, and taking the delta between markers.
Thanks,
Terry
Markers on Chart
Hi Terry,
If I understand you correctly, what you need is adding a custom text at some location inside the chart... This can be done through the Annotation tool and you can see some examples in the features demo of TeeChart (see All features / Tools / Annotation).
If you need further help, please do not hesitate to contact us again.
If I understand you correctly, what you need is adding a custom text at some location inside the chart... This can be done through the Annotation tool and you can see some examples in the features demo of TeeChart (see All features / Tools / Annotation).
If you need further help, please do not hesitate to contact us again.
Markers on Chart
Sorry, I guess I was not clear. A "marker" must be an overloaded term.
In my case I would like to put a graphical object (a marker) on a data point on a trace and have it display the data at that point. As the trace moves the "marker" moves and reads out the new data point. I would like to be able to move the marker to a different data point (and have it read that data point out) and give the user a button to press that will move the marker to the minimum or maximum value on the trace.
There are typically 1 or 2 markers on a trace at a time. When there are two markers I need to be able to display the different between the values of the trace where the markers are.
This type of functionality is prevelant on electronic instruments that are measureing electronic signals.
Thanks,
Terry
In my case I would like to put a graphical object (a marker) on a data point on a trace and have it display the data at that point. As the trace moves the "marker" moves and reads out the new data point. I would like to be able to move the marker to a different data point (and have it read that data point out) and give the user a button to press that will move the marker to the minimum or maximum value on the trace.
There are typically 1 or 2 markers on a trace at a time. When there are two markers I need to be able to display the different between the values of the trace where the markers are.
This type of functionality is prevelant on electronic instruments that are measureing electronic signals.
Thanks,
Terry
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi Terry,
I think we could be talking about the same thing here. Does the following code so something similar to what you're looking for?
I think we could be talking about the same thing here. Does the following code so something similar to what you're looking for?
Code: Select all
private Steema.TeeChart.Styles.FastLine fastLine1;
private Steema.TeeChart.Tools.Annotation mark1;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Legend.Visible = false;
fastLine1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
mark1 = new Steema.TeeChart.Tools.Annotation(tChart1.Chart);
timer1.Enabled = true;
timer1.Interval = 500;
mark1.Shape.CustomPosition = true;
}
private int count = new int();
private Random rnd = new Random();
private void timer1_Tick(object sender, System.EventArgs e)
{
count++;
fastLine1.Add(count, rnd.Next(100));
double maxX = fastLine1.XValues.Maximum;
tChart1.Axes.Bottom.SetMinMax(maxX - 10, maxX);
mark1.Text = fastLine1.YValues.Last.ToString();
mark1.Left = fastLine1.CalcXPos(fastLine1.Count - 1) - 75;
mark1.Top = fastLine1.CalcYPos(fastLine1.Count - 1);
}
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/