<div class="meta" robots="noindex">

</div>

Class

# WebChartLinearDataset

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

<div class="warning">

<div class="title">

Warning

</div>

This class was deprecated in version 2023r1. Please use `ChartLinearDataset</api/user_interface/charts/chartlineardataset>` as a replacement.

</div>

## 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 |
|----------------------------------------------|------------------------------------------------|-----------|--------|
| `ChartType<webchartlineardataset.charttype>` | `ChartTypes<webchartlineardataset.charttypes>` |           |        |
| `DataColor<webchartlineardataset.datacolor>` | `Color</api/data_types/color>`                 |           |        |
| `Fill<webchartlineardataset.fill>`           | `Boolean</api/data_types/boolean>`             |           |        |
| `Label<webchartlineardataset.label>`         | `String</api/data_types/string>`               |           |        |
| `Tag<webchartlineardataset.tag>`             | `Variant</api/data_types/variant>`             |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                 | Parameters                                                                                                                                                                                                                  | Returns                          | Shared |
|------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------|--------|
| `AddRow<webchartlineardataset.addrow>`               | Value As `Double</api/data_types/double>`                                                                                                                                                                                   |                                  |        |
| `AddRowAt<webchartlineardataset.addrowat>`           | Index As `Integer</api/data_types/integer>`, Value As `Double</api/data_types/double>`                                                                                                                                      |                                  |        |
| `Constructor<webchartlineardataset.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>` |                                  |        |
| `RemoveAllRows<webchartlineardataset.removeallrows>` |                                                                                                                                                                                                                             |                                  |        |
| `RemoveRowAt<webchartlineardataset.removerowat>`     | Index As `Integer</api/data_types/integer>`                                                                                                                                                                                 |                                  |        |
| `RowAt<webchartlineardataset.rowat>`                 | Index As `Integer</api/data_types/integer>`                                                                                                                                                                                 | `Double</api/data_types/double>` |        |

## Enumerations

<div id="webchartlineardataset.charttypes">

<div class="rst-class">

forsearch

</div>

</div>

WebChartLinearDataset.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.         |
| Line    | A chart made up of connected lines that represent each data point in the dataset.  |

## Property descriptions

<div id="webchartlineardataset.charttype">

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

</div>

<div class="rst-class">

forsearch

</div>

WebChartLinearDataset.ChartType

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

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

<div id="webchartlineardataset.datacolor">

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

</div>

<div class="rst-class">

forsearch

</div>

WebChartLinearDataset.DataColor

**DataColor** As `Color</api/data_types/color>`

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

<div id="webchartlineardataset.fill">

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

</div>

<div class="rst-class">

forsearch

</div>

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

<div id="webchartlineardataset.label">

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

</div>

<div class="rst-class">

forsearch

</div>

WebChartLinearDataset.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="webchartlineardataset.tag">

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

</div>

<div class="rst-class">

forsearch

</div>

WebChartLinearDataset.Tag

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

A place to store data associated with the dataset.

## Method descriptions

<div id="webchartlineardataset.addrow">

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

</div>

<div class="rst-class">

forsearch

</div>

WebChartLinearDataset.AddRow

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

Adds the value passed to the dataset.

<div id="webchartlineardataset.addrowat">

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

</div>

<div class="rst-class">

forsearch

</div>

WebChartLinearDataset.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="webchartlineardataset.constructor0">

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

</div>

<div class="rst-class">

forsearch

</div>

WebChartLinearDataset.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>`)

<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">WebChartLinearDataset</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 WebChartLinearDataset("Sales", Color.Blue, True, sales)
SalesChart.AddDataset(ds)
SalesChart.AddLabels("Q1", "Q2", "Q3", "Q4")
```

<div id="webchartlineardataset.removeallrows">

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

</div>

<div class="rst-class">

forsearch

</div>

WebChartLinearDataset.RemoveAllRows

**RemoveAllRows**

Removes all the rows (data) from the dataset.

<div id="webchartlineardataset.removerowat">

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

</div>

<div class="rst-class">

forsearch

</div>

WebChartLinearDataset.RemoveRowAt

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

Removes the row (data) at the index passed from the dataset.

<div id="webchartlineardataset.rowat">

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

</div>

<div class="rst-class">

forsearch

</div>

WebChartLinearDataset.RowAt

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

Returns the row value at the index passed.

## Sample code

This example uses a <span class="title-ref">WebChartLinearDataset</span> to present some data in a bar chart. Because <span class="title-ref">WebChartLinearDataset</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 WebChartLinearDataset("Sales", Color.Blue, True, sales)
Me.AddDataset(ds)
Me.AddLabels("Q1", "Q2", "Q3", "Q4")
```

## Compatibility

Web projects on all supported operating systems.

## See also

`WebChartDataset</api/deprecated/webchartdataset>` parent class; `WebChart</api/user_interface/web/webchart>` control, `WebChartDataset</api/deprecated/webchartdataset>`, `WebChartCircularDataset</api/deprecated/webchartcirculardataset>` and `WebChartScatterDataset</api/deprecated/webchartscatterdataset>` classes.
