Code: Select all
procedure CloneChart(Dest, Origin: TCustomChart; AOwner: TComponent; ForceManualData: Boolean);
I have two questions:
- What does the parameter ForceManualData stand for? The documentation does not say anything
- How should one go about copying a chart that has tools?
Code: Select all
var
chartToolIterator, clonedTool: TTeeCustomTool;
begin
// Copy the chart
newChart := TChart.Create(self);
VclTee.Chart.CloneChart(
newchart,
chart1,
self,
False
);
newChart.Parent := panel1;
newChart.Align := TAlign.alClient;
// Everything fine so far, let's copy the tools
for chartToolIterator in chart1.Tools do begin
clonedTool := VclTee.Chart.CloneChartTool(
chartToolIterator,
self
);
clonedTool.ParentChart := newChart;
newChart.Tools.Add(clonedTool);
end;
end;
Any suggestions or workarounds? Basically, I just want to create an exact copy of a chart.
Many thanks in advance.