Page 1 of 1

TChart Editor and line serie color

Posted: Thu Sep 01, 2022 5:34 am
by 15693683
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 !

Re: TChart Editor and line serie color

Posted: Thu Sep 01, 2022 3:42 pm
by Christopher
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.

Re: TChart Editor and line serie color

Posted: Fri Sep 02, 2022 3:55 pm
by 15693683
Thank You for the explaination !