WebChart

From Xojo Documentation

Class (inherits from WebUIControl)


New in 2020r1

Displays data you provide in chart form of various types.

Events
Closed Opening Shown
ContextualMenuSelected OverrideOptions
Hidden Pressed
Properties
ContextualMenu LockBottom fa-lock-32.png Style
ControlID fa-lock-32.png LockHorizontal fa-lock-32.png TabIndex
DatasetCount fa-lock-32.png LockLeft fa-lock-32.png Title
Enabled LockRight fa-lock-32.png Tooltip
HasAnimation LockVertical fa-lock-32.png Top
HasLegend Mode fa-lock-32.png Visible
Height Name fa-lock-32.png Width
Indicator Page fa-lock-32.png
Left Parent fa-lock-32.png
Methods
AddDataset Close RemoveDatasetAt
AddDatasetAt DatasetAt RemoveLabelAt
AddDatasets ExecuteJavaScript SetFocus
AddLabel GotoURL Style
AddLabelAt LabelAt UpdateBrowser
AddLabels RemoveAllDatasets
Close RemoveAllLabels
Enumerations
Modes

Notes

If you wish to set the background color of the chart, do so via the Style property.

Sample Code

This code draws a Pie Chart (set the Mode property to Pie in the Inspector first):

Var data() As Double = Array(80.0, 12.0, 5.0, 3.0)
Var dataColors() As Color = Array(Color.Red, Color.Green, Color.Blue, Color.Orange)
Var dataLabels() As String = Array("Windows", "macOS", "Linux", "Other")

Var pieChart As New WebChartCircularDataset("Pie Data", data, dataColors)
Me.AddDataset(pieChart)

Me.AddLabels(dataLabels)

Compatibility

Web projects on all supported operating systems.

See Also

WebChartCircularDataset, WebChartDataset, WebChartLinearDataset and WebChartScatterDatapoint classes.