Recent

Author Topic: [solved] TChartListBox - unwanted series  (Read 750 times)

Nicole

  • Hero Member
  • *****
  • Posts: 1324
[solved] TChartListBox - unwanted series
« on: February 27, 2026, 05:24:15 pm »
There is a series, which helps to see, if another series is positive or negative.
It is just a line of zero.
It's ".active" is set by the another's .active.

it is called Nulllinie = zero line.

I chose, not to show it in my legend.
How not to show it neither in the TChartListBox list?

see attach
« Last Edit: February 27, 2026, 08:09:37 pm by Nicole »

wp

  • Hero Member
  • *****
  • Posts: 13556
Re: TChartListBox - unwanted series
« Reply #1 on: February 27, 2026, 05:35:27 pm »
Write a handler to the OnAddSeries event of the ChartListbox and set the Skip parameter for the Null series to true:

Untested:
Code: Pascal  [Select][+][-]
  1. procedure TForm1.ChartListbox1AddSeries(ASender: TChartListbox;
  2.   ASeries: TCustomChartSeries; AItems: TChartLegendItems; var ASkip: Boolean);
  3. begin
  4.   if ASeries.Name = 'Nulllinie' then ASkip := true;
  5. end;

Nicole

  • Hero Member
  • *****
  • Posts: 1324
Re: TChartListBox - unwanted series
« Reply #2 on: February 27, 2026, 08:09:08 pm »
Wow, thank you so very much for the solution, it worked at sudden.
I would not have found the out by myself ever.

wp

  • Hero Member
  • *****
  • Posts: 13556

 

TinyPortal © 2005-2018