SharpPlot Reference > SharpPlot Methods > AddTips Method

SharpPlot.AddTips Method

Set tips for one or more data points or a chart object.

Example

sp.AddTips(new string[] {"Home","Export"});
sp.AddTips("Hello, world",7,"LastSeries");
sp.AddTips(ScriptTarget.Heading,"This is my chart");

Overloads

Description

This method adds pop-up hints to a given set of data points, so that as you move the mouse over the data in the viewer, the hint can be shown in the status bar at the bottom of the screen. Hints are supported by VML (directly) and by images if you create an associated imagemap. Title tags are added to the SVG output, and may be rendered as pop-ups using JavaScript.

To create tips for every datapoint in a series, pass an array of strings, matching the structure of your data.

sp.AddTips(Product_descriptions);

Here, a product description could be associated with each pie sector, bar segment or marker.

You may also target specific data points, for example:

sp.AddTips("End of year",3);

Which will add a tip to this specific data-item in the first (or only) series.

Adding tips to fixed items

Tips may also be used to add extra information to standard text items such as notes or headings. You may give an array of hints for multiple items such as XZones or the legend text.

ch.AddTips(ScriptTarget.XZones,new string[]{"Reagan","Carter","Clinton"});

This would typically be used to annotate a ‘backcloth’ of historical events behind a timeseries.

See also ...

SharpPlot Members


Send comments on this topic
© Dyalog Ltd 2021