Page 1 of 1

Importing .Ten file and having some problems in ChartListBox

Posted: Thu Dec 15, 2005 1:50 pm
by 9638326
Hello,
following question.

In .NET (using C#) I like to import a former saved .ten file.

After starting I have my {TCHART tChart} object without any series in it. But I initialized my according ChartListBox with this tChart object and added tools for example Gridband, CursorTool to the chart. Concering GridBand and CursorTool I added both tools via:
....
this.tChart.Tools.Add(this.CursorTool);
this.tChart.Tools.Add(this.GridBand);

(*Normaly user could load now files in GRAMS and CSV format, to load series into THIS chart. Everythink works fine ....*)

Ok but now I like to importing FIRST of all my .ten file via stream.
(My .ten file has two series inside)

this.tChart.Import.Template.Load(tenStream)

Ok chart appears in correct style all axes colours were set correct ... *fine*

But now I have problems because I don't really understand what is going on when importing .ten file in respect to my tChart object.

After importing I don't see my (of course empty) two series in the Chartlistbox. But did set all series visible via
( tChart.GetSeries.ShowInLegend = true;)

Solution: I have to refresh property Chartlisbox.chart

Ok after it I see my series in the chartlistbox but can't hide them with
( tChart.GetSeries.ShowInLegend = false;)
*Grrrrrrrrrr*

Concerning tools:
After importing I find out I have to re-add my tools via:
this.tChart.Tools.Add(this.CursorTool)
.........

-------------------------

My questions:

I do import .ten file in the right way ? Or should I delete my TChart object first of all and create new one ... ?
Is it normal that I have to refresh Chartlisbox.chart after importing ?
Any idea why I can't hide my series in the Legend (see description above) ?

Best regards from the Baltic
Torsten

Posted: Fri Dec 16, 2005 11:47 am
by narcis
Hi Torsten,

Could you please send us an example we can run "as-is" to reproduce the problem here and also specify which TeeChart version are you using? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Thanks in advance and regards from the Mediterranean :wink:.

Posted: Mon Dec 19, 2005 12:35 pm
by 9638326
Hi NarcĂ­s,
solved my problems :-)
Excepting one. I will open new thread for it.
Regards
Torsten