I have a WebChart with data that I want to represent in a FastLine (or Line) series and in an Arrow series
I want both series to be the same color,
But FastLine (or Line) and Arrow series with the same value for the Color property are displayed in different colors in the webchart
(In the legend their colors are the same)
(We use version 3.2.2763.26082)
Here is my code sample:
Code: Select all
protected void Page_Load(object sender, System.EventArgs e)
{
Steema.TeeChart.Chart ch1 = WebChart1.Chart;
if (Session["ch1"] == null)
{
//setup Chart
ch1.Aspect.View3D = false;
Steema.TeeChart.Styles.FastLine line1 = new Steema.TeeChart.Styles.FastLine(ch1);
line1.FillSampleValues(100);
line1.Color = Color.FromArgb(255, 236,0,140) ;
Steema.TeeChart.Styles.Arrow arrow = new Arrow(ch1);
arrow.FillSampleValues(2);
arrow.Color = Color.FromArgb(255, 236, 0, 140);
ExportChart(ch1);
}
else
{
MemoryStream tmpChart = new MemoryStream();
//retrieve the session stored Chart
tmpChart = (MemoryStream)Session["ch1"];
//set the Stream position to 0 as the last read/write
//will have moved the position to the end of the stream
tmpChart.Position = 0;
//import saved Chart
ch1.Import.Template.Load(tmpChart);
}
}
private void ExportChart(Steema.TeeChart.Chart ch1)
{
MemoryStream tmpChart = new MemoryStream();
//export Chart to a MemoryStream template
ch1.Export.Template.Save(tmpChart);
//save template to a Session variable
Session.Add("ch1", tmpChart);
}