Hola
Please explain how to highlight the one line among More than one series.
Is there an option like when I clicked a item in legend, the others become blurred at tee chart?
Thank you for tee-chart
How to highlight selected line when clicked item in legend box
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: How to highlight selected line when clicked item in legend box
Hello,
one option would be to highlight the series clicked in the legend by making the other series more transparent, e.g.
one option would be to highlight the series clicked in the legend by making the other series more transparent, e.g.
Code: Select all
private void InitializeChart()
{
for (int i = 0; i < 4; i++)
{
tChart1.Series.Add(typeof(Line)).FillSampleValues();
}
tChart1.ClickLegend += TChart1_ClickLegend;
}
private void TChart1_ClickLegend(object sender, MouseEventArgs e)
{
int index = tChart1.Legend.Clicked(e.X, e.Y);
if(index > -1)
{
for (int i = 0; i < tChart1.Series.Count; i++)
{
tChart1[i].Transparency = 0;
if (i != index)
{
tChart1[i].Transparency = 70;
}
}
}
}
You're very welcomeThank you for tee-chart
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 |