Chart not showing tooltip and drag points


« 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 Richa Singh on 14th May 2014
Hello. I have just started using RGraph and must say it is one of best Free source.
I am trying to implement Adjustable points in Line Graph.Below iS the code



<html>
<head>
     <script src="../libraries/RGraph.common.core.js"></script>
     <script src="../libraries/RGraph.common.dynamic.js"></script>
     <script src="../libraries/RGraph.common.tooltips.js"></script>
     <script src="../libraries/RGraph.line.js"></script>
     <script src="ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js\"></script>
     <!--[if lt IE 9]><script src="../excanvas/excanvas.js"></script><![endif]-->



     <link rel="stylesheet" href="~/Content/demos.css" type="text/css" media="screen" />


</head>
<body>

     <canvas id="cvs" width="600" height="250" style="margin-left:50px;"></canvas>
   
     <script>
         RGraph.Registry.get('chart.adjusting.shape');
       
         window.onload = function (e) {
          
             var line = new RGraph.Line('cvs', [45, 74, 84, 85, 45, 35, 65, 68, 87, 97])
                 .set('labels', ['10%', '20%', '30%', '40%', '50%', '60%', '70%', '80%', '90%', '100%'])
                 .set('ylabels.outside', true)
                  .set('linewidth', 2)
                 .set('tooltips.event', onmousemove)
                 .set('hmargin', 10)
                 .set('shadow', true)
                 .set('adjustable', true)
                 .set('title', 'An adjustable line chart')
                 .set('outofbounds', true)
                 .set('chart.adjusting.shape',true)
                 .draw();
            

         }
         RGraph.Registry.get('chart.adjusting.shape');
        
     </script>
   
</body>
</html>

But for some reason it is not drag points and also tooltip. Thanks for help :)

Posted by Richard on 14th May 2014
Hi




1. chart.adjusting.shape is not an option - so you can't set it when configuring the object.
2. If you want to see the tickmarks you need to set them:

line.set('tickmarks', 'circle');

3. Similarly - you haven't set any tooltips.


Richard

Add a reply

 




« Back to message list
RGraph on social media