I'm trying to save the config of 3 charts in the registry when the application closes. i have an issue that amongst other things [ but an obvious one ] if I have set the bottom axis to be auto scaled, you can see it is set to auto if you inspect it, then export a stream, rewind the stream and re-import it to the same chart, the axis is no longer auto
if I do the following:
frm.tcAmGraph.Axes.Bottom.Automatic
[true]
var stream3 = new MemoryStream();
frm.tcAmGraph.Export.Template.IncludeData = false;
frm.tcAmGraph.Export.Template.Save(stream3);
stream3.Position = 0;
frm.tcAmGraph.Import.Template.Load(stream3);
frm.tcAmGraph.Axes.Bottom.Automatic
[false]
what am i missing?
thanks
Andy
Import.Template.Load not working properly
Import.Template.Load not working properly
Last edited by AndyRea on Mon Oct 01, 2018 4:35 pm, edited 1 time in total.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Import.Template.Load not working properly
Hello Andy,
using the latest publicly available version of TeeChart.dll (4.1.2018.05040) I cannot reproduce this issue:
which version of TeeChart.dll are you using?
using the latest publicly available version of TeeChart.dll (4.1.2018.05040) I cannot reproduce this issue:
which version of TeeChart.dll are you using?
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Import.Template.Load not working properly
v4.0.30319
will get the latest and try again
will get the latest and try again
Re: Import.Template.Load not working properly
I was wrong it was the latest
i'm more puzzled now
if i use the editor dialog to save out a .ten file of the chart ( with 1 fast line series and it's colour set to red ) and then
tcFmGraph.Import.Template.LoadFileDialog();
to load that file back in, the red trace goes back to the default blue trace ( application not stopped in between )
what am I missing? have attached the .ten file for anyones bemusement
i'm more puzzled now
if i use the editor dialog to save out a .ten file of the chart ( with 1 fast line series and it's colour set to red ) and then
tcFmGraph.Import.Template.LoadFileDialog();
to load that file back in, the red trace goes back to the default blue trace ( application not stopped in between )
what am I missing? have attached the .ten file for anyones bemusement
- Attachments
-
- teechart.png (9.97 KiB) Viewed 14594 times
-
- Chart1.zip
- (4.01 KiB) Downloaded 1108 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Import.Template.Load not working properly
Hello,
using the following code:
I obtain the following result:
here the FastLine series color does not seem to be affected by template exportation and importation.
using the following code:
Code: Select all
public Form1()
{
InitializeComponent();
CreateCharts();
InitializeChart();
}
private TChart tChart1, tChart2;
private void InitializeChart()
{
FastLine fastLine = new FastLine(tChart1.Chart);
fastLine.FillSampleValues();
fastLine.Color = Color.Red;
}
private void button2_Click(object sender, EventArgs e)
{
MemoryStream stream = new MemoryStream();
tChart1.Export.Template.Save(stream);
stream.Position = 0;
tChart2.Import.Template.Load(stream);
}
private void CreateCharts()
{
tChart1 = new TChart();
tChart2 = new TChart();
tChart1.Dock = DockStyle.Fill;
tChart2.Dock = DockStyle.Fill;
tChart1.Header.Text = Utils.Version;
splitContainer2.Panel1.Controls.Add(tChart1);
splitContainer2.Panel2.Controls.Add(tChart2);
}
here the FastLine series color does not seem to be affected by template exportation and importation.
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |