Page 1 of 1

Multiple legends

Posted: Mon Feb 14, 2005 12:41 pm
by 9080952
Hi,

I would like to add multiple legends to my chart, as demonstrated in one of your demo's.

In my application I add series as follows:

for (iSeries=0;iSeries<noSeries;iSeries++)
{
for (i=0;i<noPnts;i++) tChart1.Series[iSeries].Add(x,y);
}

Now I would like to split up those series over more than one legend, as those series represent different items. E.g. for series[0:10] I want to show the first 5 series in legend #1 and the last 5 in legend #2.

On my tChart1_AfterDraw event I added a function with code:

Steema.TeeChart.Legend legend = tChart1.Legend;
// legend #1
legend.FirstValue = 0;
legend.Top = 100;
legend.Bottom = 300;
legend.Paint(tChart1.Graphics3D,legend.ShapeBounds);

// legend #2
legend.FirstValue = 5;
legend.Top = 400;
legend.Bottom = 600;
legend.Paint(tChart1.Graphics3D,legend.ShapeBounds);

but the first legend still displays ALL my series.
What I am missing is a property LastValue for setting the last series to be displayed in my legend.

Is there a proper workaround for this ?

Thanks a lot.

Kind regards,
Antoon Koster
Netherlands

Posted: Mon Feb 14, 2005 3:39 pm
by narcis
Hi Anthony,

I've tried diferent solutions here, also using ExtraLegend Tool but didn't succeed. I have included this to our defect list (TV52010409) to be fixed for future releases.

A solution would be using TeeChart canvas to draw what you need.