Page 1 of 1

Single series line chart shows invalid legend

Posted: Thu Apr 20, 2017 3:32 pm
by 15680627

Code: Select all

Steema.TeeChart.WPF.Styles.Line line = new Steema.TeeChart.WPF.Styles.Line(TeeChart) {
	Title = "Line1"
};
line.Add(10, 10);
line.Add(20, 20);

Steema.TeeChart.WPF.Styles.Line line2 = new Steema.TeeChart.WPF.Styles.Line(TeeChart) {
          Title = "Line2"
};
line2.Add(10, 15);
line2.Add(20, 25);
스크린샷 2017-04-21 오전 12.21.45.png
스크린샷 2017-04-21 오전 12.21.45.png (37.51 KiB) Viewed 5878 times
It works fine. but single series line char legend is something wrong.

Code: Select all

Steema.TeeChart.WPF.Styles.Line line = new Steema.TeeChart.WPF.Styles.Line(TeeChart) {
	Title = "Line1"
};
line.Add(10, 10);
line.Add(20, 20);
스크린샷 2017-04-21 오전 12.26.54.png
스크린샷 2017-04-21 오전 12.26.54.png (32.85 KiB) Viewed 5880 times

Re: Single series line chart shows invalid legend

Posted: Thu Apr 20, 2017 9:54 pm
by Christopher
Hello,

You can use the LegendStyle to control what appears in the Legend, e.g.

Code: Select all

    private void InitializeChart()
    {
      Line line = new Line(tChart1.Chart);
      line.Add(10);
      line.Add(20);

      tChart1.Legend.LegendStyle = LegendStyles.Series;
    }