Page 1 of 1

Set Line smoothed along with line width

Posted: Fri Feb 06, 2015 2:07 pm
by 9526439
Hi Steema Support

When we line series property smoothed to true. Then it makes the line smoothed. But using this we are unable to change the width of line.
Is there is any way to set both of these property.

line.Smoothed=true;
line.LinePen.Width=4;

Thanks in advance.

Regards
PlanoResearch

Re: Set Line smoothed along with line width

Posted: Fri Feb 06, 2015 2:33 pm
by narcis
Hi PlanoResearch,

Yes, this is possible. Line series uses an extra internal series to plot the smoothed line. To achieve what you request you need to modify this internal series, for example:

Code: Select all

      tChart1.Aspect.View3D = false;

      Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);

      line1.Smoothed = true;
      line1.LinePen.Width = 5;
      line1.FillSampleValues();

      if (line1.Smoothed)
      {
        Steema.TeeChart.Styles.Line smoothedLine1 = (Steema.TeeChart.Styles.Line)tChart1[tChart1.Series.IndexOf(line1) + 1];
        smoothedLine1.LinePen.Width = line1.LinePen.Width; 
      }

Re: Set Line smoothed along with line width

Posted: Sat Feb 07, 2015 9:06 am
by 9526439
Thanks! it works successfully.

Regards
PlanoResearch