Using interactive keys to highlight information on your chart

Documentation about making your key interactive (ie clickable). An interactive key can be used to highlight data series on your chart.

Note: The interactive key will use standard canvas text for the key - not DOM text. You can enable textAccessible if you want but the interactive key will ignore it.

A Line chart with interactive key
[No canvas support]

Formerly the interactive key was only implemented for the Line and Pie charts. As of June 2013, however, it was re-implemented and it's now available with the following chart types. The types are linked to demo pages each of which are included in the download archive.

You can view demos of each by clicking on the links. Having been re-implemented the interactive key now uses the drawing API Rect object and the dynamic library:

<script src="RGraph.common.core.js"></script>
<script src="RGraph.common.dynamic.js"></script>
<script src="RGraph.common.key.js"></script>
<script src="RGraph.drawing.rect.js"></script>

    window.onload = function ()
        var line = new RGraph.Line({
            id: 'cvs',
            data: [
            options: {
                xaxisLabels: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
                tickmarksStyle: 'endcircle',
                linewidth: 3,
                xaxisTickmarksCount: 12,
                spline: true,
                key: ['Rob','Julie','Jack'],
                keyPosition: 'margin',
                keyInteractive: true,
                textSize: 14