The annotatable option doesn't work with the interactive key


« 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

PLEASE READ:

If RGraph has helped you please give your feedback - thanks! You can give your feedback or leave a testimonial by adding a forum post or clicking on the speech bubble icon at the very top right.

But most of all: Please link to the RGraph website! (get information by clicking on the chain icon at the top right of the page)
Posted by Weezy on 14th June 2016
Ok thanks :)

Add a reply

 




« Back to message list
RGraph on social media