Class

# DesktopChart

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Displays data you provide in chart form of various types.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                          | Type                                                       | Read-Only | Shared |
|---------------------------------------------------------------|------------------------------------------------------------|-----------|--------|
| `Active<desktopchart.active>`                                 | `Boolean</api/data_types/boolean>`                         | ✓         |        |
| `AllowAutoDeactivate<desktopchart.allowautodeactivate>`       | `Boolean</api/data_types/boolean>`                         |           |        |
| `AllowFocus<desktopchart.allowfocus>`                         | `Boolean</api/data_types/boolean>`                         |           |        |
| `AllowFocusRing<desktopchart.allowfocusring>`                 | `Boolean</api/data_types/boolean>`                         |           |        |
| `AllowTabs<desktopchart.allowtabs>`                           | `Boolean</api/data_types/boolean>`                         |           |        |
| `AllowTabStop<desktopchart.allowtabstop>`                     | `Boolean</api/data_types/boolean>`                         |           |        |
| `AllowPopover<desktopchart.allowpopover>`                     | `Boolean</api/data_types/boolean>`                         |           |        |
| `AutoCalculateYAxis<desktopchart.autocalculateyaxis>`         | `Boolean</api/data_types/boolean>`                         |           |        |
| `Backdrop<desktopchart.backdrop>`                             | `Picture</api/graphics/picture>`                           |           |        |
| `BackgroundColor<desktopchart.backgroundcolor>`               | `ColorGroup</api/graphics/colorgroup>`                     |           |        |
| `DatasetCount<desktopchart.datasetcount>`                     | `Integer</api/data_types/integer>`                         | ✓         |        |
| `DatasetLastIndex<desktopchart.datasetlastindex>`             | `Integer</api/data_types/integer>`                         | ✓         |        |
| `Enabled<desktopchart.enabled>`                               | `Boolean</api/data_types/boolean>`                         |           |        |
| `FontName<desktopchart.fontname>`                             | `String</api/data_types/string>`                           |           |        |
| `FontSize<desktopchart.fontsize>`                             | `Double</api/data_types/double>`                           |           |        |
| `Format<desktopchart.format>`                                 | `String</api/data_types/string>`                           |           |        |
| `GridColor<desktopchart.gridcolor>`                           | `ColorGroup</api/graphics/colorgroup>`                     |           |        |
| `Handle<desktopchart.handle>`                                 | `Ptr</api/data_types/additional_types/ptr>`                | ✓         |        |
| `HasLegend<desktopchart.haslegend>`                           | `Boolean</api/data_types/boolean>`                         |           |        |
| `Height<desktopchart.height>`                                 | `Integer</api/data_types/integer>`                         |           |        |
| `Index<desktopchart.index>`                                   | `Integer</api/data_types/integer>`                         |           |        |
| `IsGridVisible<desktopchart.isgridvisible>`                   | `Boolean</api/data_types/boolean>`                         |           |        |
| `IsYAxisVisible<desktopchart.isyaxisvisible>`                 | `Boolean</api/data_types/boolean>`                         |           |        |
| `IsXAxisVisible<desktopchart.isxaxisvisible>`                 | `Boolean</api/data_types/boolean>`                         |           |        |
| `LabelCount<desktopchart.LabelCount>`                         | `Integer</api/data_types/integer>`                         | ✓         |        |
| `LabelLastIndex<desktopchart.labellastindex>`                 | `Integer</api/data_types/integer>`                         | ✓         |        |
| `Left<desktopchart.left>`                                     | `Integer</api/data_types/integer>`                         |           |        |
| `LegendColor<desktopchart.gridcolor>`                         | `ColorGroup</api/graphics/colorgroup>`                     |           |        |
| `LegendFontName<desktopchart.legendfontname>`                 | `String</api/data_types/string>`                           |           |        |
| `LegendFontSize<desktopchart.legendfontsize>`                 | `Double</api/data_types/double>`                           |           |        |
| `LockBottom<desktopchart.lockbottom>`                         | `Boolean</api/data_types/boolean>`                         | ✓         |        |
| `LockLeft<desktopchart.lockleft>`                             | `Boolean</api/data_types/boolean>`                         | ✓         |        |
| `LockRight<desktopchart.lockright>`                           | `Boolean</api/data_types/boolean>`                         | ✓         |        |
| `LockTop<desktopchart.locktop>`                               | `Boolean</api/data_types/boolean>`                         | ✓         |        |
| `Mode<desktopchart.mode>`                                     | `Modes<desktopchart.modes>`                                |           |        |
| `MouseCursor<desktopchart.mousecursor>`                       | `MouseCursor</api/user_interface/desktop/mousecursor>`     |           |        |
| `Name<desktopchart.name>`                                     | `String</api/data_types/string>`                           | ✓         |        |
| `PanelIndex<desktopchart.panelindex>`                         | `Integer</api/data_types/integer>`                         |           |        |
| `Parent<desktopchart.parent>`                                 | `Object</api/data_types/additional_types/object>`          | ✓         |        |
| `PopoverBackgroundColor<desktopchart.Popoverbackgroundcolor>` | `ColorGroup</api/graphics/colorgroup>`                     |           |        |
| `PopoverTextColor<desktopchart.Popovertextcolor>`             | `ColorGroup</api/graphics/colorgroup>`                     |           |        |
| `ScaleFactor<desktopchart.scalefactor>`                       | `Double</api/data_types/double>`                           |           |        |
| `Scope<desktopchart.scope>`                                   | `Integer</api/data_types/integer>`                         | ✓         |        |
| `TabIndex<desktopchart.tabindex>`                             | `Integer</api/data_types/integer>`                         |           |        |
| `TextColor<desktopchart.textcolor>`                           | `ColorGroup</api/graphics/colorgroup>`                     |           |        |
| `Title<desktopchart.title>`                                   | `String</api/data_types/string>`                           |           |        |
| `TitleColor<desktopchart.titlecolor>`                         | `ColorGroup</api/graphics/colorgroup>`                     |           |        |
| `TitleFontName<desktopchart.titlefontname>`                   | `String</api/data_types/string>`                           |           |        |
| `TitleFontSize<desktopchart.titlefontsize>`                   | `Double</api/data_types/double>`                           |           |        |
| `Tooltip<desktopchart.tooltip>`                               | `String</api/data_types/string>`                           |           |        |
| `Top<desktopchart.top>`                                       | `Integer</api/data_types/integer>`                         |           |        |
| `Transparent<desktopchart.transparent>`                       | `Boolean</api/data_types/boolean>`                         |           |        |
| `Visible<desktopchart.visible>`                               | `Boolean</api/data_types/boolean>`                         |           |        |
| `Width<desktopchart.width>`                                   | `Integer</api/data_types/integer>`                         |           |        |
| `Window<desktopchart.window>`                                 | `DesktopWindow</api/user_interface/desktop/desktopwindow>` | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                | Parameters                                                                                                                                                                                                                                                                                                                                                                 | Returns                                                 | Shared |
|-----------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|--------|
| `AcceptFileDrop<desktopchart.acceptfiledrop>`       | FileType As `String</api/data_types/string>`                                                                                                                                                                                                                                                                                                                               |                                                         |        |
| `AcceptPictureDrop<desktopchart.acceptpicturedrop>` |                                                                                                                                                                                                                                                                                                                                                                            |                                                         |        |
| `AcceptRawDataDrop<desktopchart.acceptrawdatadrop>` | Type As `String</api/data_types/string>`                                                                                                                                                                                                                                                                                                                                   |                                                         |        |
| `AcceptTextDrop<desktopchart.accepttextdrop>`       |                                                                                                                                                                                                                                                                                                                                                                            |                                                         |        |
| `AddDataset<desktopchart.adddataset>`               | dataset As `ChartDataset</api/user_interface/charts/chartdataset>`                                                                                                                                                                                                                                                                                                         |                                                         |        |
| `AddDatasetAt<desktopchart.adddatasetat>`           | index As `Integer</api/data_types/integer>`, Dataset As `ChartDataset</api/user_interface/charts/chartdataset>`                                                                                                                                                                                                                                                            |                                                         |        |
| `AddDatasets<desktopchart.adddatasets>`             | Datasets() As `ChartDataset</api/user_interface/charts/chartdataset>`                                                                                                                                                                                                                                                                                                      |                                                         |        |
| `AddLabel<desktopchart.addlabel>`                   | name As `String</api/data_types/string>`                                                                                                                                                                                                                                                                                                                                   |                                                         |        |
| `AddLabelAt<desktopchart.addlabelat>`               | index As `String</api/data_types/string>`, name As `String</api/data_types/string>`                                                                                                                                                                                                                                                                                        |                                                         |        |
| `AddLabels<desktopchart.addlabels>`                 | names() As `String</api/data_types/string>`                                                                                                                                                                                                                                                                                                                                |                                                         |        |
| `Close<desktopchart.close>`                         |                                                                                                                                                                                                                                                                                                                                                                            |                                                         |        |
| `DatasetAt<desktopchart.datasetat>`                 | index As `Integer</api/data_types/integer>`                                                                                                                                                                                                                                                                                                                                | `ChartDataset</api/user_interface/charts/chartdataset>` |        |
| `Datasets<desktopchart.datasets>`                   |                                                                                                                                                                                                                                                                                                                                                                            | `Iterable</api/language/iterable>`                      |        |
| `DrawInto<desktopchart.drawinto>`                   | g As `Graphics</api/graphics/graphics>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`                                                                                                                                                                                                                                                  |                                                         |        |
| `LabelAt<desktopchart.labelat>`                     | index As `Integer</api/data_types/integer>`                                                                                                                                                                                                                                                                                                                                | `String</api/data_types/string>`                        |        |
| `Labels<desktopchart.labels>`                       |                                                                                                                                                                                                                                                                                                                                                                            | `Iterable</api/language/iterable>`                      |        |
| `Refresh<desktopchart.refresh>`                     | immediately As `Boolean</api/data_types/boolean>` = `False</api/language/false>`                                                                                                                                                                                                                                                                                           |                                                         |        |
|                                                     | x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, width As `Integer</api/data_types/integer>`, height As `Integer</api/data_types/integer>`, immediately As `Boolean</api/data_types/boolean>` = `False</api/language/false>`                                                                                                              |                                                         |        |
| `RemoveAllDatasets<desktopchart.removealldatasets>` |                                                                                                                                                                                                                                                                                                                                                                            |                                                         |        |
| `RemoveAllLabels<desktopchart.removealllabels>`     |                                                                                                                                                                                                                                                                                                                                                                            |                                                         |        |
| `RemoveDatasetAt<desktopchart.removedatasetat>`     | index As `Integer</api/data_types/integer>`                                                                                                                                                                                                                                                                                                                                |                                                         |        |
| `RemoveLabelAt<desktopchart.removelabelat>`         | index As `Integer</api/data_types/integer>`                                                                                                                                                                                                                                                                                                                                |                                                         |        |
| `Scroll<desktopchart.scroll>`                       | dx As `Integer</api/data_types/integer>`, dy As `Integer</api/data_types/integer>`, x As `Integer</api/data_types/integer>` = 0, y As `Integer</api/data_types/integer>` = 0, width As `Integer</api/data_types/integer>` = -10000, height As `Integer</api/data_types/integer>` = -10000, moveControls As `Boolean</api/data_types/boolean>` = `True</api/language/true>` |                                                         |        |
| `SetFocus<desktopchart.setfocus>`                   |                                                                                                                                                                                                                                                                                                                                                                            |                                                         |        |
| `ToPicture<desktopchart.topicture>`                 | width As `Double</api/data_types/double>` = -1, height As `Double</api/data_types/double>` = -1                                                                                                                                                                                                                                                                            | `Picture</api/graphics/picture>`                        |        |

## Events

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                            | Parameters                                                                                                                                                                                                                                 | Returns                            |
|-----------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| `Activated<desktopchart.activated>`                             |                                                                                                                                                                                                                                            |                                    |
| `Closing<desktopchart.closing>`                                 |                                                                                                                                                                                                                                            |                                    |
| `ConstructContextualMenu<desktopchart.constructcontextualmenu>` | base As `DesktopMenuItem</api/user_interface/desktop/desktopmenuitem>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`                                                                                   | `Boolean</api/data_types/boolean>` |
| `ContextualMenuSelected<desktopchart.contextualmenuselected>`   | selectedItem As `DesktopMenuItem</api/user_interface/desktop/desktopmenuitem>`                                                                                                                                                             |                                    |
| `Deactivated<desktopchart.deactivated>`                         |                                                                                                                                                                                                                                            |                                    |
| `DragEnter<desktopchart.dragenter>`                             | obj As `DragItem</api/user_interface/desktop/dragitem>`, Action As `DragItem.Types<dragitem.types>`                                                                                                                                        | `Boolean</api/data_types/boolean>` |
| `DragExit<desktopchart.dragexit>`                               | obj As `DragItem</api/user_interface/desktop/dragitem>`, Action As `DragItem.Types<dragitem.types>`                                                                                                                                        |                                    |
| `DragOver<desktopchart.dragover>`                               | x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, obj As `DragItem</api/user_interface/desktop/dragitem>`, Action As `DragItem.Types<dragitem.types>`                                                      | `Boolean</api/data_types/boolean>` |
| `DrawMouseOverPointAt<desktopchart.drawmouseoverpointat>`       | g As `Graphics</api/graphics/graphics>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, dataset As `ChartDataset</api/user_interface/charts/chartdataset>`, index As `Integer</api/data_types/integer>` | `Boolean</api/data_types/boolean>` |
| `DrawPointAt<desktopchart.drawpointat>`                         | x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, dataset As `ChartDataset</api/user_interface/charts/chartdataset>`, index As `Integer</api/data_types/integer>`                                          | `Boolean</api/data_types/boolean>` |
| `DropObject<desktopchart.dropobject>`                           | Obj As `DragItem</api/user_interface/desktop/dragitem>`, Action As `DragItem.Types<dragitem.types>`                                                                                                                                        |                                    |
| `Error<desktopchart.error>`                                     | DataSet As `ChartDataSet</api/user_interface/charts/chartdataset>`                                                                                                                                                                         |                                    |
| `FocusLost<desktopchart.focuslost>`                             |                                                                                                                                                                                                                                            |                                    |
| `FocusReceived<desktopchart.focusreceived>`                     |                                                                                                                                                                                                                                            |                                    |
| `KeyDown<desktopchart.keydown>`                                 | Key As `String</api/data_types/string>`                                                                                                                                                                                                    | `Boolean</api/data_types/boolean>` |
| `KeyUp<desktopchart.keyup>`                                     | Key As `String</api/data_types/string>`                                                                                                                                                                                                    |                                    |
| `MenuBarSelected<desktopchart.menubarselected>`                 |                                                                                                                                                                                                                                            |                                    |
| `Opening<desktopchart.opening>`                                 |                                                                                                                                                                                                                                            |                                    |
| `PaintAfter<desktopchart.paintafter>`                           | g As `Graphics</api/graphics/graphics>`                                                                                                                                                                                                    |                                    |
| `PaintBefore<desktopchart.paintbefore>`                         | g As `Graphics</api/graphics/graphics>`                                                                                                                                                                                                    |                                    |
| `Pressed<desktopchart.pressed>`                                 | dataset As `ChartDataset</api/user_interface/charts/chartdataset>`, index As `Integer</api/data_types/integer>`                                                                                                                            |                                    |

## Enumerations

<div id="desktopchart.modes">

<div class="rst-class">

forsearch

</div>

</div>

DesktopChart.Modes

### Modes

> The various types of charts available.
>
> | Enum      |
> |-----------|
> | Bar       |
> | Bubble    |
> | Doughnut  |
> | Line      |
> | Pie       |
> | PolarArea |
> | Radar     |
> | Scatter   |
> | Stacked   |

## Property descriptions

<div id="desktopchart.active">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Desktopchart.Active

**Active** As `Boolean</api/data_types/boolean>`

> Indicates whether the <span class="title-ref">DesktopChart</span> is active.
>
> Active is `False</api/language/false>` when the control's window is not in the foreground. When a `DesktopWindow</api/user_interface/desktop/desktopwindow>` is deactivated, its controls are automatically deactivated unless `AllowAutoDeactivate<desktopchart.allowautodeactivate>` is set to `False</api/language/false>`.
>
> This property is read-only.

<div id="desktopchart.allowautodeactivate">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AllowAutoDeactivate

**AllowAutoDeactivate** As `Boolean</api/data_types/boolean>`

> Determines whether the control should be deactivated (on macOS) when the parent window is deactivated. The default is `True</api/language/true>`.

<div id="desktopchart.allowfocus">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AllowFocus

**AllowFocus** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the <span class="title-ref">DesktopChart</span> will be included in the Tab order and can accept the focus. The `FocusReceived<desktopchart.focusreceived>` and `FocusLost<desktopchart.focuslost>` events are called at the appropriate times.
>
> This code enables the AllowFocus property. It is in the Opening event of the control.
>
> ``` xojo
> Me.AllowFocus = True
> ```

<div id="desktopchart.allowfocusring">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AllowFocusRing

**AllowFocusRing** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the <span class="title-ref">DesktopChart</span> indicates that it has the focus with a ring around its border; if `False</api/language/false>`, the appearance of the object does not change when it has the focus.
>
> Setting this property to `True</api/language/true>` has no effect on Windows or Linux. The default is `True</api/language/true>`.
>
> This code turns AllowFocusRing off.
>
> ``` xojo
> Me.AllowFocusRing = False
> ```

<div id="desktopchart.allowpopover">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AllowPopover

**AllowPopover** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, a popover will be displayed when the user positions the mouse over items that have additional information.
>
> The default value is `True</api/language/true>`.

<div id="desktopchart.allowtabs">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AllowTabs

**AllowTabs** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>` and `AllowFocus<desktopchart.allowfocus>` is `True</api/language/true>`, then pressing Tab triggers the KeyDown event for processing. The default is `False</api/language/false>`.
>
> If `False</api/language/false>`, pressing the Tab key does not trigger the KeyDown event; pressing Tab triggers the FocusLost Event and selects the next object in the window that can accept the focus.
>
> The following turns on AllowTabs.
>
> ``` xojo
> Me.AllowTabs = True
> ```

<div id="desktopchart.allowtabstop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AllowTabStop

**AllowTabStop** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the control is in the Tab Order and accepts the focus when the user tabs into it. The default is `True</api/language/true>`. If `False</api/language/false>`, the user cannot tab into it to give it the focus. However, the control can gain the focus by other means, such as the user's clicking on it or by setting the focus in code.
>
> This example removes the control from the Tab Order:
>
> ``` xojo
> Me.AllowTabStop = False
> ```

<div id="desktopchart.autocalculateyaxis">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AutoCalculateYAxis

**AutoCalculateYAxis** As `Boolean</api/data_types/boolean>`

> If `False</api/language/false>`, the Y axis for Line and Bar charts will start at 0.
>
> This property is `True</api/language/true>` by default.

<div id="desktopchart.backdrop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Backdrop

**Backdrop** As `Picture</api/graphics/picture>`

> The passed `Picture</api/graphics/picture>` that will automatically be drawn behind the chart data.
>
> The following code assigns a jpg image to the Backdrop. The image has been added to the project. The code is in the Opening event.
>
> ``` xojo
> Me.BackDrop = HouseImage
> ```

<div id="desktopchart.backgroundcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.BackgroundColor

**BackgroundColor** As `ColorGroup</api/graphics/colorgroup>`

> The color of the background of the chart.

<div id="desktopchart.datasetcount">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.DatasetCount

**DatasetCount** As `Integer</api/data_types/integer>`

> The number of datasets that have been added to the chart.
>
> This property is read-only.

<div id="desktopchart.datasetlastindex">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.DatasetLastIndex

**DatasetLastIndex** As `Integer</api/data_types/integer>`

> The index of last dataset added to the chart.
>
> This property is read-only.

<div id="desktopchart.enabled">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Enabled

**Enabled** As `Boolean</api/data_types/boolean>`

> When `True</api/language/true>` the control is drawn enabled and responds to user action. When `False</api/language/false>`, the control appears as disabled and does not respond to user actions.

<div id="desktopchart.fontname">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.FontName

**FontName** As `String</api/data_types/string>`

> Name of the font used to display the text content.
>
> You can enter any font that is installed on the computer or the names of the two metafonts, "System" and "SmallSystem".
>
> 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 as your FontName.
>
> On macOS, "SmallSystem" specifies the OS's smaller system font and may make the control smaller in size as well. On Windows and Linux, "SmallSystem" is the same as "System".
>
> This code sets the FontName property.
>
> ``` xojo
> Me.FontName = "Helvetica"
> ```

<div id="desktopchart.fontsize">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.FontSize

**FontSize** As `Double</api/data_types/double>`

> Point size of the font used to display the caption.
>
> If you enter zero as the FontSize, your app will use the font size that works best for the platform on which it is running.
>
> This code sets the font size to 16 points.
>
> ``` xojo
> Me.FontSize = 16
> ```

<div id="desktopchart.format">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Format

**Format** As `String</api/data_types/string>`

> Used to format axis values.
>
> It uses the same formatting conventions as the `Format</api/text/format>` function.

<div id="desktopchart.gridcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.GridColor

**GridColor** As `ColorGroup</api/graphics/colorgroup>`

> The color of the chart's grid.

<div id="desktopchart.handle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Handle

**Handle** As `Ptr</api/data_types/additional_types/ptr>`

> Returns a handle to the control.
>
> This property is read-only.
>
> For interfacing with Mac APIs using `Declares</api/language/declare>`, **DesktopControl.Handle** returns NSViews (except for `DesktopToolbar</api/user_interface/desktop/desktoptoolbar>`).
>
> On Windows returns the HWND of the control.
>
> On Linux it returns a GtkWidget.
>
> The following gets a handle to the control.
>
> ``` xojo
> Var p As Ptr = Me.Handle
> ```

<div id="desktopchart.haslegend">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.HasLegend

**HasLegend** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the chart's legend will be displayed.

<div id="desktopchart.height">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Height

**Height** As `Integer</api/data_types/integer>`

> The height (in points) of the control.

<div id="desktopchart.index">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Index

**Index** As `Integer</api/data_types/integer>`

> If the control is used in a control set, this specifies the control's index in the set.

<div id="desktopchart.isgridvisible">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.IsGridVisible

**IsGridVisible** As `Boolean</api/data_types/boolean>`

> Determines if the grid will be drawn or not.

<div id="desktopchart.isyaxisvisible">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.IsYAxisVisible

**IsYAxisVisible** As `Boolean</api/data_types/boolean>`

> Determines if the Y axis will be drawn or not.

<div id="desktopchart.isxaxisvisible">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.IsXAxisVisible

**IsXAxisVisible** As `Boolean</api/data_types/boolean>`

> Determines if the X axis will be drawn or not.

<div id="desktopchart.labelcount">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.LabelCount

**LabelCount** As `Integer</api/data_types/integer>`

> The number of labels in the chart.
>
> This property is read-only.

<div id="desktopchart.labellastindex">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.LabelLastIndex

**LabelLastIndex** As `Integer</api/data_types/integer>`

> The index of last label added to the chart.
>
> This property is read-only.

<div id="desktopchart.left">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Left

**Left** As `Integer</api/data_types/integer>`

> The position of the left side of the control in pixels, relative to the window.

<div id="desktopchart.legendcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.LegendColor

**TextColor** As `ColorGroup</api/graphics/colorgroup>`

> Gets or sets the color of the legend. The default value is black.
>
> The following example sets the LegendColor.
>
> ``` xojo
> Me.LegendColor = Color.Red
> ```

<div id="desktopchart.legendfontname">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.LegendFontName

**TitleFontName** As `String</api/data_types/string>`

> Name of the font used to display the chart legend.
>
> You can enter any font that is installed on the computer or the names of the two metafonts, "System" and "SmallSystem".
>
> 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 as your FontName.
>
> On macOS, "SmallSystem" specifies the OS's smaller system font and may make the control smaller in size as well. On Windows and Linux, "SmallSystem" is the same as "System".
>
> This code sets the FontName property.
>
> ``` xojo
> Me.LegendFontName = "Helvetica"
> ```

<div id="desktopchart.legendfontsize">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.LegendFontSize

**LegendFontSize** As `Double</api/data_types/double>`

> Point size of the font used to display the legend.
>
> If you enter zero as the FontSize, your app will use the font size that works best for the platform on which it is running.
>
> This code sets the font size to 16 points.
>
> ``` xojo
> Me.LegendFontSize = 16
> ```

<div id="desktopchart.lockbottom">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.LockBottom

**LockBottom** As `Boolean</api/data_types/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 window.
>
> This property is read-only.

<div id="desktopchart.lockleft">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.LockLeft

**LockLeft** As `Boolean</api/data_types/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 window.
>
> This property is read-only.

<div id="desktopchart.lockright">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.LockRight

**LockRight** As `Boolean</api/data_types/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 window.
>
> This property is read-only.

<div id="desktopchart.locktop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.LockTop

**LockTop** As `Boolean</api/data_types/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 window.
>
> This property is read-only.

<div id="desktopchart.mode">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Mode

**Mode** As `Modes<desktopchart.modes>`

> Indicates the type of chart the control is currently displaying.
>
> Labels are required for a Bar chart to draw.
>
> This example checks the mode of the chart:
>
> ``` xojo
> If Chart1.Mode = DesktopChart.Modes.Bar then
>   Chart1.Title = "Sales Bar Chart"
> End If
> ```

<div id="desktopchart.mousecursor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.MouseCursor

**MouseCursor** As `MouseCursor</api/user_interface/desktop/mousecursor>`

> The cursor to be displayed while the mouse is within the control and both the `DesktopApplication</api/user_interface/desktop/desktopapplication>` and `DesktopWindow</api/user_interface/desktop/desktopwindow>` class's MouseCursor properties are `Nil</api/language/nil>`.
>
> If the `DesktopApplication</api/user_interface/desktop/desktopapplication>` class's MouseCursor property is not `Nil</api/language/nil>` or the `DesktopWindow</api/user_interface/desktop/desktopwindow>`'s MouseCursor property is not `Nil</api/language/nil>`, then any control's MouseCursor property is ignored. You can use a cursor stored in the `Cursors</api/user_interface/desktop/cursors>` module. On macOS, you can also obtain a `MouseCursor</api/user_interface/desktop/mousecursor>` from a resource file.
>
> This line in the Opening event of the control sets the default cursor to the finger pointer.
>
> ``` xojo
> Me.MouseCursor = System.Cursors.FingerPointer
> ```

<div id="desktopchart.name">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Name

**Name** As `String</api/data_types/string>`

> The name of the control.
>
> This property is read-only.

<div id="desktopchart.panelindex">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.PanelIndex

**PanelIndex** As `Integer</api/data_types/integer>`

> If the control has been placed on a `DesktopTabPanel</api/user_interface/desktop/desktoptabpanel>` or `DesktopPagePanel</api/user_interface/desktop/desktoppagepanel>` control, this is the panel (page/tab) that the control is on. If the control is not on a panel, it returns -1.
>
> The first panel is numbered zero. If the control has been placed on a panel of a `DesktopTabPanel</api/user_interface/desktop/desktoptabpanel>` or `DesktopPagePanel</api/user_interface/desktop/desktoppagepanel>` control, it returns the panel number. If the control is not on a `DesktopPagePanel</api/user_interface/desktop/desktoppagepanel>` or `DesktopTabPanel</api/user_interface/desktop/desktoptabpanel>`, it returns -1. If you change the PanelIndex to a nonexistent panel, the control will disappear until you give it a PanelIndex value that corresponds to a panel that exists.
>
> If you are looking to change the currently selected panel (page/tab), use `DesktopPagePanel<desktoppagepanel.selectedpanelindex>`.
>
> This code displays the panel index of the control that is on the page.
>
> ``` xojo
> MessageBox(Me.SelectedPanelIndex.ToString)
> ```

<div id="desktopchart.parent">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Parent

**Parent** As `Object</api/data_types/additional_types/object>`

> Used to get the control's parent control or page. If the parent control is a `DesktopContainer</api/user_interface/desktop/desktopcontainer>`, then it returns the `DesktopContainer</api/user_interface/desktop/desktopcontainer>`. If it is on a `DesktopWindow</api/user_interface/desktop/desktopwindow>`, it returns the `DesktopWindow</api/user_interface/desktop/desktopwindow>`.
>
> This property is read-only.

<div id="desktopchart.Popoverbackgroundcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.PopoverBackgroundColor

**PopoverBackgroundColor** As `ColorGroup</api/graphics/colorgroup>`

> The background color of the chart's popover.

<div id="desktopchart.Popovertextcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.PopoverTextColor

**PopoverTextColor** As `ColorGroup</api/graphics/colorgroup>`

> The color of text in the chart's popover.

<div id="desktopchart.scalefactor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.ScaleFactor

**ScaleFactor** As `Double</api/data_types/double>`

> The scale factor used when converting user space coordinates to backing store coordinates for the <span class="title-ref">DesktopChart</span>.

<div id="desktopchart.scope">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Scope

**Scope** As `Integer</api/data_types/integer>`

> Used to determine whether access to the control is Public (0) or Private (2). The default is Public.
>
> This property is read-only.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> This is a designtime-only property and thus can only be set in the Inspector and is not accessible via code.
>
> </div>
>
> If the Scope of a control is set to Private, it cannot be accessed from outside its parent window.

<div id="desktopchart.tabindex">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.TabIndex

**TabIndex** As `Integer</api/data_types/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 window opens.
>
> This example sets the control's TabIndex.
>
> ``` xojo
> Me.TabIndex = 2
> ```

<div id="desktopchart.titlecolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.TitleColor

**TitleColor** As `ColorGroup</api/graphics/colorgroup>`

> Gets or sets the color of the title. The default value is black.
>
> The following example sets the <span class="title-ref">TitleColor</span>.
>
> ``` xojo
> Me.TitleColor = Color.Red
> ```

<div id="desktopchart.textcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.TextColor

**TextColor** As `ColorGroup</api/graphics/colorgroup>`

> Gets or sets the color of the text. The default value is black.
>
> The following example sets the TextColor.
>
> ``` xojo
> Me.TextColor = Color.Red
> ```

<div id="desktopchart.title">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Title

**Title** As `String</api/data_types/string>`

> The title of the chart.

<div id="desktopchart.titlefontname">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.TitleFontName

**TitleFontName** As `String</api/data_types/string>`

> Name of the font used to display the chart title.
>
> You can enter any font that is installed on the computer or the names of the two metafonts, "System" and "SmallSystem".
>
> 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 as your FontName.
>
> On macOS, "SmallSystem" specifies the OS's smaller system font and may make the control smaller in size as well. On Windows and Linux, "SmallSystem" is the same as "System".
>
> This code sets the FontName property.
>
> ``` xojo
> Me.TitleFontName = "Helvetica"
> ```

<div id="desktopchart.titlefontsize">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.TitleFontSize

**TitleFontSize** As `Double</api/data_types/double>`

> Point size of the font used to display the title.
>
> If you enter zero as the FontSize, your app will use the font size that works best for the platform on which it is running.
>
> This code sets the font size to 16 points.
>
> ``` xojo
> Me.TitleFontSize = 16
> ```

<div id="desktopchart.tooltip">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Tooltip

**Tooltip** As `String</api/data_types/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:
>
> ``` xojo
> Me.Tooltip = "Save changes"
> ```

<div id="desktopchart.top">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Top

**Top** As `Integer</api/data_types/integer>`

> The top of the control in local coordinates relative to the window.

<div id="desktopchart.transparent">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Transparent

**Transparent** As `Boolean</api/data_types/boolean>`

> Determines whether the control is transparent on Windows. The default is `False</api/language/false>`. Has no effect on macOS or Linux.
>
> Transparent controls draw more slowly and use more memory in order to cache the background. Unless you absolutely require transparency, leave this set to `False</api/language/false>`.
>
> For projects that were created prior to 2018r1, this property defaults to `True</api/language/true>` to emulate previous behavior. Consider changing it to `False</api/language/false>` to improve performance if you do not require transparency.

<div id="desktopchart.visible">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Visible

**Visible** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the control is drawn. If `False</api/language/false>`, it's not.
>
> Hide a control based on a checkbox setting:
>
> ``` xojo
> If ShowEmailCheckbox.Value Then
>   EmailField.Visible = True
> Else
>   EmailField.Visible = False
> End If
> ```

<div id="desktopchart.width">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Width

**Width** As `Integer</api/data_types/integer>`

> The width (in points) of the control.
>
> This code in the Shown event handler increases the size of the control:
>
> ``` xojo
> Me.Width = Me.Width + 50
> ```

<div id="desktopchart.window">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Window

**Window** As `DesktopWindow</api/user_interface/desktop/desktopwindow>`

> The control's parent window.
>
> This property is read-only.
>
> This code gets the parent window's Title property.
>
> ``` xojo
> MessageBox(Me.Window.Title)
> ```

## Method descriptions

<div id="desktopchart.acceptfiledrop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AcceptFileDrop

**AcceptFileDrop**(FileType As `String</api/data_types/string>`)

> Permits documents of type *FileType* to be dropped on the control. *FileType* must be a file type that you defined in via the `FileType</api/files/filetype>` class or the File Type Sets Editor.
>
> This code in the Opening event makes it possible for the user to drop either a picture or a file that is a jpeg image. The File Type Sets editor was used to define the “image/jpeg” file type. It is one of the “Common File Types” that is available in the editor.
>
> ``` xojo
> Me.AcceptPictureDrop
> Me.AcceptFileDrop("image/jpeg")
> ```
>
> To restrict file drops to just folders (and not files), you can put this code in the `DragEnter<desktopchart.dragenter>` event:
>
> ``` xojo
> If Not obj.FolderItem.IsFolder Then Return True
> ```

<div id="desktopchart.acceptpicturedrop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AcceptPictureDrop

**AcceptPictureDrop**

> Permits pictures to be dropped on the control.
>
> If a control should accept pictures in a drag and drop, then AcceptPictureDrop needs to be called prior to the drop. Typically, it is in the Opening event of the control itself. For example, the line:
>
> ``` xojo
> Me.AcceptPictureDrop
> ```
>
> in the Opening event of the control that will receive the dragged pictures is needed. When the picture is dropped, the `DropObject<desktopchart.dropobject>` event is called and this is where you will put your code to handle the drop.
>
> Opening Event:
>
> ``` xojo
> Me.AcceptPictureDrop
> ```
>
> DropObject Event:
>
> ``` xojo
> If obj.PictureAvailable Then
>     Me.Backdrop = obj.Picture
> End If
> ```

<div id="desktopchart.acceptrawdatadrop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AcceptRawDataDrop

**AcceptRawDataDrop**(Type As `String</api/data_types/string>`)

> Permits data (of the Type specified) to be dropped on the control.
>
> The following specfies a generic file type defined in the File Type Sets editor.
>
> ``` xojo
> Me.AcceptRawDataDrop("????")
> ```

<div id="desktopchart.accepttextdrop">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AcceptTextDrop

**AcceptTextDrop**

> Permits text to be dropped on the control.
>
> This line in the Opening event of a control that can accept dragged text.
>
> ``` xojo
> Me.AcceptTextDrop
> ```

<div id="desktopchart.adddataset">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AddDataset

**AddDataset**(dataset As `ChartDataset</api/user_interface/charts/chartdataset>`)

> Adds the dataset to the chart. Incompatible datasets are ignored.

<div id="desktopchart.adddatasetat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AddDatasetAt

**AddDatasetAt**(index As `Integer</api/data_types/integer>`, dataset As `ChartDataset</api/user_interface/charts/chartdataset>`)

> Adds the dataset to the chart at the index passed. Incompatible datasets are ignored.

<div id="desktopchart.adddatasets">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AddDatasets

**AddDatasets**(datasets() As `ChartDataset</api/user_interface/charts/chartdataset>`)

> Adds the array of datasets to the chart.

<div id="desktopchart.addlabel">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AddLabel

**AddLabel**(name As `String</api/data_types/string>`)

> Adds the label to the chart.

<div id="desktopchart.addlabelat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AddLabelAt

**AddLabelAt**(index As `String</api/data_types/string>`, name As `String</api/data_types/string>`)

> Adds the label to the chart at the index passed.

<div id="desktopchart.addlabels">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.AddLabels

**AddLabels**(names() As `String</api/data_types/string>`)

> Adds the array of labels to the chart.

<div id="desktopchart.close">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Close

**Close**

> Closes the control.

<div id="desktopchart.datasetat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.DatasetAt

**DatasetAt**(index As `Integer</api/data_types/integer>`) As `ChartDataset</api/user_interface/charts/chartdataset>`

> Returns the `ChartDataset</api/user_interface/charts/chartdataset>` at the index passed.

<div id="desktopchart.datasets">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Datasets

**Datasets**() As `Iterable</api/language/iterable>`

> Allows iterating through all data sets.

<div id="desktopchart.drawinto">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.DrawInto

**DrawInto**(g As `Graphics</api/graphics/graphics>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`)

> Draws the contents of the control into the specified `Graphics</api/graphics/graphics>` context. The parameters *x* and *y* are the coordinates of the top, left corner.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> DrawInto will only work if the control is on a window or container.
>
> </div>
>
> This example draws the current control into the Graphics of a Picture and then displays it as the Backdrop of the \`DesktopChart\`:
>
> ``` xojo
> Var p As New Picture(Me.Width, Me.Height)
> Me.DrawInto(p.Graphics, 0, 0)
> Chart1.Backdrop = p
> ```

<div id="desktopchart.labelat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.LabelAt

**LabelAt**(index As `Integer</api/data_types/integer>`) As `String</api/data_types/string>`

> Returns the label at the index passed.

<div id="desktopchart.labels">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Labels

**Labels**() As `Iterable</api/language/iterable>`

> Allows iterating through all labels.

<div id="desktopchart.refresh">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Refresh

**Refresh**(immediately As `Boolean</api/data_types/boolean>` = `False</api/language/false>`)

> Redraws the portion specified of the contents of the control the next time the OS redraws the control or immediately if `True</api/language/true>` is passed.
>
> If you are calling this so frequently that you experience a slowdown in your code, pass `True</api/language/true>` for the immediately parameter.
>
> Calling this method causes the Render event to fire.
>
> Refresh the entire area immediately:
>
> ``` xojo
> Me.Refresh(True)
> ```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="rst-class">

forsearch

</div>

DesktopChart.Refresh

**Refresh**(x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, width As `Integer</api/data_types/integer>`, height As `Integer</api/data_types/integer>`, immediately As `Boolean</api/data_types/boolean>` = `False</api/language/false>`)

> Redraws the portion specified of the contents of the control the next time the OS redraws the control or immediately if `True</api/language/true>` is passed.
>
> Refresh a portion of the area the next time the OS redraws the control:
>
> ``` xojo
> Me.Refresh(100, 150, 200, 300)
> ```

<div id="desktopchart.removealldatasets">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.RemoveAllDatasets

**RemoveAllDatasets**

> Removes all datasets from the chart.

<div id="desktopchart.removealllabels">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.RemoveAllLabels

**RemoveAllLabels**

> Removes all labels from the chart.

<div id="desktopchart.removedatasetat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.RemoveDatasetAt

**RemoveDatasetAt**(index As `Integer</api/data_types/integer>`)

> Removes the `ChartDataset</api/user_interface/charts/chartdataset>` at the index passed.

<div id="desktopchart.removelabelat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.RemoveLabelAt

**RemoveLabelAt**(index As `Integer</api/data_types/integer>`)

> Removes the label at the index passed.

<div id="desktopchart.scroll">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Scroll

**Scroll**(dx As `Integer</api/data_types/integer>`, dy As `Integer</api/data_types/integer>`, x As `Integer</api/data_types/integer>` = 0, y As `Integer</api/data_types/integer>` = 0, width As `Integer</api/data_types/integer>` = -10000, height As `Integer</api/data_types/integer>` = -10000, moveControls As `Boolean</api/data_types/boolean>` = `True</api/language/true>`)

> Scrolls the <span class="title-ref">DesktopChart</span> contents according to the passed parameters.
>
> *dx* and *dy* are the number of points to scroll horizontally and vertically relative to the current position of the picture in the <span class="title-ref">DesktopChart</span> control. Positive values scroll right and down while negative values scroll left and up. The *x*, *y*, *width,* and *height* parameters specify the portion of the picture to be scrolled. If these are not passed, the entire picture will be scrolled. *moveControls* indicates whether controls positioned on top of the <span class="title-ref">DesktopChart</span> control should be scrolled as well. *moveControls* is `True</api/language/true>` by default.
>
> To use the Scroll method to scroll the contents of a <span class="title-ref">DesktopChart</span> control, you need to store the last scroll value for the axis you are scrolling so you can use this to calculate the amount to scroll. This can be done by adding properties to the window that contains the <span class="title-ref">DesktopChart</span> control or by creating a new class based on the <span class="title-ref">DesktopChart</span> control that contains properties to hold the last X scroll amount and last Y scroll amount.
>
> If the *moveControls* parameter is `True</api/language/true>`, any controls on top of the <span class="title-ref">DesktopChart</span> control will also be scrolled. This allows the implementation of a scrolling pane of controls.
>
> The following example scrolls a picture that was added to the project. The properties XScroll and YScroll have been added to the window to hold the amounts the picture has been scrolled. The picture is scrolled 8 points at a time. In the Keydown event of the window, the following code calls the Scroll method whenever the Up, Down, Left, or Right arrow keys are pressed.
>
> ``` xojo
> Const LeftArrow = 28
> Const RightArrow = 29
> Const UpArrow = 30
> Const DownArrow = 31
> Const ScrollUnit = 8 ' points
>
> Select Case Key.Asc
> Case LeftArrow
>     XScroll = XScroll + ScrollUnit
>     Chart1.Scroll(ScrollUnit, 0)
>
> Case RightArrow
>     XScroll = XScroll - ScrollUnit
>     Chart1.Scroll(-ScrollUnit, 0)
>
> Case UpArrow
>     YScroll = YScroll + ScrollUnit
>     Chart1.Scroll(0, ScrollUnit)
>
> Case DownArrow
>     YScroll = YScroll - ScrollUnit
>     Chart1.Scroll(0, -ScrollUnit)
>
> End Select
> ```

<div id="desktopchart.setfocus">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.SetFocus

**SetFocus**

> Sets the focus to the <span class="title-ref">DesktopChart</span> control.

<div id="desktopchart.topicture">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.ToPicture

**ToPicture**(width As `Double</api/data_types/double>` = -1, height As `Double</api/data_types/double>` = -1) As `Picture</api/graphics/picture>`

> Returns the chart as a `Picture</api/graphics/picture>` at the size specified by the *width* and *height* parameters. If these parameters are not specified, the `Picture</api/graphics/picture>` is created using the dimensions of the chart.

## Event descriptions

<div id="desktopchart.activated">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Activated

**Activated**

> The control is activated. In a single window interface, the Activate event fires when the parent window is activated. See the `DesktopApplication</api/user_interface/desktop/desktopapplication>` and `DesktopWindow</api/user_interface/desktop/desktopwindow>` Activate events.
>
> This can be because the app is launched or a window belonging to another app is no longer frontmost (active). The Deactivate event fires when another window becomes active. In a single window interface, the Activate event fires when the window is activated, e.g., when the app first displays the window.

<div id="desktopchart.closing">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Closing

**Closing**

> The control is about to be removed from the window either because the window is closing or the control's Close method was called.

<div id="desktopchart.constructcontextualmenu">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.ConstructContextualMenu

**ConstructContextualMenu**(base As `DesktopMenuItem</api/user_interface/desktop/desktopmenuitem>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`) As `Boolean</api/data_types/boolean>`

> This event is called when it is appropriate to display a contextual menu for the control.
>
> This event handler is the recommended way to handle contextual menus because this event figures out whether the user has requested the contextual menu, regardless of how they did it. Depending on platform, it might be in the MouseUp or MouseDown event and it might be a right+click or by pressing the contextual menu key on the keyboard, for example.
>
> *Base* is analogous to the menu bar for the contextual menu. Any items you add to *Base* will be shown as menu items. If you return `False</api/language/false>`, the event is passed up the parent hierarchy.
>
> If you return `True</api/language/true>`, the contextual menu is displayed. The parameters *x* and *y* are the mouse locations. If the event was fired because of a non-mouse event, then *x* and *y* are both set to -1. See the example of a contextual menu in the following section.
>
> The following ConstructContextualMenu event handler builds a menu with three menu items plus a submenu with three additional menu items.
>
> ``` xojo
> ' Add some items
> base.AddMenu(New DesktopMenuItem("Test 1"))
> base.AddMenu(New DesktopMenuItem("Test 2"))
> base.AddMenu(New DesktopMenuItem("Test 3"))
>
> ' Add a Separator
> base.AddMenu(New DesktopMenuItem(DesktopMenuItem.TextSeparator))
>
> ' Add a sub menu
> Var submenu As New DesktopMenuItem("SubMenu")
> submenu.AddMenu(New DesktopMenuItem("SubMenu Test 1"))
> submenu.AddMenu(New DesktopMenuItem("SubMenu Test 2"))
> submenu.AddMenu(New DesktopMenuItem("SubMenu Test 3"))
> base.AddMenu(submenu)
>
> ' Add a Separator
> base.AddMenu(New DesktopMenuItem(DesktopMenuItem.TextSeparator))
>
> Return True
> ```

<div id="desktopchart.contextualmenuselected">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.ContextualMenuSelected

**ContextualMenuSelected**(selectedItem As `DesktopMenuItem</api/user_interface/desktop/desktopmenuitem>`)

> Called when *selectedItem* is chosen from a contextual menu.
>
> This code populates a contextual menu in the Opening event of a Chart control:
>
> ``` xojo
> Var menu As New DesktopMenuItem
>
> menu.AddMenuItem("One")
> menu.AddMenuItem("Two")
> menu.AddMenuItem("Three")
> Me.ContextualMenu = menu
> ```
>
> The menu selection is then handled by the ContextualMenuSelected event when the user right-clicks on the control. For example, it can be of the form:
>
> ``` xojo
> Select Case selectedItem.Text
> Case "One"
>     MessageBox("One")
> Case "Two"
>     MessageBox("Two")
> Case "Three"
>     MessageBox("Three")
> End Select
> ```

<div id="desktopchart.deactivated">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Deactivated

**Deactivated**

> The <span class="title-ref">DesktopChart</span> is deactivated. See the `DesktopApplication</api/user_interface/desktop/desktopapplication>` and `DesktopWindow</api/user_interface/desktop/desktopwindow>` Deactivated events.
>
> In a multiple window interface, the Deactivated event fires when the parent window is deactivated because another window has been brought to the front or a window belonging to another app becomes frontmost. In a single window app, the Deactivated event fires when a window belonging to another app becomes frontmost.

<div id="desktopchart.dragenter">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.DragEnter

**DragEnter**(obj As `DragItem</api/user_interface/desktop/dragitem>`, Action As `DragItem.Types<dragitem.types>`) As `Boolean</api/data_types/boolean>`

> Fires when the passed `DragItem</api/user_interface/desktop/dragitem>` enters the <span class="title-ref">DesktopChart</span> control.
>
> Returns a `Boolean</api/data_types/boolean>`. Return `True</api/language/true>` from this event to prevent the drop from occurring.
>
> The *Action* parameter specifies the type of drag action.
>
> To restrict file drops to just folders (and not files), you can put this code in the DragEnter event:
>
> ``` xojo
> If Not obj.FolderItem.IsFolder Then Return True
> ```

<div id="desktopchart.dragexit">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.DragExit

**DragExit**(obj As `DragItem</api/user_interface/desktop/dragitem>`, Action As `DragItem.Types<dragitem.types>`)

> Fires when the passed `DragItem</api/user_interface/desktop/dragitem>` exits the <span class="title-ref">DesktopChart</span> control.
>
> The *obj* parameter is the item being dragged. The *Action* parameter specifies the type of drag action.

<div id="desktopchart.dragover">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.DragOver

**DragOver**(x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, obj As `DragItem</api/user_interface/desktop/dragitem>`, Action As `DragItem.Types<dragitem.types>`) As `Boolean</api/data_types/boolean>`

> Fires when the `DragItem</api/user_interface/desktop/dragitem>` is over the <span class="title-ref">DesktopChart</span> control.
>
> The *obj* parameter is the object being dragged. The coordinates x and y are relative to the <span class="title-ref">DesktopChart</span>. Returns a `Boolean</api/data_types/boolean>`. Return `True</api/language/true>` from this event to prevent the drop from occurring.
>
> The *Action* parameter specifies the type of drag action, which is typically done by holding down a modifier key (Shift, Alt, Option, Command, etc.) while doing the drag.

<div id="desktopchart.drawmouseoverpointat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.DrawMouseOverPointAt

**DrawMouseOverPointAt**(x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, dataset As `ChartDataset</api/user_interface/charts/chartdataset>`, index As `Integer</api/data_types/integer>`) As `Boolean</api/data_types/boolean>`

> Allows for handling the drawing of DataPoints using the data passed. Return `True</api/language/true>` if you wish to handle the drawing and `False</api/language/false>` to have the chart handle it.

<div id="desktopchart.drawpointat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.DrawPointAt

**DrawMouseOverPointAt**(g As `Graphics</api/graphics/graphics>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, dataset As `ChartDataset</api/user_interface/charts/chartdataset>`, index As `Integer</api/data_types/integer>`) As `Boolean</api/data_types/boolean>`

> Allows for handling the drawing of DataPoints using the data passed. Return `True</api/language/true>` if you wish to handle the drawing and `False</api/language/false>` to have the chart handle it.

<div id="desktopchart.dropobject">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.DropObject

**DropObject**(Obj As `DragItem</api/user_interface/desktop/dragitem>` Action As `DragItem.Types<dragitem.types>`)

> The item represented by *Obj* has been dropped on the control.
>
> The *Obj* parameter is the object being dragged. The *Action* parameter specifies the type of drag action.
>
> The following DropObject event handler can handle either a dropped picture or a dropped file. The type of file that it can handle needs to have been specified in a call to AcceptFileDrop prior to the drop, for example, in the Opening event.
>
> ``` xojo
> If Obj.PictureAvailable Then
>     Me.Image = obj.Picture
> ElseIf Obj.FolderItemAvailable Then
>     Me.Image = Picture.Open(obj.FolderItem)
> End If
> ```

<div id="desktopchart.error">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Error

**Error**(DataSet As `ChartDataSet</api/user_interface/charts/chartdataset>`)

> The chart either has no room to display the data or is too small to draw the grid. The *DataSet* is the `ChartDataSet</api/user_interface/charts/chartdataset>` assigned to the control.

<div id="desktopchart.focuslost">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.FocusLost

**FocusLost**

> The `control</api/user_interface/desktop/desktopchart>` has lost the focus.
>
> This property must be set to `True</api/language/true>` for the `control</api/user_interface/desktop/desktopchart>` to be capable of getting then losing the focus.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> On macOS, controls other than text fields and lists will accept and lose focus only if the full keyboard access option is enabled in System Preferences/Keyboard.
>
> </div>

<div id="desktopchart.focusreceived">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.FocusReceived

**FocusReceived**

> The `control</api/user_interface/desktop/desktopchart>` has received the focus and has a selection rectangle around it.
>
> This property must be set to `True</api/language/true>` for the `control</api/user_interface/desktop/desktopchart>` to be capable of getting the focus.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> On macOS, controls other than text fields and lists will accept focus only if the full keyboard access option is enabled in System Preferences/Keyboard.
>
> </div>

<div id="desktopchart.keydown">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.KeyDown

**KeyDown**(Key As `String</api/data_types/string>`) As `Boolean</api/data_types/boolean>`

> The user has pressed the *Key* passed while the `control</api/user_interface/desktop/desktopchart>` has the focus.
>
> How KeyDown works depends on the type of control.
>
> Returning `True</api/language/true>` means the key is intercepted, preventing the key from actually reaching the control at all. This would be useful if you want to override the behavior of the tab key for example. Returning `False</api/language/false>` means the key reaches the control.

<div id="desktopchart.keyup">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.KeyUp

**KeyUp**(Key As `String</api/data_types/string>`)

> Fires when the passed *Key* is released in the control that has the focus.
>
> It is not guaranteed to be the same key that received the KeyDown event.

<div id="desktopchart.menubarselected">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.MenuBarSelected

**MenuBarSelected**

> Indicates that the control has the focus and a menu (not a menu item) has been selected by the user.

<div id="desktopchart.opening">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.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.

<div id="desktopchart.paintafter">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.PaintAfter

**PaintAfter**(g As `Graphics</api/graphics/graphics>`)

> Called after the chart itself is drawn. Use the parameter *g* for all drawing operations.

<div id="desktopchart.paintbefore">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.PaintBefore

**PaintBefore**(g As `Graphics</api/graphics/graphics>`)

> Called before the chart itself is drawn. Use the parameter *g* for all drawing operations.

<div id="desktopchart.pressed">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopChart.Pressed

**Pressed**(dataset As `ChartDataset</api/user_interface/charts/chartdataset>`, index As `Integer</api/data_types/integer>`)

> The user pressed on a part of the chart that represents data from the *dataset*.

## Compatibility

|                       |         |
|-----------------------|---------|
| **Project Types**     | Desktop |
| **Operating Systems** | All     |

<div class="seealso">

`DesktopCanvas</api/user_interface/desktop/desktopcanvas>` parent class; `ChartCircularDataset</api/user_interface/charts/chartcirculardataset>`, `ChartDataset</api/user_interface/charts/chartdataset>`, `ChartLinearDataset</api/user_interface/charts/chartlineardataset>` and `ChartScatterDatapoint</api/user_interface/charts/chartscatterdatapoint>` classes.

</div>
