Bar Series
Posted: Wed Nov 05, 2008 9:28 pm
When I save a bar series as template and the reload it, I lose BarWidthPercent value.
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);
}
Code: Select all
Chart1.Export.Template.Save(fileName);
Chart1.Import.Template.Load(fileName);
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);
}
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);
}
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);
}