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" : {
"Category" : "TAChart",
"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>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>

View File

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

View File

@ -39,6 +39,7 @@ type
procedure DistanceToolGetDistanceText(ASender: TDataPointDistanceTool;
var AText: String);
procedure FitSeriesFitComplete(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
@ -172,6 +173,13 @@ begin
FitSeries.Title := '<font color="blue">Fitted:</font> ' + s;
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);
begin
CreateData;