I mean something like
Code: Select all
int[] Indexes TeeChart.Series.CalcIndexForXValue(double XValue)
BTW I'm using line series if it's matter.
Code: Select all
int[] Indexes TeeChart.Series.CalcIndexForXValue(double XValue)
Narcís Calvet / 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 |
It is not exactly what I wanted because IndexOf returns only the first point index. If I have for examplenarcis wrote:Hi bairog,
You can use IndexOf as I explained here:
http://www.teechart.net/support/viewtop ... ht=indexof
Code: Select all
line1.Add(1, 1);
line1.Add(1, 0);
Code: Select all
line1.XValues.IndexOf(1)
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.Add(0, 2);
line1.Add(1, 3);
line1.Add(1, 4);
line1.Add(2, 5);
double[] results = Array.FindAll(line1.XValues.Value, IsOne);
}
private static bool IsOne(double d)
{
return d == 1;
}
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.Add(0, 2);
line1.Add(1, 3);
line1.Add(1, 4);
line1.Add(2, 5);
System.Collections.ArrayList results = new System.Collections.ArrayList();
for (int i = 0; i < line1.Count; i++)
{
if (line1.XValues[i] == 1.0)
{
results.Add(i);
}
}
}
Narcís Calvet / 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 |