TeeChart Pro ActiveX Q & Tutorial: How to highlight the selected row in the legend box, click the project?

    TeeChart Pro ActiveX charting component library offers hundreds of 2D and 3D graphic style, 54 kinds of arithmetic and statistical functions as well as an unlimited number of axes and 14 toolbox for your choice. The chart control can also be effectively used to create a multi-tasking dashboard. 


Q: Please help answer how to highlight a number of series in a row, if there is an option, such as when I click on the legend of a project, other projects in the kick-off the chart will become blurred?

chart.png

A: One option is to highlight the other series by clicking more transparent display in the legend series, for example:

		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;
					}
				}
			}
		}

    I hope the above questions and answers can help you, if you have any doubts or suggestions can leave a message in the comments area.

Guess you like

Origin blog.51cto.com/14477114/2433043