Importing .Ten file and having some problems in ChartListBox
Posted: Thu Dec 15, 2005 1:50 pm
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
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