Showing in chartlistbox only series with values

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Torte
Newbie
Newbie
Posts: 19
Joined: Fri Sep 16, 2005 4:00 am

Showing in chartlistbox only series with values

Post by Torte » Mon Dec 19, 2005 1:03 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Dec 23, 2005 11:05 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply