Adding Tips and Hyperlinks to Data
Adding hyperlinks to the chart
To keep the example simple, I have just used the company name to set the Tip information here probably you would want a rather more effective text description of each company. Here are the extra lines you need in the script:
grapl.Hyperlinks = Col_Website
grapl.Tips = Col_Company
Now when you run the complete script, you will see the tip appear when the mouse is over the appropriate bar, and the link will run when the user clicks it.
Charts which support linking
You can use tips and hyperlinks on any of:
- Piecharts, with exploded sectors if you need them
- Barcharts, horizontal and vertical, and Step charts
- Scatter plots and Lineplots, but these must have the markers style included. You can always set the marker type to invisible the links will be active in a region of about 4 pixels radius around the places where the markers would be.
- Polar charts and Cloud charts (3D scatter) again only if markers are present.
- Tower charts, but only the tower tops are sensitive to the mouse.
Currently, you cannot use hyperlinks from Gantt charts. Also MinMax charts cannot have links, although these would often have a Close value overlayed as a lineplot. If you render the chart as VML, hyperlinks may be included in any of the chart text (headings, footnotes and so on) simply by adding the appropriate HTML tags into the text. This capability does not work with charts saved in PNG format, but will work as expected (without the hints/tips) with charts rendered to SVG.
For a good example of this technique in action, see the climate charts on www.causeway.co.uk. Around 10 years of daily rainfall and temperature data can be accessed by drilling down from annual summaries.
|