OptionsTooltips
Namespace: Wisej.Web.Ext.ChartJS3
Assembly: Wisej.Web.Ext.ChartJS3 (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 Tooltip property of Plugins to access the tooltip options of a ChartJS3 control. The options are serialized as the Chart.js 3 plugins.tooltip option.
Example:
OptionsTooltips tooltip = this.chartJS31.Options.Plugins.Tooltip;
// show the tooltips only when the data labels are hidden.
tooltip.Enabled = !this.chartJS31.Options.Plugins.DataLabels.Display;
Constructors
OptionsTooltips()
Default constructor.
Creates a standalone set of tooltip options that can be assigned to Tooltip.
Example:
var tooltip = new OptionsTooltips();
tooltip.Enabled = false;
this.chartJS31.Options.Plugins.Tooltip = tooltip;
this.chartJS31.Options.Update();
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 ChartJS3 control that displays the tooltips is resolved through owner . The instance can be assigned only to the option set specified in owner .
Example:
var plugins = this.chartJS31.Options.Plugins;
plugins.Tooltip = new OptionsTooltips(plugins) { Enabled = false };
plugins.Update();
Properties
Enabled
Boolean: Returns or sets whether the tooltips are enabled. (Default: True)
Value: true to show a tooltip when the user hovers a data point; otherwise, false. The default is true.
Serialized as the Chart.js 3 plugins.tooltip.enabled option. Changing the value calls Update.
Example:
// let the user toggle the tooltips.
private void checkBoxTooltips_CheckedChanged(object sender, EventArgs e)
{
this.chartJS31.Options.Plugins.Tooltip.Enabled = this.checkBoxTooltips.Checked;
}