TAChart: Set correct XCount and YCount of built-in list chart source when series is created. Issue #35089, modified patch by Marcin Wiazowski.

git-svn-id: trunk@60450 -
This commit is contained in:
wp 2019-02-18 18:19:20 +00:00
parent 9cc3eb4ef4
commit af5746fb55

View File

@ -816,12 +816,17 @@ end;
constructor TChartSeries.Create(AOwner: TComponent);
const
BUILTIN_SOURCE_NAME = 'Builtin';
var
nx, ny: Integer;
begin
inherited Create(AOwner);
FListener := TListener.Create(@FSource, @SourceChanged);
FBuiltinSource := TListChartSource.Create(Self);
FBuiltinSource.Name := BUILTIN_SOURCE_NAME;
GetXYCountNeeded(nx, ny);
FBuiltinSource.XCount := nx;
FBuiltinSource.YCount := ny;
FBuiltinSource.Broadcaster.Subscribe(FListener);
FMarks := TChartMarks.Create(FChart);
FStylesListener := TListener.Create(@FStyles, @StyleChanged);