Problems with the Trace effect

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« 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 Renato on 12th August 2014
Hy,
   I'm tring use trace with multiple line charts. It appears to work fine, but if I click on the chart after it was displayed part of the graf disapiers and another part of the graph changes color. Apperantly I can olny use trace in one line.
   Does anyone knows how this problem can be fix?


<!DOCTYPE html>
<html>
 
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  
  <canvas id="cvs" width="700" height="200">[No canvas support]</canvas>
 
  <script>
   window.onload = function ()
   {
       
    var line = new RGraph.Line('cvs', [-0.9,-0.7,-0.5,-0.3,-0.1,0.1,0.3,0.5,0.7,0.9])
     .set('ymax', 1)
     .set('filled', true)
     .set('fillstyle','rgba(191,191,191,0.5)')
     .set('yaxispos','right')
     .set('xaxispos', 'center')
     .set('gutter.left', 80)
     .set('gutter.right', 80)
     .set('colors', ['gray'])
     .set('linewidth', 1)
     .set('shadow',false)
     .set('tickmarks',null)
     .set('units.post', 'bps')
     .set('scale.decimals', 1)
     .trace()
    var line = new RGraph.Line('cvs', [10.1,10.2,10.3,10.4,10.5,10.6,10.7,10.8,10.9,11])
     .set('ymin', 10.00)
     .set('ymax', 11)
     .set('gutter.left', 80)
     .set('gutter.right', 80)
     .set('colors', ['red', 'blue', 'gray'])
     .set('key', ['D0', 'D-1','Dif'])
     .set('linewidth', 1)
     .set('filled', false)
     .set('shadow',false)
     .set('tickmarks',null)
     .set('scale.decimals', 2)
     .set('units.post', '%')
     .set('scale.decimals', 1)
     .trace()
    var line = new RGraph.Line('cvs', [[11,10.90,10.8,10.7,10.6,10.5,10.4,10.3,10.2,10.1]])
     .set('numxticks', 21)
     .set('ymin', 10.76)
     .set('ymax', 10.87)
     .set('gutter.left', 80)
     .set('gutter.right', 80)
     .set('colors', ['blue'])
     .set('linewidth', 1)
     .set('filled', false)
     .set('shadow',false)
     .set('tickmarks',null)
     .set('scale.decimals', 2)
     .set('units.post', '%')
     .set('key.position.x', 90)
     .set('key.position.y', 10)
     .set('scale.decimals', 1)
     .trace()
    
   }
  
     </script>

   </div>

   <script src="/js/jquery-1.11.1.min.js"></script>
         <script src="/js/bootstrap.min.js"></script>
   <script src="/js/SSG.js"></script>
   <script src="/js/Ajax.js"></script>

  
  <script src="js/libraries/RGraph.common.core.js"></script>
     <script src="js/libraries/RGraph.common.dynamic.js"></script>
     <script src="js/libraries/RGraph.common.tooltips.js"></script>
     <script src="js/libraries/RGraph.line.js"></script>
  <script src="js/libraries/RGraph.common.key.js"></script>

 
 
</html>
Posted by Richard on 13th August 2014
Try using the trace2() effect instead. For example:

www.rgraph.net/tests/trace2.html





Richard

Add a reply




« Back to message list