diff --git a/components/fpspreadsheet/examples/visual/fpschart/fpschartlink/chart_demo.lpi b/components/fpspreadsheet/examples/visual/fpschart/fpschartlink/chart_demo.lpi
index dd2428053..8d6bdd549 100644
--- a/components/fpspreadsheet/examples/visual/fpschart/fpschartlink/chart_demo.lpi
+++ b/components/fpspreadsheet/examples/visual/fpschart/fpschartlink/chart_demo.lpi
@@ -4,6 +4,9 @@
+
+
+
@@ -14,8 +17,8 @@
-
-
+
+
@@ -24,32 +27,32 @@
-
- -
+
+
-
- -
+
+
-
- -
+
+
-
- -
+
+
-
+
-
-
+
+
-
-
+
+
-
+
@@ -72,23 +75,18 @@
-
-
-
-
-
-
- -
+
+
-
- -
+
+
-
- -
+
+
-
+
diff --git a/components/fpspreadsheet/examples/visual/fpschart/fpschartlink/main.lfm b/components/fpspreadsheet/examples/visual/fpschart/fpschartlink/main.lfm
index b8d2fb774..6f1251e50 100644
--- a/components/fpspreadsheet/examples/visual/fpschart/fpschartlink/main.lfm
+++ b/components/fpspreadsheet/examples/visual/fpschart/fpschartlink/main.lfm
@@ -105,7 +105,6 @@ object Form1: TForm1
'../../../other/chart/scatter_loglog.ods'
)
TabOrder = 0
- TextHint = 'Enter or select file name'
OnCloseUp = ComboBox1CloseUp
end
object Button1: TButton
diff --git a/components/fpspreadsheet/examples/visual/fpschart/fpschartlink/main.pas b/components/fpspreadsheet/examples/visual/fpschart/fpschartlink/main.pas
index 2ec734caf..fb71302f4 100644
--- a/components/fpspreadsheet/examples/visual/fpschart/fpschartlink/main.pas
+++ b/components/fpspreadsheet/examples/visual/fpschart/fpschartlink/main.pas
@@ -5,7 +5,8 @@ unit main;
interface
uses
- Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls,
+ Classes, SysUtils,
+ LCLVersion, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls,
TAGraph,
fpSpreadsheet, fpsTypes, fpsOpenDocument,
fpSpreadsheetCtrls, fpSpreadsheetGrid, fpSpreadsheetChart;
@@ -73,6 +74,9 @@ end;
procedure TForm1.FormCreate(Sender: TObject);
begin
+ {$IF LCL_FullVersion >= 2020000}
+ ComboBox1.TextHint := 'Enter or select file name';
+ {$IFEND}
if ParamCount > 0 then
begin
Combobox1.Text := ParamStr(1);
diff --git a/components/fpspreadsheet/source/visual/fpspreadsheetchart.pas b/components/fpspreadsheet/source/visual/fpspreadsheetchart.pas
index 729234939..cd5a0f059 100644
--- a/components/fpspreadsheet/source/visual/fpspreadsheetchart.pas
+++ b/components/fpspreadsheet/source/visual/fpspreadsheetchart.pas
@@ -18,7 +18,7 @@ interface
uses
// RTL/FCL
- Classes, Contnrs, SysUtils, Types,
+ Classes, Contnrs, SysUtils, Types, FPCanvas,
// LCL
LCLVersion, Forms, Controls, Graphics, GraphUtil, Dialogs,
// TAChart
@@ -1799,7 +1799,9 @@ begin
axis.TickLength := IfThen(catOutside in AWorkbookAxis.MajorTicks, 4, 0);
axis.TickInnerLength := IfThen(catInside in AWorkbookAxis.MajorTicks, 4, 0);
axis.TickColor := axis.AxisPen.Color;
+ {$IF LCL_FullVersion >= 3000000}
axis.TickWidth := axis.AxisPen.Width;
+ {$IFEND}
// Minor axis grid
if AWorkbookAxis.MinorGridLines.Style <> clsNoLine then
@@ -1814,7 +1816,9 @@ begin
minorAxis.TickLength := IfThen(catOutside in AWorkbookAxis.MinorTicks, 2, 0);
minorAxis.TickInnerLength := IfThen(catInside in AWorkbookAxis.MinorTicks, 2, 0);
minorAxis.TickColor := axis.AxisPen.Color;
+ {$IF LCL_FullVersion >= 3000000}
minorAxis.TickWidth := minorAxis.Grid.Width;
+ {$IFEND}
end;
// Inverted?
@@ -1921,7 +1925,9 @@ begin
h := mmToPx(img.Height, ppi);
png := TPortableNetworkGraphic.Create;
png.Assign(img.Image);
+ {$IF LCL_FullVersion >= 2020000}
ScaleImg(png, w, h);
+ {$IFEND}
FBrushBitmaps.Add(png);
ABrush.Bitmap := png;
end else
@@ -2023,8 +2029,10 @@ begin
case AWorkbookSeries.LabelPosition of
lpInside:
TPieSeries(AChartSeries).MarkPositions := pmpInside;
+ {$IF LCL_FullVersion >= 2020000}
lpCenter:
TPieSeries(AChartSeries).MarkPositionCentered := true;
+ {$IFEND}
else
TPieSeries(AChartSeries).MarkPositions := pmpAround;
end
@@ -2068,7 +2076,9 @@ begin
AChartTitle.Text.Clear;
AChartTitle.Text.Add(AWorkbookTitle.Caption);
AChartTitle.Visible := AWorkbookTitle.Visible;
+ {$IF LCL_FullVersion >= 2020000}
AChartTitle.WordWrap := true;
+ {$IFEND}
Convert_sFont_to_Font(AWorkbookTitle.Font, AChartTitle.Font);
UpdateChartPen(AWorkbookTitle.Chart, AWorkbookTitle.Border, AChartTitle.Frame);
UpdateChartBrush(AWorkbookTitle.Chart, AWorkbookTitle.Background, AChartTitle.Brush);
@@ -2119,11 +2129,13 @@ procedure TsWorkbookChartLink.UpdatePieSeries(AWorkbookSeries: TsPieSeries;
AChartSeries: TPieSeries);
begin
UpdateChartPen(AWorkbookSeries.Chart, AWorkbookSeries.Line, AChartSeries.EdgePen);
- AChartSeries.StartAngle := AWorkbookSeries.StartAngle;
AChartSeries.Legend.Multiplicity := lmPoint;
AChartSeries.Legend.Format := '%2:s';
+ {$IF LCL_FullVersion >= 2020000}
+ AChartSeries.StartAngle := AWorkbookSeries.StartAngle;
if AWorkbookSeries is TsRingSeries then
AChartSeries.InnerRadiusPercent := TsRingSeries(AWorkbookSeries).InnerRadiusPercent;
+ {$IFEND}
FChart.BottomAxis.Visible := false;
FChart.LeftAxis.Visible := false;
diff --git a/components/fpspreadsheet/source/visual/fpsstockseries.pas b/components/fpspreadsheet/source/visual/fpsstockseries.pas
index 8602e62ef..aa84cb7e5 100644
--- a/components/fpspreadsheet/source/visual/fpsstockseries.pas
+++ b/components/fpspreadsheet/source/visual/fpsstockseries.pas
@@ -73,12 +73,14 @@ type
function CalcTickWidth(AX: Double; AIndex: Integer): Double;
procedure GetLegendItems(AItems: TChartLegendItems); override;
function GetSeriesColor: TColor; override;
+ {$IF LCL_FullVersion >= 2020000}
class procedure GetXYCountNeeded(out AXCount, AYCount: Cardinal); override;
- function SkipMissingValues(AIndex: Integer): Boolean; override;
- function ToolTargetDistance(const AParams: TNearestPointParams;
- AGraphPt: TDoublePoint; APointIdx, AXIdx, AYIdx: Integer): Integer; override;
procedure UpdateLabelDirectionReferenceLevel(AIndex, AYIndex: Integer;
var ALevel: Double); override;
+ function SkipMissingValues(AIndex: Integer): Boolean; override;
+ {$IFEND}
+ function ToolTargetDistance(const AParams: TNearestPointParams;
+ AGraphPt: TDoublePoint; APointIdx, AXIdx, AYIdx: Integer): Integer; override;
public
procedure Assign(ASource: TPersistent); override;
constructor Create(AOwner: TComponent); override;
@@ -436,7 +438,7 @@ begin
end;
if Source[i]^.Color <> clTAColor then
begin
- ADrawer.SetPenParams(FPen[TOHLCPenKind(idx)].Style, Source[i]^.Color, FPen[TOHLCPenKind(idx)].Width);
+ ADrawer.SetPenParams(FPen[TOHLCPenKind(idx)].Style, Source[i]^.Color {$IF LCL_FUllVersion >= 2020000}, FPen[TOHLCPenKind(idx)].Width{$IFEND});
ADrawer.SetBrushParams(FBrush[TOHLCBrushKind(idx)].Style, Source[i]^.Color);
end;
@@ -448,10 +450,12 @@ begin
prevclose := yclose;
end;
+ {$IF LCL_FullVersion >= 2020000}
GetXYCountNeeded(nx, ny);
if Source.YCount > ny then
for i := 0 to ny-1 do DrawLabels(ADrawer, i)
else
+ {$ENDIF}
DrawLabels(ADrawer);
end;
@@ -580,11 +584,13 @@ begin
Result := LinePen.Color;
end;
+{$IF LCL_FullVersion >= 2020000}
class procedure TStockSeries.GetXYCountNeeded(out AXCount, AYCount: Cardinal);
begin
AXCount := 0;
AYCount := 4;
end;
+{$IFEND}
procedure TStockSeries.SetBrush(AIndex: TOHLCBrushKind; AValue: TOHLCBrush);
begin
@@ -649,12 +655,14 @@ begin
UpdateParentChart;
end;
+{$IF LCL_FullVersion >= 2020000}
function TStockSeries.SkipMissingValues(AIndex: Integer): Boolean;
begin
Result := IsNaN(Source[AIndex]^.Point);
if not Result then
Result := HasMissingYValue(AIndex, 4);
end;
+{$IFEND}
function TStockSeries.ToolTargetDistance(
const AParams: TNearestPointParams; AGraphPt: TDoublePoint;
@@ -716,6 +724,7 @@ begin
end;
end;
+{$IF LCL_FullVersion >= 2020000}
procedure TStockSeries.UpdateLabelDirectionReferenceLevel(
AIndex, AYIndex: Integer; var ALevel: Double);
var
@@ -732,5 +741,7 @@ begin
end;
{$ENDIF}
+{$ENDIF}
+
end.