The annotatable option doesn't work with the interactive key

Share RGraph:   Share or Like RGraph on Facebook!

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Weezy on 14th June 2016
Hello,

the annotatable option doesn't work, I don't know why.

This is my program:

<script>
    window.onload = function ()
    {
        RGraph.AJAX.getJSON('getJson2.php', drawBar);

    /*
    This is the AJAX callback function. It splits up the response,
    converts it to numbers and then creates the chart.
    */

       function drawBar (json){

           var bar = new RGraph.Bar({
               id: 'bar',
               data: json.data,
                   options: {
                     annotatable: true,
                     annotateLinewidth: 2,
                     colors: ['#7CB5EC','#434348','#90ED7D', '#791CF8'],
                     contextmenu: [['Clear', function () {RGraph.Clear(bar.canvas);
                                RGraph.ClearAnnotations(bar.canvas); bar.Draw();}]],
                     labels: json.nom,
                     labelsAbove: true,
                     key: ['a','b','c','d'],
                     keyInteractive: true,
                     hmarginGrouped: 3,
                     hmargin: 20
                   }
           }).draw()
       }

    };

</script>

When I delete "keyInteractive: true" annotatable option work.
Posted by Richard on 14th June 2016
Hi,

Yes the annotatable option won't work with the interactive key I'm afraid.





Richard
Posted by Weezy on 14th June 2016
Ok thanks :)

Add a reply




« Back to message list