fpspreadsheet: Support manual axis scaling in ods writer.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8999 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-10-29 18:36:13 +00:00
parent 2c8dac0888
commit 6a183346ed
3 changed files with 18 additions and 0 deletions

View File

@ -126,6 +126,10 @@ begin
ch.YAxis.CaptionFont.Size := 12;
//ch.YAxis.LabelRotation := 90;
//ch.YAxis.CaptionRotation := 90;
ch.YAxis.Min := -5;
ch.yAxis.Max := 5;
ch.YAxis.AutomaticMin := false;
ch.YAxis.AutomaticMax := false;
ch.YAxis.MajorGridLines.Color := scBlue;
ch.YAxis.MajorGridLines.Style := clsLongDash; //clsSolid;
ch.YAxis.MajorGridLines.Width := 0.5; // mm

View File

@ -504,6 +504,8 @@ constructor TsChartAxis.Create(AChart: TsChart);
begin
inherited Create(AChart);
FAutomaticMin := true;
FAutomaticMax := true;
FAutomaticMajorInterval := true;
FAutomaticMinorSteps := true;

View File

@ -197,6 +197,18 @@ begin
if Axis.Logarithmic then
chartProps := chartProps + 'chart:logarithmic="true" ';
if not Axis.AutomaticMin then
chartProps := chartProps + Format('chart:minimum="%g" ', [Axis.Min], FPointSeparatorSettings);
if not Axis.AutomaticMax then
chartProps := chartProps + Format('chart:maximum="%g" ', [Axis.Max], FPointSeparatorSettings);
if not Axis.AutomaticMajorInterval then
chartProps := chartProps + Format('chart:interval-major="%g" ', [Axis.MajorInterval], FPointSeparatorSettings);
if not Axis.AutomaticMinorSteps then
chartProps := chartProps + Format('chart:interval-minor-divisor="%d" ', [Axis.MinorSteps]);
if Axis.Inverted then
chartProps := chartProps + 'chart:reverse-direction="true" ';