mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-05 04:17:54 +02:00
23 lines
535 B
ObjectPascal
23 lines
535 B
ObjectPascal
program demobubble;
|
|
|
|
{$MODE OBJFPC}
|
|
{$MODESWITCH EXTERNALCLASS}
|
|
|
|
uses
|
|
ChartJS;
|
|
|
|
var
|
|
config: TChartConfiguration;
|
|
dataset: TChartBubbleDataset;
|
|
begin
|
|
config := TChartConfiguration.new;
|
|
config.type_ := 'bubble';
|
|
dataset := TChartBubbleDataset.new;
|
|
dataset.label_ := 'First Dataset';
|
|
dataset.data := [TChartXYRData.new(20, 30, 15), TChartXYRData.new(40, 10, 10)];
|
|
dataset.backgroundColor := 'rgb(255, 99, 132)';
|
|
config.data := TChartData.new;
|
|
config.data.datasets := [dataset];
|
|
TChart.new('myChart', config);
|
|
end.
|