Page 1 of 1

TChartListBox.ShowSeriesColor

Posted: Wed Apr 28, 2010 6:23 pm
by 16556029
TChartListBox.ShowSeriesColor no longer works in TeeChart 2010. Any idea when a fix can be expected?

Re: TChartListBox.ShowSeriesColor

Posted: Wed Apr 28, 2010 6:39 pm
by 16556029
Looks like you have to manually assign the ReferenceChart property of the listbox.

Re: TChartListBox.ShowSeriesColor

Posted: Fri Apr 30, 2010 2:40 pm
by yeray
Hi Scot,

You have to assign a Chart to the ChartListBox to give sense to ShowSeriesColor, wasn't before?

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var Chart1: TChart;
    ChartListBox1: TChartListBox;
    i: Integer;
begin
  Chart1:=TChart.Create(self);
  Chart1.Parent:=Form1;

  for i:=0 to 2 do
    with Chart1.AddSeries(TBarSeries.Create(self)) do FillSampleValues();

  ChartListBox1:=TChartListBox.Create(self);
  ChartListBox1.Parent:=Form1;
  ChartListBox1.Left:=Chart1.Width;
  ChartListBox1.Chart:=Chart1;

  ChartListBox1.ShowSeriesColor:=false;
end;

Re: TChartListBox.ShowSeriesColor

Posted: Fri Apr 30, 2010 4:30 pm
by 16556029
In TeeChart 2010 assigning a chart is not enough. If you look at the draw item code you will see that the new version has an 'if assigned(referencechart)' check before it draws the series color. This problem is also occurs in the chart editor.

Re: TChartListBox.ShowSeriesColor

Posted: Fri Apr 30, 2010 4:54 pm
by yeray
Hi Scot,

You are right. I'm not sure how I've looked at it! :oops: