View unanswered posts | View active topics It is currently Tue Jan 22, 2019 9:53 pm



Reply to topic  [ 1 post ] 
Formatting Y Axis 
Author Message
New pChart user
New pChart user

Joined: Tue Jul 30, 2013 1:59 pm
Posts: 1
Post Formatting Y Axis
Hello,

I am new in pchart and i am trying to use it to get some graphs from my weatherstation data.

In my Wind Direction graph, i am having 2 problems.

First, in my sql table, i have a column with the numeric degrees (0 to 360ยบ), and i have another column with the text (N, E, ..., S).

One: i can't make the graphic using the text column (like this graphic: http://meteofontes.cm-lagoa.pt/images/d ... =747107287 ). Is there any solution to make it that way?

Second: using the numeric column, and using the next code:
/* Draw the scale */
$AxisBoundaries = array(0=>array("Min"=>0,"Max"=>360));
#$scaleSettings = array("GridR"=>200,"GridG"=>200,"GridB"=>200,"DrawSubTicks"=>TRUE,"CycleBackground"=>TRUE,"Mode"=>SCALE_MODE_MANUAL, "ManualScale"=>$AxisBoundaries);
$scaleSettings = array("Mode"=>SCALE_MODE_MANUAL,"ManualScale"=>$AxisBoundaries,"LabelSkip"=>45,"LabelRotation"=>90,"XMargin"=>10,"YMargin"=>10,"Floating"=>TRUE,"GridR"=>200,"GridG"=>200,"GridB"=>200,"DrawSubTicks"=>TRUE,"CycleBackground"=>TRUE);
$myPicture->drawScale($scaleSettings);

I can't get the Y scale to respect the maximum value of 360. In the graph (in atachment) it always goes from 0 to 400, with divisions of 100. How can i format this to go from 0 to 360, with divisions of 90?

Thank you very much.


Attachments:
graficodirventodiaria.png
graficodirventodiaria.png [ 25.11 KiB | Viewed 2476 times ]
Tue Jul 30, 2013 2:16 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron