Vertical angle labels on the Line chart not working

Share RGraph:   Share or Like RGraph on Facebook!

« 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 Krzysiek on 21st June 2016
Hi,

I'm using csv data and line chart. I'm trying to set vertical labels because I have lot of x labels but I fail. This is commands that I'm using:

              line[i] = new RGraph.Line('cvs'+i,data[i])
       .Set('labels', labels)
                     .Set('labels.above.size', 8)
                     .Set('noxaxis', true)
                     .Set('shadow', true)
                     .Set('shadow.offsetx', 10)
                     .Set('shadow.offsety', 10)
                     .Set('shadow.blur', 10)
                     .Set('hmargin', 15)
                     .Set('background.grid.autofit.numvlines', 7)
                     .Set('colors', ['Gradient(#DDF:#01B4FF)'])
                     .Set('linewidth', 2)
                     .Set('strokestyle', 'white')
       .Set('textSize', '8')
       .Set('gutterLeft',40 )
       .Set('text.angle',90)
       .Set('gutterBottom',10 )
       .Set('scaleZerostart', 'true')
       .Set('textAccessible', 'true')
       .Set('xmax',10)
                     .Draw();

What am I doing wrong? Is there some method to reduce number of displayed x labels?

Best regards,
Krzysiek
Posted by Richard on 21st June 2016
Hi there,

Accessible text doesn't work with angles. So try disabling it:


line[i] = new RGraph.Line('cvs'+i, data[i])
     .set('labels', labels)
     .set('textAngle',90)

     // You don't need to put quotes around the true or false values
     .set('textAccessible', false)

     // Nor do you need quotes around numbers
     .set('textSize', 8)

     .set('xmax',10)
     .draw();






Richard
Posted by Krzysiek on 21st June 2016
Thanks Richard,

Now it works!

Best regards,
Krzysiek
Posted by Jack on 28th August 2016
Thanks Krzysiek, Richard, I had the exactly same issue! It would be super nice if you guys document this incompatibility here:
www.rgraph.net/docs/bar.html => textAngle...
www.rgraph.net/docs/line.html => textAngle...

Add a reply




« Back to message list