Bar Series
Bar Series
When I save a bar series as template and the reload it, I lose BarWidthPercent value.
-
- 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 v3 release available at the download area. Could you please check if it works fine for you and modify to code snippet so that we can reproduce the issue here?
Thanks in advance.
Code below works fine for me here using latest v3 release available at the download area. Could you please check if it works fine for you and modify to code snippet 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.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.FillSampleValues();
bar1.BarWidthPercent = 100;
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 |
Bar series
Yes, it helps, when you use the right property
But I have another issue when I save and load a template - I am loosing gradient colors and border color:
Any ideas?
But I have another issue when I save and load a template - I am loosing gradient colors and border color:
Code: Select all
Chart1.Export.Template.Save(fileName);
Chart1.Import.Template.Load(fileName);
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Profitstar,
This also works fine for me here using this code:
Could you please check if it works fine at your end and modify code snippet above to reproduce the issue here?
This also works fine for me here using this code:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private System.IO.MemoryStream stream;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.FillSampleValues();
bar1.Pen.Color = Color.Red;
bar1.Gradient.Visible = true;
bar1.Gradient.StartColor = Color.Red;
bar1.Gradient.EndColor = Color.White;
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 |
Bar series
When I add bar series using your editor those colors are coming through the Save/Load procedure just fine. But if I create a bar series in my code and just set up all the properties, then the colors are lost in the reload procedure.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Profitstar,
Thanks for the information. In the example I posted Bar series is created programmatically and all properties persists when saving/loading the chart. Could you please modify the code snippet I posted so that we can reproduce the problem here?
Thanks in advance.
Thanks for the information. In the example I posted Bar series is created programmatically and all properties persists when saving/loading the chart. Could you please modify the code snippet I posted so that we can reproduce the problem here?
Thanks in advance.
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 |
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private MemoryStream stream;
private void InitializeChart()
{
TChart chart = new TChart();
chart.Aspect.View3D = false;
Bar bar = new Bar(chart.Chart);
bar.FillSampleValues();
bar.Pen.Color = Color.Red;
bar.Gradient.Visible = true;
bar.Gradient.StartColor = Color.Red;
bar.Gradient.EndColor = Color.White;
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 your code but I'm not able to reproduce this too. Could you please confirm the exact TeeChart build number you are using?
Thanks in advance.
Thanks for your code but I'm not able to reproduce this too. Could you please confirm the exact TeeChart build number you are using?
Thanks in advance.
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 |
Sorry, I've missed one obviously very important detail: you actually must set the series color like in the following example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private MemoryStream stream;
private void InitializeChart()
{
TChart chart = new TChart();
Bar bar = new Bar(chart.Chart);
bar.Color = Color.Navy;
bar.FillSampleValues();
bar.Pen.Color = Color.Yellow;
bar.Gradient.Visible = true;
bar.Gradient.StartColor = Color.Red;
bar.Gradient.EndColor = Color.White;
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 information. I could finally reproduce the issue here and added it (TF02013551) to the defect list to be fixed for next releases.
Thanks for the information. I could finally reproduce the issue here and added it (TF02013551) 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 |