Class ChartTooltipSettings
Options to customize the tooltip.
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChartTooltipSettings : ChartSubComponent, ISubcomponentTracker
Constructors
ChartTooltipSettings()
Declaration
public ChartTooltipSettings()
Properties
Border
Gets or sets an instance of ChartTooltipBorder which controls the customization of the border of the tooltip.
Declaration
public ChartTooltipBorder Border { get; set; }
Property Value
Type | Description |
---|---|
ChartTooltipBorder | An instance of ChartTooltipBorder. |
Remarks
This property allows customization of the color and width of the tooltip border.
Duration
Gets or sets the duration for the tooltip animation in milliseconds.
Declaration
public double Duration { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The duration for the tooltip animation in milliseconds. The default value is 0. |
Remarks
This property specifies the duration for the tooltip to animate from one point to the next when hovered on the point. It is not applicable when EnableAnimation is set to false.
Enable
Gets or sets a value indicating whether the tooltip is enabled.
Declaration
public bool Enable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the tooltip is enabled; otherwise, false. The default value is false. |
EnableAnimation
Gets or sets a value indicating whether the tooltip animates while moving from one point to another.
Declaration
public bool EnableAnimation { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if tooltip animation is enabled; otherwise, false. The default value is true. |
EnableMarker
Gets or sets a value indicating whether to display a marker in the tooltip.
Declaration
public bool EnableMarker { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the marker should be displayed in the tooltip; otherwise, false. The default value is true. |
Remarks
If set to true, the marker shape assigned for the series associated with the hovered point is applied for the tooltip marker. If the marker is not enabled, a circle-shaped marker will be rendered by default.
EnableTextWrap
Gets or sets a value indicating whether to wrap the tooltip text based on the available space.
Declaration
public bool EnableTextWrap { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if text wrapping is enabled; otherwise, false. The default value is false. |
FadeOutDuration
Gets or sets the duration for fading out the tooltip.
Declaration
public double FadeOutDuration { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The fade-out duration in milliseconds. The default value is 1000. |
Remarks
This property determines the duration for the tooltip to fade out when the focus on the chart point is removed.
Fill
Gets or sets the fill color of the tooltip background.
Declaration
public string Fill { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the fill color of the tooltip background. The default fill color is determined by the chart's theme. By default, the theme is set to Material with a fill color of #000816. |
Remarks
The fill color accepts values in hex and rgba as a valid CSS color string.
Format
Gets or sets the format for the tooltip content.
Declaration
public string Format { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that defines the format for the tooltip content. The default value is an empty string. |
Remarks
The Format property allows customization of the tooltip content.
By default, the tooltip displays information for the x and y values of a point.
Additional information can be included in the tooltip using a format string.
For example, the format "$series.name : $point.x" displays the series name and x-value of the point in the tooltip.
Header
Gets or sets the header text for the tooltip.
Declaration
public string Header { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the tooltip header text. The default value is an empty string. |
Remarks
This property can be used to provide additional context or information related to the data point being displayed.
Opacity
Gets or sets the opacity of the tooltip.
Declaration
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value specifying the opacity of the tooltip. The default value is 0.75. |
Shared
Gets or sets a value indicating whether a single tooltip should be displayed with shared values of multiple series.
Declaration
public bool Shared { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if a single tooltip should be displayed with shared values of multiple series; otherwise, false. The default value is false. |
Remarks
Enabling this option allows for the presentation of combined information from all relevant series in a unified tooltip.
ShowNearestPoint
Gets or sets a value indicating whether the values of the nearest points for all visible series in the shared tooltip are allowed to display in the tooltip.
Declaration
public bool ShowNearestPoint { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the values of the nearest points are shown in the tooltip; otherwise, false. The default value is true. |
Remarks
This property is applicable only for shared tooltip. Enabling this option allows for the presentation of values from the nearest data points of multiple series in the shared tooltip.
Template
Gets or sets a custom template to format the tooltip content.
Declaration
public RenderFragment<object> Template { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment<System.Object> | The template content is applied for the chart tooltip based on the custom template provided by the user that is being rendered. The default value is null. |
Remarks
Use ${x} and ${y} as placeholder text to display the corresponding data point in the custom template.
TextStyle
Gets or sets an instance of ChartTooltipTextStyle which controls the customization of the text style of the tooltip.
Declaration
public ChartTooltipTextStyle TextStyle { get; set; }
Property Value
Type | Description |
---|---|
ChartTooltipTextStyle | An instance of ChartTooltipTextStyle. |
Remarks
Use this property to customize specific styling attributes, such as color and font-properties, for the text displayed in the tooltip.
Methods
OnInitialized()
Declaration
protected override void OnInitialized()