Wrap - up alignment

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 Rajani on 21st October 2013
Hello, anybody is there, please help me,
I am writing the code for line graph, I am creating the different zones for floors.
Like zone-1,zone-2,zone-3.... etc..
But those are completely not showing in top legend. its cut the data..
How to rectify this issues. please help me out..

Legend like zone-1 etc may need to have some "wrap-up" alignment depending on the number of zones..

This is My Code:

$('#myCanvas').css("width", "700px");
     $('#png_link').show();
     var line = new RGraph.Line('myCanvas', jsonObj[2]);
     line.Set('chart.curvy', true);
     line.Set('chart.curvy.tickmarks', true);
     line.Set('chart.curvy.tickmarks.fill', null);
     line.Set('chart.curvy.tickmarks.stroke', '#aaa');
     line.Set('chart.curvy.tickmarks.stroke.linewidth', 2);
     line.Set('chart.curvy.tickmarks.size', 5);
     line.Set('chart.linewidth', 3);
     line.Set('chart.hmargin', 5);
     line.Set('chart.labels', jsonObj[0]);
     line.Set('chart.text.angle', 45);
     line.Set('chart.gutter.left', 50);
     line.Set('chart.gutter.right', 12);
     line.Set('chart.gutter.bottom', 50);

     line.Set('chart.tooltips', jsonObj[2]);
                 line.Set('chart.tooltips.event', 'onmousemove');
     line.Set('chart.tickmarks', 'circle');
    
     line.Set('chart.key', jsonObj[1]);
     line.Set('chart.key.position', 'gutter');
     line.Set('chart.key.position.gutter.boxed', false);
     line.Set('chart.key.position.x', 0);
     line.Set('chart.key.text.size', 8);
    


Please help me out.. How to fix this issue.. Thanks.....
Posted by RGraph Support on 21st October 2013
Hi,

Have you got a big enough top gutter? There is an example using some of your settings here:

www.rgraph.net/fiddle/view/a-line-chart-with-a-key



Richard, RGraph Support
Posted by Rajani on 21st October 2013
Hi, Thanks for support..

Am using same code in my project. but its not showing..
suppose 50 zones are there.line zone-1,zone-2... up to zone-50. this data showing up to 12 zones only, after that data is not showing.. its cut of the data.

suppose am increasing the canvas width, then all zones are showing..

In my project, zones are coming dynamically. so how to fix the width for top legend width and how to fix the width.
Posted by RGraph Support on 21st October 2013
Hi there,


If you have lots of key entries then the key will simply be too big for the canvas. You may have to investigate creating a HTML based key - eg a table.


Richard, RGraph Support
Posted by RGraph Support on 21st October 2013
Hi there,

As an after-thought the next stable release of RGraph will have an RGraph.HTML.Key() function. This will allow you to easily have a HTML based key that won't be constrained by the dimensions of the canvas. It probably won't be interactive (certainly not initially) - but it won't be constrained by the dimensions of the canvas.




Richard, RGraph Support

Add a reply




« Back to message list