Page 1 of 1

Showing in chartlistbox only series with values

Posted: Mon Dec 19, 2005 1:03 pm
by 9638326
Hello,
using a "Chartlistbox" in my application.
-> Steema.TeeChart.ChartListBox

After loading .ten file I have series without values in my chart.
I need these for template purpose ....

The Chartlistbox should only display series with values inside !

Anyone has idea how to manage it ?

Regards
Torsten
------------------
TeeChart.NET version 2
Build 2.0.2040.15119

Posted: Fri Dec 23, 2005 11:05 am
by narcis
Hi Torsten,

Yes, you can use something like this.

Code: Select all

		private Steema.TeeChart.ChartListBox seriesList = new Steema.TeeChart.ChartListBox();		

		private void Form1_Load(object sender, System.EventArgs e)
		{ 			
			seriesList.Chart=tChart1;
			seriesList.Dock = System.Windows.Forms.DockStyle.Left;
			seriesList.IntegralHeight = false;
			seriesList.Location = new System.Drawing.Point(0, 0);
			seriesList.Name = "chartListBox1";
			seriesList.OtherItems = null;
			seriesList.Size = new System.Drawing.Size(112, 153);
			seriesList.TabIndex = 0; 

			points1.FillSampleValues();
			fastLine1.FillSampleValues(); 

			this.Controls.Add(this.seriesList); 

			for(int i=0; i < tChart1.Series.Count; ++i) 
			{
				if(!(tChart1[i].Count > 0)) 
				{
					seriesList.Items.RemoveAt(i);
					tChart1[i].ShowInLegend = false;
				}
			}
		}
The example contains 3 series and only 2 of them are being populated.