TAChart/examples: Improved form layout of html demo. Update meta data.

This commit is contained in:
wp_xyz 2022-05-13 14:22:25 +02:00
parent 0883c8c524
commit f026b9c30e
4 changed files with 22 additions and 12 deletions

View File

@ -1,5 +1,5 @@
{ "TAChart_html" : { { "TAChart_html" : {
"Category" : "TAChart", "Category" : "TAChart",
"Keywords" : ["TAChart", "html", "export", "svg", "Needs Work"], "Keywords" : ["TAChart", "html", "export", "svg", "Needs Work"],
"Description" : "Draws a chart with some HTML components although its not clear why it does so. Can save or export that chart in WMF (Windows only) or SVG. Can copy that chart, as a bitmap to clipboard (but see below).\n\nHas problems on Linux (at least).\n1. When click the SVG button, fails to load a FreeType font when running in the IDE. OK when standalone.\n2. When click \"copy to clipboard\", a crash is triggered (it should copy a bitmap image).\n3. Horiz size needs to be increased."} "Description" : "Draws a chart with HTML formatted text to enable sub-/superscripts or components although its not clear why it does so. Can save or export that chart in WMF (Windows only) or SVG. Can copy that chart, as a bitmap to clipboard (but see below).\n\nHas problems on Linux (at least).\n1. When click the SVG button, fails to load a FreeType font when running in the IDE. OK when standalone.\n2. When click \"copy to clipboard\", a crash is triggered (it should copy a bitmap image).\n3. Horiz size needs to be increased."}
} }

View File

@ -61,6 +61,7 @@
</SearchPaths> </SearchPaths>
<Linking> <Linking>
<Debugging> <Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseExternalDbgSyms Value="True"/> <UseExternalDbgSyms Value="True"/>
</Debugging> </Debugging>
<Options> <Options>

View File

@ -6,6 +6,8 @@ object MainForm: TMainForm
Caption = 'HTML demo' Caption = 'HTML demo'
ClientHeight = 452 ClientHeight = 452
ClientWidth = 656 ClientWidth = 656
Constraints.MinHeight = 400
OnActivate = FormActivate
OnCreate = FormCreate OnCreate = FormCreate
LCLVersion = '2.3.0.0' LCLVersion = '2.3.0.0'
object BottomPanel: TPanel object BottomPanel: TPanel
@ -26,7 +28,7 @@ object MainForm: TMainForm
Left = 0 Left = 0
Height = 78 Height = 78
Top = 8 Top = 8
Width = 338 Width = 330
AutoFill = True AutoFill = True
AutoSize = True AutoSize = True
BorderSpacing.InnerBorder = 4 BorderSpacing.InnerBorder = 4
@ -40,7 +42,7 @@ object MainForm: TMainForm
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 4 ChildSizing.ControlsPerLine = 4
ClientHeight = 58 ClientHeight = 58
ClientWidth = 334 ClientWidth = 326
Columns = 4 Columns = 4
Items.Strings = ( Items.Strings = (
'title' 'title'
@ -62,14 +64,13 @@ object MainForm: TMainForm
AnchorSideTop.Control = BottomPanel AnchorSideTop.Control = BottomPanel
AnchorSideRight.Control = BottomPanel AnchorSideRight.Control = BottomPanel
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 511 Left = 519
Height = 25 Height = 25
Top = 8 Top = 8
Width = 121 Width = 121
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Top = 8 BorderSpacing.Top = 8
BorderSpacing.Right = 8
Caption = 'Copy to clipboard' Caption = 'Copy to clipboard'
OnClick = BtnCopyToClipboardClick OnClick = BtnCopyToClipboardClick
TabOrder = 1 TabOrder = 1
@ -80,7 +81,7 @@ object MainForm: TMainForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BtnCopyToClipboard AnchorSideRight.Control = BtnCopyToClipboard
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 511 Left = 519
Height = 25 Height = 25
Top = 37 Top = 37
Width = 121 Width = 121
@ -97,7 +98,7 @@ object MainForm: TMainForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BtnCopyToClipboard AnchorSideRight.Control = BtnCopyToClipboard
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 511 Left = 519
Height = 25 Height = 25
Top = 66 Top = 66
Width = 121 Width = 121
@ -112,10 +113,10 @@ object MainForm: TMainForm
AnchorSideLeft.Control = CbRotateXLabels AnchorSideLeft.Control = CbRotateXLabels
AnchorSideTop.Control = CbRotateXLabels AnchorSideTop.Control = CbRotateXLabels
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 354 Left = 346
Height = 19 Height = 19
Top = 38 Top = 38
Width = 86 Width = 84
BorderSpacing.Top = 8 BorderSpacing.Top = 8
Caption = 'Right-to-left' Caption = 'Right-to-left'
OnChange = CbRTLChange OnChange = CbRTLChange
@ -127,10 +128,10 @@ object MainForm: TMainForm
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = BtnCopyToClipboard AnchorSideTop.Control = BtnCopyToClipboard
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 354 Left = 346
Height = 19 Height = 19
Top = 11 Top = 11
Width = 132 Width = 130
BorderSpacing.Left = 16 BorderSpacing.Left = 16
Caption = 'Rotate x labels by 45°' Caption = 'Rotate x labels by 45°'
OnChange = CbRotateXLabelsChange OnChange = CbRotateXLabelsChange

View File

@ -39,6 +39,7 @@ type
procedure DistanceToolGetDistanceText(ASender: TDataPointDistanceTool; procedure DistanceToolGetDistanceText(ASender: TDataPointDistanceTool;
var AText: String); var AText: String);
procedure FitSeriesFitComplete(Sender: TObject); procedure FitSeriesFitComplete(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
private private
@ -172,6 +173,13 @@ begin
FitSeries.Title := '<font color="blue">Fitted:</font> ' + s; FitSeries.Title := '<font color="blue">Fitted:</font> ' + s;
end; end;
procedure TMainForm.FormActivate(Sender: TObject);
begin
BottomPanel.Constraints.MinWidth := CbRotateXLabels.Left + CbRotateXLabels.Width +
BtnCopyToClipBoard.Width;
Constraints.MinWidth := BottomPanel.Constraints.MinWidth + BottomPanel.BorderSpacing.Left * 2;
end;
procedure TMainForm.FormCreate(Sender: TObject); procedure TMainForm.FormCreate(Sender: TObject);
begin begin
CreateData; CreateData;