My adjustable Line chart can't change the labelAbove value

« 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 Zsolt Kovács on 26th March 2014
Hi there!

A I have a litle problem. I make one line Graph and setup adjustable (('adjustable',true) ) and show value on line ('labels.above', true). When I change line then number on line not change:
What is the problem? THANK YOU!

          var line2 = new RGraph.Line('cvnplangraf', [10,2,5,6])
             .Set('ymax', 12)
             .Set('colors', ['pink'])
             .Set('noaxes', true)
             .Set('labels.above', true)
             .Set('tickmarks', 'circle')
             .Set('hmargin', 5)
             .Set('labels', ['2011','2012','2014','2015'])
             .Set('background.grid', false)
             .Set('gutter.bottom', '50')
             .Set('linewidth', 5)
             .Set('crosshairs', true)
             .Set('crosshairs.snap', true).Draw();

Posted by Richard on 26th March 2014
Hi there,

It's because the array that the labels run off isn't updated when the line is adjusted. But you can simply add an onadjust handler that updates the array for you as shown here:

Posted by Enter your name... on 26th March 2014
Thank YOU for HELP!

Add a reply

« Back to message list