![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | When cloning a chart series with a datasource, the datasource is unlinked | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | h.hasenack <hans> |
| Component: | Series | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | CONFIRMED --- | ||
| Severity: | major | CC: | hans, sandra |
| Priority: | High | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | RAD XE7 |
this shows up eg when using the chartscrollpager with a series that is linked to a chartdatasource, It clones the original series for display in the scrollpager, but when doing so it does not clone the datasource component. So, whap happens ist that the datasource gets linked to the seires in the scrollpager, and the original series gets unlinked from the datasource. My patch was to change the TChartSeries.Assign method, and skip any TSeriesSource links from the original series in SelfSetDataSources: Procedure SelfSetDataSources(const Value:TDataSourcesList); var t : Integer; {$ifdef HH_PATCH_TC_DATASOURCEPERSISTANCE} ds:TComponent; {$endif} begin DataSources.Clear; {$ifdef HH_PATCH_TC_DATASOURCEPERSISTANCE} // fixes a problem for Tchartscrollpager where a series iscloned. The TChartSeries.Assign // unlinks from the original chartseries top be linked to the cloned series. Which makes the // original series appear empty. for t:=0 to Value.Count-1 do begin ds:=Value[t]; if not (ds is TTeeSeriesSource) then InternalAddDataSource(ds); end; {$else} for t:=0 to Value.Count-1 do InternalAddDataSource(Value[t]); {$endif} end;