TChart Editor and line serie color

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Sharkann
Newbie
Newbie
Posts: 17
Joined: Fri Apr 22, 2022 12:00 am

TChart Editor and line serie color

Post by Sharkann » Thu Sep 01, 2022 5:34 am

Hello,

I wanted to ask a questions regarding some buttons to change the color of a curve through the editor.
I see 2 buttons, that are not (or not seem to be) linked together, though they have the same effect :
see attachments

What is the difference, and regarding the series properties, what property does it change ?

Thank You !
Attachments
2.jpg
2.jpg (52 KiB) Viewed 3162 times
1.jpg
1.jpg (52.34 KiB) Viewed 3162 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: TChart Editor and line serie color

Post by Christopher » Thu Sep 01, 2022 3:42 pm

Hello,

This is the FastLine series, I believe. You can replicate your first image by running the following code and clicking on the button1:

Code: Select all

    
    public Form1()
    {
      InitializeComponent();

      editor1.Chart = tChart1;
      editor1.CloseEditor += Editor1_CloseEditor;


      tChart1.Aspect.View3D = true;
      var line = new FastLine(tChart1.Chart);
      line.FillSampleValues();

      line.LinePen.Color = Color.Yellow;
      //line.Color = Color.Red;
    }

    private void Editor1_CloseEditor(object sender, EventArgs e)
    {
      MessageBox.Show("Editor Closed");
    }

    private void button1_Click(object sender, EventArgs e)
    {
      editor1.ShowModal();
    }
  }
Here we change the LinePen Color, but we do not change the Series Color—as the Series Color overrides the LinePen Color, but not the other way round, we have the LinePen as yellow and the Series Color as light blue (default). We now uncomment the second line, and now the Series Color is red as is the LinePen Color, given the Series Color overrides it. You can change the Series Color in the Editor by clicking on the Series Color square in the top right.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Sharkann
Newbie
Newbie
Posts: 17
Joined: Fri Apr 22, 2022 12:00 am

Re: TChart Editor and line serie color

Post by Sharkann » Fri Sep 02, 2022 3:55 pm

Thank You for the explaination !

Post Reply