Skip to main content

OptionsBase

Namespace: Wisej.Web.Ext.ChartJS3

Assembly: Wisej.Web.Ext.ChartJS3 (4.1.0.0)

Base class for all the option classes.

public abstract class OptionsBase : ICloneable

Every option set belongs either directly to a ChartJS3 control or to a parent option set. Changing a value property of an option set calls Update, which updates the owner ChartJS3 control. An option set instance cannot be assigned to two different owners.

Example:

// all option classes derive from OptionsBase.
OptionsBase title = this.chartJS31.Options.Plugins.Title;
OptionsBase legend = this.chartJS31.Options.Plugins.Legend;

// force a refresh of the chart.
title.Update();

Methods​

Instance member Update()​

Updates the ChartJS3 control using this set of options.

The call is ignored when this option set is not attached to a ChartJS3 control, either directly or through its owner option set. It is called automatically when a value property of the option set changes, but not when a nested option set (for example Plugins or Scales) is replaced.

Example:

var options = this.chartJS31.Options;
options.Plugins.Title = new OptionsTitle { Text = "Monthly Sales" };

// assigning a nested option set doesn't refresh the chart.
options.Update();

Inherited By​

NameDescription
OptionsRepresents the base options for the ChartJS3 widget. Different ChartType values extend this class with type specific options.
LineOptionsOptions for the Line chart.
BarOptionsOptions for the Bar chart.
PieOptionsOptions for the Pie chart.
PolarAreaOptionsOptions for the PolarArea chart.
DoughnutOptionsOptions for the Doughnut chart.
RadarOptionsOptions for the Radar chart.
BubbleOptionsOptions for the Bubble chart.
ScatterOptionsOptions for the Scatter chart.
OptionsAxisGridSpecifies the grid line configuration for each axis.
OptionsDataLabelsRepresents the options for the data labels.
OptionsLegendRepresents the options for the chart legend.
OptionsLegendLabelsRepresents the options for the labels in the chart legend.
OptionsPluginsRepresents the options for the plugins.
OptionsScalesRepresents the options for the axes (scales) of the chart.
OptionScalesAxesRepresents the options for the scale axes.
OptionScalesAxesXRepresents the options for the scale X axes.
OptionScalesAxesYRepresents the options for the scale Y axes.
OptionsScalesTicksRepresents the options for the ticks element of the axes.
OptionsScaleTitleRepresents the options for the title of an axis.
OptionsTitleRepresents the options for the chart title.
OptionsTooltipsRepresents the options for the chart tooltips.
ScaleTimeOptions used when the axis is a time scale.