fpspreadsheet: Supporting smooth scatter/line series for xlsx (less options than for ods)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9219 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
efcf55181b
commit
5f781b622a
@ -111,7 +111,10 @@ begin
|
|||||||
ch.YAxis.Logarithmic := true;
|
ch.YAxis.Logarithmic := true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
ch.XAxis.Inverted := true;
|
|
||||||
|
// For testing:
|
||||||
|
// ch.XAxis.Inverted := true;
|
||||||
|
ch.Interpolation := ciCubicSpline;
|
||||||
|
|
||||||
// Add scatter series
|
// Add scatter series
|
||||||
ser := TsScatterSeries.Create(ch);
|
ser := TsScatterSeries.Create(ch);
|
||||||
|
@ -3964,14 +3964,25 @@ procedure TsSpreadOOXMLChartWriter.WriteScatterSeries(AStream: TStream;
|
|||||||
var
|
var
|
||||||
indent: String;
|
indent: String;
|
||||||
chart: TsChart;
|
chart: TsChart;
|
||||||
|
scatterStyleStr: String;
|
||||||
begin
|
begin
|
||||||
indent := DupeString(' ', AIndent);
|
indent := DupeString(' ', AIndent);
|
||||||
chart := ASeries.Chart;
|
chart := ASeries.Chart;
|
||||||
|
|
||||||
|
case chart.Interpolation of
|
||||||
|
ciLinear:
|
||||||
|
scatterStyleStr := 'lineMarker';
|
||||||
|
ciCubicSpline, ciBSpline:
|
||||||
|
scatterStyleStr := 'smoothMarker';
|
||||||
|
else
|
||||||
|
//ciStepStart, ciStepEnd, ciCenterX, ciCenterY
|
||||||
|
scatterStyleStr := 'lineMarker'; // better than nothing...
|
||||||
|
end;
|
||||||
|
|
||||||
AppendToStream(AStream,
|
AppendToStream(AStream,
|
||||||
indent + '<c:scatterChart>' + LE +
|
indent + '<c:scatterChart>' + LE +
|
||||||
indent + ' <c:varyColors val="0"/>' + LE +
|
indent + ' <c:varyColors val="0"/>' + LE +
|
||||||
indent + ' <c:scatterStyle val="lineMarker"/>' + LE
|
indent + ' <c:scatterStyle val="' + scatterStyleStr + '"/>' + LE
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteChartSeriesNode(AStream, AIndent + 4, ASeries, ASeriesIndex);
|
WriteChartSeriesNode(AStream, AIndent + 4, ASeries, ASeriesIndex);
|
||||||
|
Loading…
Reference in New Issue
Block a user