set labels upside or downside on chart

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 jlost55 on 13th May 2014
Hi there,

I created my labels with a text object.

is there a easy trick to set my labels on the upside or downside of the chart based on the coordinates of the lines where the lines stopped?

I use now "line.coords2" but it is very difficult to set my labels good on the chart.
Posted by Richard on 13th May 2014
Hi

I've no idea what you're referring to - try posting a link to a picture showing what you mean.






Richard
Posted by jlost55 on 13th May 2014
www.dropbox.com/s/law701b0xe6a9xp/labels%20positioning.PNG

-6% must be more rightside like the labels upside of the chart.

But it is very difficult because the lines changes always. I want to it automatically and not coding like this:

         switch(i)
         {
          case 24:
           coordX=coordX+10;
           break;
          case 26:
           coordX=coordX+15;
           break;
          case 28:
           coordX=coordX+20;
           break;
          case 30:
           coordX=coordX+10;
           break;
         }

Is there an easier trick to set up the labels up the lines without calculate the coordinates?
Posted by jlost55 on 13th May 2014
Another examples are:

www.dropbox.com/s/w1tdgh6uvkskhha/labels%20positioning%202.PNG (-10% must be more on the rightside)

www.dropbox.com/s/1y8f43yuxaho0cs/labels%20positioning%203.PNG (label 18% will be more on the lefside)
Posted by Richard on 13th May 2014
Hi

There's nothing automatic - drawing the text with the drawing API so you can control the coordinates is probably the right route.






Richard
Posted by jlost55 on 13th May 2014
Hi,

Ok, thanks!

it is difficult to positioning the labels on the lines.

Add a reply




« Back to message list