Page 1 of 1

Using ChartListBox as Legend

Posted: Wed Mar 14, 2007 11:36 am
by 8127541
Hi,

I've uploaded an example screen capture "chartlistbox.jpg" to illustrate my question.

I'm using the chartlistbox as a legend since the amount of points I'm plotting on the chart cannot be determied. The built-in legend only displays those points that can fit on the screen.

The shapes, lines and labels on the chart is static and must not change. However, because they are also "series", they are displayed in the chartlistbox, which I don't want.

The question is thus: How do I remove my static series from the chartlistbox, but still have them plotted?

Regards,
Casper JH Erasmus

Posted: Wed Mar 14, 2007 12:00 pm
by narcis
Hi Casper,

You can achieve what you request doing something like this:

Code: Select all

  With ChartListBox1 do
  begin
   Series2.ShowInEditor:=false;
   Series4.ShowInEditor:=false;
   ClearItems;
   FillSeries(Series1);
   FillSeries(Series3);
  end;

Posted: Thu Mar 15, 2007 5:26 am
by 8127541
Hi Narcis,

I can't find a "ShowInEditor" method.

Apologies for not mentioning it before, but I'm using TeeChart.NET 1.1 and VS2005 C#.

Regards,

Posted: Thu Mar 15, 2007 8:28 am
by narcis
Hi Casper,

Sorry, I confused myself and posted a Delphi example. In TeeChart for .NET you can use this:

Code: Select all

			this.chartListBox1.Items.Remove(line2);
			this.chartListBox1.Items.Remove(line3);