Class

# ChartLinearDataset

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

## Description

The dataset used for charts that require linear data such as Bar, Line and Pie.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                    | Type                                                            | Read-Only | Shared |
|---------------------------------------------------------|-----------------------------------------------------------------|-----------|--------|
| `AllowInteraction<chartlineardataset.allowinteraction>` | `Boolean</api/data_types/boolean>`                              |           |        |
| `AllowPopover<chartlineardataset.allowpopover>`         | `Boolean</api/data_types/boolean>`                              |           |        |
| `ChartType<chartlineardataset.charttype>`               | `ChartTypes<chartlineardataset.charttypes>`                     |           |        |
| `CornerSize<chartlineardataset.cornersize>`             | `Double</api/data_types/double>`                                |           |        |
| `DataColor<chartlineardataset.datacolor>`               | `ColorGroup</api/graphics/colorgroup>`                          |           |        |
| `Fill<chartlineardataset.fill>`                         | `Boolean</api/data_types/boolean>`                              |           |        |
| `IsLegendVisible<chartlineardataset.islegendvisible>`   | `Boolean</api/data_types/boolean>`                              |           |        |
| `IsVisible<chartlineardataset.isvisible>`               | `Boolean</api/data_types/boolean>`                              |           |        |
| `Label<chartlineardataset.label>`                       | `String</api/data_types/string>`                                |           |        |
| `Prefix<chartlineardataset.prefix>`                     | `String</api/data_types/string>`                                |           |        |
| `Style<chartlineardataset.style>`                       | `ChartLinearStyle</api/user_interface/charts/chartlinearstyle>` |           |        |
| `Suffix<chartlineardataset.suffix>`                     | `String</api/data_types/string>`                                |           |        |
| `Tag<chartlineardataset.tag>`                           | `Variant</api/data_types/variant>`                              |           |        |
| `Transparency<chartlineardataset.transparency>`         | `Double</api/data_types/double>`                                |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                              | Parameters                                                                                                                                                                                                                          | Returns                                    | Shared |
|---------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------|--------|
| `AddRow<chartlineardataset.addrow>`               | value As `Double</api/data_types/double>`                                                                                                                                                                                           |                                            |        |
| `AddRowAt<chartlineardataset.addrowat>`           | iIndex As `Integer</api/data_types/integer>`                                                                                                                                                                                        | value As `Double</api/data_types/double>`" |        |
| `Constructor<chartlineardataset.constructor0>`    | Label As `String</api/data_types/string>`, DataColor As `Color</api/data_types/color>`, Fill As `Boolean</api/data_types/boolean>`, `ParamArray</api/language/paramarray>` DataPoints() As `Double</api/data_types/double>`         |                                            |        |
|                                                   | Label As `String</api/data_types/string>`, DataColor As `ColorGroup</api/graphics/colorgroup>`, Fill As `Boolean</api/data_types/boolean>`, `ParamArray</api/language/paramarray>` DataPoints() As `Double</api/data_types/double>` |                                            |        |
| `Count<chartlineardataset.count>`                 |                                                                                                                                                                                                                                     | `Integer</api/data_types/integer>`         |        |
| `LastIndex<chartlineardataset.lastindex>`         |                                                                                                                                                                                                                                     | `Integer</api/data_types/integer>`         |        |
| `RemoveAllRows<chartlineardataset.removeallrows>` |                                                                                                                                                                                                                                     |                                            |        |
| `RemoveRowAt<chartlineardataset.removerowat>`     | Index As `Integer</api/data_types/integer>`                                                                                                                                                                                         |                                            |        |
| `RowAt<chartlineardataset.rowat>`                 | index As `Integer</api/data_types/integer>`                                                                                                                                                                                         | `Double</api/data_types/double>`           |        |
|                                                   | index As `Integer</api/data_types/integer>`, `Assigns</api/language/assigns>` value As `Double</api/data_types/double>`                                                                                                             |                                            |        |

## Enumerations

<div id="chartlineardataset.charttypes">

<div class="rst-class">

forsearch

</div>

</div>

ChartLinearDataset.ChartTypes

### ChartTypes

> The various types of charts that can be used to represent the dataset.
>
> | Enum     | Description                                                                        |
> |----------|------------------------------------------------------------------------------------|
> | Bar      | A chart made up of bars the height of each represents a data point in the dataset. |
> | Default  | A Bar chart. As default, this type will be chosen if you don't choose one.         |
> | LineType | A chart made up of connected lines that represent each data point in the dataset.  |

## Property descriptions

<div id="chartlineardataset.allowinteraction">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.AllowInteraction

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

> When `True</api/language/false>` legends can be interacted with and clicking on one raises the Pressed event. The default is `True</api/language/true>`.

<div id="chartlineardataset.allowpopover">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.AllowPopover

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

> When `True</api/language/false>`, the associated dataset will display the Popover when the mouse is over any of its datapoints/area. The default is `True</api/language/true>`.

<div id="chartlineardataset.charttype">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.ChartType

**ChartType** As `ChartTypes<chartlineardataset.charttypes>`

> The various types of charts that can be created from the data set.

<div id="chartlineardataset.cornersize">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.CornerSize

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

> The height of the corners when drawing rectangles in the chart.

<div id="chartlineardataset.datacolor">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.DataColor

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

> The color to be used when drawing the graphics in the chart that represent the dataset.

<div id="chartlineardataset.fill">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.Fill

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

> If `True</api/language/true>`, the graphical object in the chart that represents the data will be filled in with a color. The default is `False</api/language/false>`.

<div id="chartlineardataset.islegendvisible">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.IsLegendVisible

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

> When `True</api/language/false>` the legend is drawn on the chart. The default is `True</api/language/true>`.

<div id="chartlineardataset.isvisible">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.IsVisible

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

> If `True</api/language/true>`, the data will be drawn in the chart.

<div id="chartlineardataset.label">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.Label

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

> The label that will appear in the chart with the graphics that represent the dataset.

<div id="chartlineardataset.prefix">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.Prefix

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

> The prefix text for the values displayed in the Y axis.

<div id="chartlineardataset.style">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.Style

**Style** As `ChartLinearStyle</api/user_interface/charts/chartlinearstyle>`

> The style for the value's endpoint and drawing of the connection line between values.

<div id="chartlineardataset.suffix">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.Suffix

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

> The suffix text for the values displayed in the Y axis.

<div id="chartlineardataset.tag">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.Tag

**Tag** As `Variant</api/data_types/variant>`

> A place to store data associated with the dataset.

<div id="chartlineardataset.transparency">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.Transparency

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

> Controls the level of transparency of the data when drawn. 0 is fully opaque. 100 is fully transparent.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This is not yet supported by `WebChart</api/user_interface/web/webchart>`.
>
> </div>

## Method descriptions

<div id="chartlineardataset.addrow">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.AddRow

**AddRow**(value As `Double</api/data_types/double>`)

> Adds the *value* passed to the dataset.

<div id="chartlineardataset.addrowat">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.AddRowAt

**AddRowAt**(index As `Integer</api/data_types/integer>`, value As `Double</api/data_types/double>`)

> Adds the *value* passed to the dataset at the *index* passed.

<div id="chartlineardataset.constructor0">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.Constructor

**Constructor**(Label As `String</api/data_types/string>`, DataColor As `Color</api/data_types/color>`, Fill As `Boolean</api/data_types/boolean>`, `ParamArray</api/language/paramarray>` DataPoints() As `Double</api/data_types/double>`)

**Constructor**(Label As `String</api/data_types/string>`, DataColor As `ColorGroup</api/graphics/colorgroup>`, Fill As `Boolean</api/data_types/boolean>`, `ParamArray</api/language/paramarray>` DataPoints() As `Double</api/data_types/double>`)

> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> `Constructors</api/language/constructor>` are special methods called when you create an object with the `New</api/language/new>` keyword and pass in the parameters above.
>
> </div>
>
> Creates a new <span class="title-ref">ChartLinearDataset</span> from the values passed.
>
> This examples uses the constructor to create a new dataset and then assign it to the chart:
>
> ``` xojo
> Var sales() As Double = Array(345890.0, 421934, 456908, 567987)
> Var ds As New ChartLinearDataset("Sales", Color.Blue, True, sales)
> SalesChart.AddDataset(ds)
> SalesChart.AddLabels("Q1", "Q2", "Q3", "Q4")
> ```

<div id="chartlineardataset.count">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.Count

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

> Returns the number of values in the dataset.

<div id="chartlineardataset.lastindex">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.LastIndex

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

> Returns the index of the last value in the dataset.

<div id="chartlineardataset.removeallrows">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.RemoveAllRows

**RemoveAllRows**

> Removes all the rows (data) from the dataset.

<div id="chartlineardataset.removerowat">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.RemoveRowAt

**RemoveRowAt**(Index As `Integer</api/data_types/integer>`)

> Removes the row (data) at the *Index* passed from the dataset.

<div id="chartlineardataset.rowat">

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

</div>

<div class="rst-class">

forsearch

</div>

ChartLinearDataset.RowAt

**RowAt**(index As `Integer</api/data_types/integer>`) As `Double</api/data_types/double>`

**RowAt**(index As `Integer</api/data_types/integer>`, `Assigns</api/language/assigns>` value As `Double</api/data_types/double>`)

> Gets or sets the row value at the *index* passed.

## Sample code

This example uses a <span class="title-ref">ChartLinearDataset</span> to present some data in a bar chart. Because <span class="title-ref">ChartLinearDataset</span> requires the data to be of type `Double</api/data_types/double>`, when using the `Array</api/language/array>` function you must add a decimal to one of the values so that `Array</api/language/array>` knows to return a `Double</api/data_types/double>` rather than an `Integer</api/data_types/integer>` array.

``` xojo
Var sales() As Double = Array(345890.0, 421934, 456908, 567987)
Var ds As New ChartLinearDataset("Sales", Color.Blue, True, sales)
Me.AddDataset(ds)
Me.AddLabels("Q1", "Q2", "Q3", "Q4")
```

## Compatibility

|                       |                      |
|-----------------------|----------------------|
| **Project Types**     | Desktop, Mobile, Web |
| **Operating Systems** | All                  |

<div class="seealso">

`ChartDataset</api/user_interface/charts/chartdataset>` parent class; `Chart</api/user_interface/controls/chart>` control, `ChartDataset</api/user_interface/charts/chartdataset>`, `ChartCircularDataset</api/user_interface/charts/chartcirculardataset>`, `ChartScatterDataset</api/user_interface/charts/chartscatterdataset>` and `ChartLinearStyle</api/user_interface/charts/chartlinearstyle>` classes.

</div>
