Articles in this section
Category / Section

How to format the tooltip text in ejChart?

1 min read

By default, the x and y value of a point is displayed as the tooltip when you place the mouse over a Chart point. The LabelFormat property of horizontal axis used by the series is used to format the x value displayed in tooltip and the LabelFormat property of vertical axis used by the series is used to format the y value of text displayed in tooltip.

CSHTML

@(Html.EJ().Chart("container")
    .CommonSeriesOptions(options=>
        options.Tooltip(tooltip=>
            tooltip.Visible(true)))
    .PrimaryYAxis(axis=>axis.LabelFormat("${value} K"))
)

The following screenshot displays the Chart with formatted y value of the point in tooltip text.

Formatted the tooltip text in Chart

Figure 1: Chart with formatted tooltip text

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied