AreaSeries - load from template
AreaSeries - load from template
When I save area series into a template and then load it, border lines and area lines are not fully restored (they lose their colors). Same is true for some other pen objects (like lines in the LinePoints series).
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Profitstar,
Code below works fine for me here using latest TeeChart for .NET v3 release available at the client area. Can you please test if it works fine for you and, if necessary, modify it so that we can reproduce the issue here?
Thanks in advance.
Code below works fine for me here using latest TeeChart for .NET v3 release available at the client area. Can you please test if it works fine for you and, if necessary, modify it so that we can reproduce the issue here?
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private System.IO.MemoryStream stream;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Area area1 = new Steema.TeeChart.Styles.Area(tChart1.Chart);
area1.FillSampleValues();
area1.AreaLines.Color = Color.Red;
area1.LinePen.Color = Color.Lime;
Steema.TeeChart.Styles.LinePoint linePoint1 = new Steema.TeeChart.Styles.LinePoint(tChart1.Chart);
linePoint1.FillSampleValues();
linePoint1.LinePen.Color = Color.Blue;
linePoint1.LinePen.Style = System.Drawing.Drawing2D.DashStyle.Dash;
stream = new System.IO.MemoryStream();
tChart1.Export.Template.Save(stream);
}
private void button1_Click(object sender, EventArgs e)
{
stream.Position = 0;
tChart1.Clear();
tChart1.Import.Template.Load(stream);
}
Best Regards,
Narcís Calvet / 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 |
Try this code - it produces 2 different looking graphs:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private MemoryStream stream;
private void InitializeChart()
{
TChart chart = new TChart();
Area area = new Area(chart.Chart);
area.Color = Color.DarkMagenta;
area.AreaLines.Color = Color.YellowGreen;
area.AreaLines.Visible = true;
area.AreaLines.Width = 2;
area.LinePen.Color = Color.YellowGreen;
area.LinePen.Visible = true;
area.LinePen.Width = 2;
area.FillSampleValues();
stream = new System.IO.MemoryStream();
chart.Export.Template.Save(stream);
}
private void button1_Click(object sender, EventArgs e)
{
stream.Position = 0;
tChart1.Clear();
tChart1.Import.Template.Load(stream);
}
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Profitstar,
Thanks for the code. I could reproduce the issue here now and added it (TF02013556) to the defect list to be fixed for next releases.
Thanks for the code. I could reproduce the issue here now and added it (TF02013556) to the defect list to be fixed for next releases.
Best Regards,
Narcís Calvet / 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 |