How to display custom tooltip over Histogram Chart columns

12 Jun 20231 minute to read

On Setting ShowTooltip property to true, the series name will be displayed as tooltip on the histogram chart columns by default. You can also set custom tooltip by handling ChartRegionMouseMove event as follows.

private void chartControl1_ChartRegionMouseMove(object sender, ChartRegionMouseEventArgs e)

{

    string text = null;

    if (e.Region.IsChartPoint)

    {

        e.Region.ToolTip = "Tooltip " + e.Region.PointIndex.ToString();

    }

    else

    {

        text = "Not a chart Point";

    }    

}
Private Sub chartControl1_ChartRegionMouseMove(ByVal sender As Object, ByVal e As ChartRegionMouseEventArgs)

    Dim text As String = Nothing

    If e.Region.IsChartPoint Then

        e.Region.ToolTip = "Tooltip " & e.Region.PointIndex.ToString()

    Else

        text = "Not a chart Point"

    End If

End Sub

Chart Histogram in WindowsForms application

See Also

Chart Region Events, Tooltips, Histogram chart