fpspreadsheet: Fix compilation of sample projects.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9161 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2024-01-23 15:25:50 +00:00
parent db8d8c0358
commit 59cb94609d
6 changed files with 19 additions and 24 deletions

View File

@ -66,7 +66,7 @@ begin
// Add 1st bar series ("Count")
ser := TsBarSeries.Create(ch);
ser.YAxis := alPrimary;
ser.YAxis := calPrimary;
ser.SetTitleAddr(2, 1);
ser.SetLabelRange(3, 0, 8, 0);
ser.SetYRange(3, 1, 8, 1);
@ -76,7 +76,7 @@ begin
// Add 2nd bar series ("Volume")
ser := TsBarSeries.Create(ch);
ser.YAxis := alSecondary;
ser.YAxis := calSecondary;
ser.SetTitleAddr(2, 2);
ser.SetLabelRange(3, 0, 8, 0);
ser.SetYRange(3, 2, 8, 2);

View File

@ -51,11 +51,6 @@
<DebugInfoType Value="dsDwarf3"/>
</Debugging>
</Linking>
<Other>
<ConfigFile>
<WriteConfigFilePath Value=""/>
</ConfigFile>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions>

View File

@ -44,7 +44,7 @@ begin
sheet.WriteText(10, 0, 'Computer'); sheet.WriteNumber(10, 1, 16); sheet.WriteNumber(10, 2, 18);
// Create chart: left/top in cell D4, 160 mm x 100 mm
ch := book.AddChart(sheet, 2, 3, 120, 100);
ch := book.AddChart(sheet, 2, 3, 160, 100);
// Chart properties
ch.Border.Style := clsNoLine;
@ -63,22 +63,22 @@ begin
// Add 1st bar series ("Student 1")
ser := TsBarSeries.Create(ch);
ser.SetTitleAddr(2, 1);
ser.SetLabelRange(3, 0, 10, 0);
ser.SetYRange(3, 1, 10, 1);
ser.SetTitleAddr(2, 1); // series 1 title in cell B3
ser.SetLabelRange(3, 0, 10, 0); // series 1 x labels in A4:A11
ser.SetYRange(3, 1, 10, 1); // series 1 y values in B4:B11
ser.Line.Color := scDarkRed;
ser.Fill.Style := cfsSolidHatched;
ser.Fill.Hatch := ch.Hatches.AddHatch('Crossed', chsDouble, scDarkRed, 2, 45);
ser.Fill.Hatch := ch.Hatches.AddLineHatch('Crossed', chsDouble, scDarkRed, 2, 0.1, 45);
ser.Fill.Color := scRed;
// Add 2nd bar series ("Student 2")
ser := TsBarSeries.Create(ch);
ser.SetTitleAddr(2, 2);
ser.SetLabelRange(3, 0, 10, 0);
ser.SetYRange(3, 2, 10, 2);
ser.SetTitleAddr(2, 2); // series 2 title in cell C3
ser.SetLabelRange(3, 0, 10, 0); // series 2 x labels in A4:A11
ser.SetYRange(3, 2, 10, 2); // series 2 y values in C4:C11
ser.Line.Color := scDarkBlue;
ser.Fill.Style := cfsSolidHatched;
ser.Fill.Hatch := ch.Hatches.AddHatch('Forward', chsSingle, scWhite, 1.5, 45);
ser.Fill.Hatch := ch.Hatches.AddLineHatch('Forward', chsSingle, scWhite, 1.5, 0.1, 45);
ser.Fill.Color := scBlue;
{

View File

@ -109,8 +109,8 @@ begin
WriteData(r, d, 110000, 109, 115, 99, 110);
WriteData(r, d, 95000, 110, 119, 103, 115);
// Create chart: left/top in cell D4, 150 mm x 100 mm
ch := book.AddChart(sheet, 2, 6, 150, 100);
// Create chart: left/top in cell D4, 160 mm x 100 mm
ch := book.AddChart(sheet, 2, 6, 160, 100);
// Chart properties
ch.RotatedAxes := rotated;
@ -144,7 +144,7 @@ begin
ser := TsStockSeries.Create(ch);
// Stock series properties
ser.YAxis := alPrimary;
ser.YAxis := calPrimary;
ser.CandleStick := candleStickMode;
ser.CandleStickUpFill.Color := scGreen;
ser.CandlestickDownFill.Color := scRed;
@ -163,7 +163,7 @@ begin
end;
// Volume series properties
vser.YAxis := alSecondary;
vser.YAxis := calSecondary;
vser.SetLabelRange(3, 0, 7, 0);
vser.SetYRange (3, 1, 7, 1);
vser.SetTitleAddr (2, 1);

View File

@ -83,8 +83,8 @@ begin
WriteData(r, d, 109, 115, 99, 110);
WriteData(r, d, 110, 119, 103, 115);
// Create chart: left/top in cell D4, 150 mm x 100 mm
ch := book.AddChart(sheet, 2, 5, 150, 100);
// Create chart: left/top in cell D4, 160 mm x 100 mm
ch := book.AddChart(sheet, 2, 5, 160, 100);
// Chart properties
ch.Border.Style := clsNoLine;

View File

@ -2196,7 +2196,7 @@ begin
// Rotated axis labels
angle := Axis.LabelRotation;
chartProps := chartProps + Format('style:rotation-angle="%d" ', [angle]);
chartProps := chartProps + Format('style:rotation-angle="%.1f" ', [angle], FPointSeparatorSettings);
// Label orientation
graphProps := 'svg:stroke-color="' + ColorToHTMLColorStr(Axis.AxisLine.Color) + '" ';
@ -2286,7 +2286,7 @@ begin
end;
chartProps := 'chart:auto-position="true" ';
chartProps := chartProps + Format('style:rotation-angle="%d" ', [rotAngle]);
chartProps := chartProps + Format('style:rotation-angle="%.1f" ', [rotAngle], FPointSeparatorSettings);
textProps := TsSpreadOpenDocWriter(Writer).WriteFontStyleXMLAsString(font);