display pointer at front
display pointer at front
I need to display the currently selected pointer on a chart at the front. Currently, if I select and highlight a pointer, it is displayed in the position plotted, making it obscured by overlying pointers.
Re: display pointer at front
Hello lilo,
I think you can use method Exchange() of series, for change their order and show first, series you have selected. You can do something as next example:
Please, check if previous code works as you want. If you have some problems about this code please let me know.
I hope will helps.
Thanks,
I think you can use method Exchange() of series, for change their order and show first, series you have selected. You can do something as next example:
Code: Select all
tChart1.Aspect.View3D = false;
tChart1.Dock = DockStyle.Fill;
for (int i = 0; i < 5; i++)
{
Steema.TeeChart.Styles.Points series1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
series1.FillSampleValues(10);
series1.Pointer.HorizSize = 7;
series1.Pointer.VertSize = 7;
}
tChart1.ClickSeries += new Steema.TeeChart.TChart.SeriesEventHandler(tChart1_ClickSeries);
}
void tChart1_ClickSeries(object sender, Steema.TeeChart.Styles.Series s, int valueIndex, MouseEventArgs e)
{
int firts = 0;
if (s.Clicked(e.X, e.Y) != -1)
{
tChart1.Series.Exchange(firts,tChart1.Series.IndexOf(s));
firts= tChart1.Series.IndexOf(s);
}
}
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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 |