# Add ToolTips to Axes

## Content



To add tooltips to the chart's axes, complete the following steps:

1.  Add **C1Chart** to the Form.
2.  Add the following directives to declare the C1.Win.Chart namepaces:
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in Visual Basic
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```vbnet
    Imports C1.Win.C1Chart
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in C#
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```csharp
    using C1.Win.C1Chart;
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
3.  Add the following code in the Form\_load procedure to add the chart's axes
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in Visual Basic
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```vbnet
    'Enable tooltip
    C1Chart1.ToolTip.Enabled = True
    C1Chart1.ChartArea.AxisX.TooltipText = "X-Axis"
    C1Chart1.ChartArea.AxisY.TooltipText = "Y-Axis"
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in C#
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```csharp
    //Enable tooltip
    c1Chart1.ToolTip.Enabled = true;
    c1Chart1.ChartArea.AxisX.TooltipText = "X-Axis";
    c1Chart1.ChartArea.AxisY.TooltipText = "Y-Axis";
    ```
    
    DOC-DETAILS-TAG-CLOSE
    

### This topic illustrates the following:

When you hover over the x-axis and y-axis on the chart area at run time, the tooltips appear for the x-axis and y-axis, like the following:

<br />![](https://cdn.mescius.io/document-site-files/images/70bd33a2-280e-4cc3-a1c0-7b827eceb8aa/imagesext/image10_8.png)

## See Also

[Adding Visual Effects to Chart Elements](/componentone/docs/win/online-chart2d/chartforwinformstask/addingvisualeffectst)