Class

WebChartLinearDataset


Warning

This class was deprecated in version 2023r1. Please use ChartLinearDataset as a replacement.

Description

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

Properties

Name

Type

Read-Only

Shared

ChartType

ChartTypes

DataColor

Color

Fill

Boolean

Label

String

Tag

Variant

Methods

Name

Parameters

Returns

Shared

AddRow

Value As Double

AddRowAt

Index As Integer, Value As Double

Constructor

Label As String, DataColor As Color, Fill As Boolean, ParamArray Datapoints() As Double

RemoveAllRows

RemoveRowAt

Index As Integer

RowAt

Index As Integer

Double

Enumerations

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


WebChartLinearDataset.ChartType

ChartType As ChartTypes

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


WebChartLinearDataset.DataColor

DataColor As Color

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


WebChartLinearDataset.Fill

Fill As Boolean

If True, the graphical object in the chart that represents the data will be filled in with a color.


WebChartLinearDataset.Label

Label As String

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


WebChartLinearDataset.Tag

Tag As Variant

A place to store data associated with the dataset.

Method descriptions


WebChartLinearDataset.AddRow

AddRow(Value As Double)

Adds the value passed to the dataset.


WebChartLinearDataset.AddRowAt

AddRowAt(Index As Integer, Value As Double)

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


WebChartLinearDataset.Constructor

Constructor(Label As String, DataColor As Color, Fill As Boolean, ParamArray Datapoints() As Double)

Note

Constructors are special methods called when you create an object with the New keyword and pass in the parameters above.

Creates a new WebChartLinearDataset from the values passed.

This examples uses the constructor to create a new dataset and then assign it to the chart:

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")

WebChartLinearDataset.RemoveAllRows

RemoveAllRows

Removes all the rows (data) from the dataset.


WebChartLinearDataset.RemoveRowAt

RemoveRowAt(Index As Integer)

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


WebChartLinearDataset.RowAt

RowAt(Index As Integer) As Double

Returns the row value at the index passed.

Sample code

This example uses a WebChartLinearDataset to present some data in a bar chart. Because WebChartLinearDataset requires the data to be of type Double, when using the Array function you must add a decimal to one of the values so that Array knows to return a Double rather than an Integer array.

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.