OptionsTooltips
Namespace: Wisej.Web.Ext.ChartJS
Assembly: Wisej.Web.Ext.ChartJS (4.1.0.0)
Represents the options for the chart tooltips.
- C#
- VB.NET
public class OptionsTooltips : OptionsBase
Public Class OptionsTooltips
Inherits 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
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;
OptionsTooltips(owner)
Constructs a new instance of the OptionsTooltips set.
| Name | Type | Description |
|---|---|---|
| owner | OptionsBase | The 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
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;