# Add ToolTips to Chart's Header and Footer

## Content



To add tooltips to the chart's header and footer, complete the following steps:

1.  Add **C1Chart** to the Form.
2.  Add the following directive to declare the **C1.Win.C1Chart** namepace:
    
    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 tooltips to the header and footer:
    
    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.Header.TooltipText = "This is header tooltip." + ControlChars.Cr + ControlChars.Lf + "Second line."
    c1Chart1.Footer.TooltipText = "This is footer tooltip." + ControlChars.Cr + ControlChars.Lf + "Second line."
    ```
    
    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.Header.TooltipText = "This is header tooltip.";
    c1Chart1.Footer.TooltipText = "This is first line of the footer ToolTip.\nThis is the second line of the footer ToolTip.";
    ```
    
    DOC-DETAILS-TAG-CLOSE
    

### This topic illustrates the following:

The ToolTips appear when you hover over Chart's Header or Footer at run-time, like the following:

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

## See Also

[Add ToolTips to Axes](/componentone/docs/win/online-chart2d/chartforwinformstask/addtooltipstochartel/addtooltipstoaxes)