Set Line smoothed along with line width

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
amol
Advanced
Posts: 231
Joined: Tue Mar 29, 2005 5:00 am

Set Line smoothed along with line width

Post by amol » Fri Feb 06, 2015 2:07 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Set Line smoothed along with line width

Post by Narcís » Fri Feb 06, 2015 2:33 pm

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; 
      }
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

amol
Advanced
Posts: 231
Joined: Tue Mar 29, 2005 5:00 am

Re: Set Line smoothed along with line width

Post by amol » Sat Feb 07, 2015 9:06 am

Thanks! it works successfully.

Regards
PlanoResearch

Post Reply