Page 1 of 1

Problem in color of FastLine and Arrow series in V3

Posted: Wed Aug 15, 2007 12:05 pm
by 9643998
Hi,

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); 
   } 

Posted: Thu Aug 16, 2007 11:40 am
by narcis
Hi MeirS,

Yes, this is an arrow series issue. TeeChart for .NET darkens series pen to make them look better but in this case, as it's in 2D and only the arrow pen is visible, it is the darkened color what's visible.

We have already fixed this issue for the next v3 maintenance release. In the meantime, a workaround would be increasing arrow's color a 40 percent that later will be decreased. However this may not work in some cases when the desired color plus a 40 percent exceeds 255.