When using multiple charts the clear annotations function doesn't work

« 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 Javier on 18th June 2013
Hello everybody!

When i put the code corresponding to diferent graphs in the same file, the function "clear annotations" only works for the last graph inserted...

Some of you know why?.. Excuse my ignorance.

Remember clear annotations:


  <!-- Don't forget to update these paths -->
     <script src="libraries/RGraph.common.core.js" ></script>
     <script src="libraries/RGraph.line.js" ></script>
     <script src="libraries/RGraph.common.dynamic.js"></script>
     <script src="libraries/RGraph.common.context.js" ></script>
     <script src="libraries/RGraph.common.tooltips.js"></script>
     <script src="libraries/RGraph.common.annotate.js" ></script>
<script type="text/javascript" src="apis.google.com/js/plusone.js\"></script>

previous <--



  chart.Set('chart.contextmenu', [
                                  ['Show palette', RGraph.Showpalette],
                                  ['Clear', function ()


Posted by RGraph support on 18th June 2013
Hi there,

This page shows it working for both:


Be careful with your canvas references that you're passing to the clear function - ie make sure you're giving it the correct one. Whilst testing I did notice that IE10 isn't saving annotations - but that's a seperate issue.

Richard, RGraph Support
Posted by Javier on 20th June 2013
Thanks a lot!!

Add a reply

« Back to message list