Skip to main content

OptionsTooltips

Namespace: Wisej.Web.Ext.ChartJS

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

Represents the options for the chart tooltips.

public class OptionsTooltips : OptionsBase

Use the Tooltips property to access the tooltip options of a ChartJS control. The tooltip label shows the label of the data point followed by its value, using the value in Formatted when available.

Example:

OptionsTooltips tooltips = this.chartJS1.Options.Tooltips;
tooltips.Enabled = true;

this.chartJS1.DataSets[0].Formatted = new[] { "$1,200", "$950", "$1,430" };

Constructors​

Instance member OptionsTooltips()​

Default constructor.

Creates a standalone set of tooltip options that can be assigned to Tooltips.

Example:

var tooltips = new OptionsTooltips();
tooltips.Enabled = false;

this.chartJS1.Options.Tooltips = tooltips;

Instance member OptionsTooltips(owner)​

Constructs a new instance of the OptionsTooltips set.

NameTypeDescription
ownerOptionsBaseThe OptionsBase set of options that owns this set of options.

The ChartJS control that displays the tooltips is resolved through owner .

Example:

var tooltips = new OptionsTooltips(this.chartJS1.Options);
tooltips.Enabled = true;
this.chartJS1.Options.Tooltips = tooltips;

Properties​

Instance member Enabled​

Boolean: Enables or disables tooltips. (Default: True)

Value: true to show the tooltips when hovering the data points; otherwise, false. The default is true.

Serialized as the Chart.js tooltips.enabled option.

Example:

// disable the tooltips on a busy chart.
this.chartJS1.Options.Tooltips.Enabled = !this.checkBoxTooltips.Checked;