Class
MobileChart
Description
Displays data you provide in chart form of various types.
Properties
Name |
Type |
Read-Only |
Shared |
---|---|---|---|
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
Methods
Name |
Parameters |
Returns |
Shared |
---|---|---|---|
constraint As iOSLayoutConstraint |
|||
child As MobileUIControl |
|||
dataset As ChartDataset |
|||
index As Integer, Dataset As ChartDataset |
|||
Datasets() As ChartDataset |
|||
name As String |
|||
names() As String |
|||
index As Integer |
|||
index As Integer |
|||
constraint As iOSLayoutConstraint |
|||
child As MobileUIControl |
|||
index As Integer |
|||
index As Integer |
|||
Events
Name |
Parameters |
Returns |
---|---|---|
dark As Boolean |
||
DataSet As ChartDataSet |
||
position As Point, pointerInfo() As PointerEvent |
||
position As Point, pointerInfo() As PointerEvent |
||
dataset As ChartDataset, index As Integer |
Enumerations
MobileChart.Modes
Modes
The various types of charts available.
Enum |
---|
Bar |
Bubble |
Doughnut |
Line |
Pie |
PolarArea |
Radar |
Scatter |
Property descriptions
MobileChart.AccessibilityHint
AccessibilityHint As String
The accessibility hint is a longer description that is read aloud when VoiceOver is enabled.
Me.AccessibilityHint = "Click to calculate the value and display the next screen."
MobileChart.AccessibilityLabel
AccessibilityLabel As String
The accessibility label of of a control is a short name that is read aloud when VoiceOver is enabled.
Me.AccessibilityLabel = "Calculate the value."
MobileChart.AllowPopover
AllowPopover As Boolean
If True, a popover will be displayed when the user positions the mouse over items that have additional information.
The default value is True.
MobileChart.BackgroundColor
BackgroundColor As ColorGroup
The color of the background of the chart.
MobileChart.ControlCount
ControlCount As Integer
The number of child controls in the control.
This property is read-only.
MobileChart.DatasetCount
DatasetCount As Integer
The number of datasets that have been added to the chart.
This property is read-only.
MobileChart.Enabled
Enabled As Boolean
When True the control is drawn enabled and responds to user action. When False, the control appears as disabled and does not respond to user actions.
MobileChart.GridColor
GridColor As ColorGroup
The color of the chart's grid.
MobileChart.HasLegend
HasLegend As Boolean
If True, the chart's legend will be displayed.
MobileChart.Height
Height As Integer
The height of the control.
MobileChart.Left
Left As Integer
The position of the left side of the control, relative to the screen.
MobileChart.LockBottom
LockBottom As Boolean
Determines whether the bottom edge of the control should stay at a set distance from the bottom edge of the parent control, if there is one, or the owning screen.
This property is read-only.
MobileChart.LockLeft
LockLeft As Boolean
Determines whether the left edge of the control should stay at a set distance from the left edge of the parent control, if there is one, or the owning screen.
This property is read-only.
MobileChart.LockRight
LockRight As Boolean
Determines whether the right edge of the control should stay at a set distance from the right edge of the parent control, if there is one, or the owning screen.
This property is read-only.
MobileChart.LockTop
LockTop As Boolean
Determines whether the top edge of the control should stay at a set distance from the top edge of the parent control, if there is one, or the owning screen.
This property is read-only.
MobileChart.Mode
Mode As Modes
Indicates the type of chart the control is currently displaying.
This property is read-only.
Labels are required for a Bar chart to draw.
This example checks the mode of the chart:
If Chart1.Mode = MobileChart.Modes.Bar then
Chart1.Title = "Sales Bar Chart"
End If
MobileChart.Name
Name As String
The name of the control.
This property is read-only.
MobileChart.Parent
Parent As Object
Used to get the control's parent control or page. If the parent control is a MobileContainer, then it returns the MobileContainer. If it is on a Screen, it returns the Screen.
This property is read-only.
MobileChart.PopoverBackgroundColor
PopoverBackgroundColor As ColorGroup
The background color of the chart's popover.
MobileChart.PopoverTextColor
PopoverTextColor As ColorGroup
The color of text in the chart's popover.
MobileChart.TabIndex
TabIndex As Integer
The control's position in the Tab Order. The control with a TabIndex of 0 is the first control to get the focus when the Screen is displayed.
This example sets the control's TabIndex.
Me.TabIndex = 2
Mobilechart.TextColor
TextColor As ColorGroup
Gets or sets the color of the text. The default value is black.
The following example sets the TextColor.
Me.TextColor = Color.Red
MobileChart.TextFont
TextFont As Font
The font used to display the text content.
You can use any font that is installed on the device.
The System font is the font used by the system software as its default font. Different operating systems use different default fonts. If the system software supports both a large and small System font, you can also specify the "SmallSystem" font.
On iOS, SmallSystem specifies the smaller system font.
This code sets the TextFont property to the System font.
Me.TextFont = Font.SystemFont
MobileChart.TintColor
TintColor As ColorGroup
Changes a control's tint color.
On iOS, the following controls support TintColor:
Enum |
Description |
---|---|
ProgressBar |
The area indicating the value of the control will be drawn in the TintColor. |
Slider |
The area indicating the value of the control will be drawn in the TintColor. |
TextArea |
The cursor and text highlight color will be drawn in the TintColor. |
TextField |
The cursor and text highlight color will be drawn in the TintColor. |
MobileChart.Title
Title As String
The title of the chart.
MobileChart.Tooltip
Tooltip As String
Text of a message displayed as a tooltip.
The tip is displayed when the user places the mouse on the control and leaves it there.
This code in the Opening event of a Button sets the tooltip:
Me.Tooltip = "Save changes"
MobileChart.Top
Top As Integer
The top of the control in local coordinates relative to the Screen.
MobileChart.Visible
Visible As Boolean
If True, the control is drawn. If False, it's not.
Hide a control based on a checkbox setting:
If ShowEmailCheckbox.Value Then
EmailField.Visible = True
Else
EmailField.Visible = False
End If
MobileChart.Width
Width As Integer
The width of the control.
This code in the Opening event handler increases the size of the control:
Me.Width = Me.Width + 50
Method descriptions
MobileChart.AddConstraint
AddConstraint(constraint As iOSLayoutConstraint)
Adds a constraint to the control.
This constraint is used by child controls that have been added to this control.
MobileChart.AddControl
AddControl(child As MobileUIControl)
Adds a child control to the control.
MobileChart.AddDataset
AddDataset(dataset As ChartDataset)
Adds the dataset to the chart. Incompatible datasets are ignored.
MobileChart.AddDatasetAt
AddDatasetAt(index As Integer, dataset As ChartDataset)
Adds the dataset to the chart at the index passed. Incompatible datasets are ignored.
MobileChart.AddDatasets
AddDatasets(datasets() As ChartDataset)
Adds the array of datasets to the chart.
MobileChart.AddLabel
AddLabel(name As String)
Adds the label to the chart.
MobileChart.AddLabelAt
AddLabelAt(index As String, name As String)
Adds the label to the chart at the index passed.
MobileChart.AddLabels
AddLabels(names() As String)
Adds the array of labels to the chart.
MobileChart.ClearFocus
ClearFocus
Removes the focus from the control.
TextField1.ClearFocus
MobileChart.ControlAt
ControlAt(index As Integer) As MobileUIControl
Gets the child control at the specified index.
MobileChart.Controls
Controls As Iterable
Allows you to iterate through all the controls that have been added to this control.
MobileChart.DatasetAt
DatasetAt(index As Integer) As ChartDataset
Returns the ChartDataset at the index passed.
MobileChart.Handle
Handle As Ptr
The a handle to the underlying native OS control.
MobileChart.LabelAt
LabelAt(index As Integer) As String
Returns the label at the index passed.
MobileChart.Refresh
Refresh
Marks the control so that it will be redrawn during the next event loop.
Call Refresh to force a Canvas to redraw itself:
Canvas1.Refresh
MobileChart.RemoveAllDatasets
RemoveAllDatasets
Removes all datasets from the chart.
MobileChart.RemoveAllLabels
RemoveAllLabels
Removes all labels from the chart.
MobileChart.RemoveConstraint
RemoveConstraint(constraint As iOSLayoutConstraint)
Removes a constraint from the control.
MobileChart.RemoveControl
RemoveControl(child As MobileUIControl)
Removes the control from the control.
MobileChart.RemoveDatasetAt
RemoveDatasetAt(index As Integer)
Removes the ChartDataset at the index passed.
MobileChart.RemoveLabelAt
RemoveLabelAt(index As Integer)
Removes the label at the index passed.
MobileChart.SetFocus
SetFocus
Sets the focus to the MobileChart control.
Event descriptions
MobileChart.AppearanceChanged
AppearanceChanged(dark As Boolean)
If dark is True then the device has switched to Dark mode. If False then the device has switched to Light mode.
MobileChart.Closing
Closing
The control is about to be removed from the Screen either because the Screen is closing or the control's Close method was called.
MobileChart.Error
Error(DataSet As ChartDataSet)
The chart either has no room to display the data or is too small to draw the grid. The DataSet is the ChartDataSet assigned to the control.
MobileChart.PointerDrag
PointerDrag(position As Point, pointerInfo() As PointerEvent)
Called when the pointing device (finger or pen) is dragged.
MobileChart.PointerUp
PointerUp(position As Point, pointerInfo() As PointerEvent)
Called when the pointing device (finger or pen) is raised or released.
MobileChart.Opening
Opening
The control has been created and the page is opening but has not been sent to the browser yet.
The Opening event handler can be used to initialize non-visual properties and settings for controls.
MobileChart.Pressed
Pressed(dataset As ChartDataset, index As Integer)
The user pressed on a part of the chart that represents data from the dataset.
Compatibility
Mobile projects on all supported operating systems.
See also
MobileCanvas parent class; ChartCircularDataset, ChartDataset, ChartLinearDataset and ChartScatterDatapoint classes.