admin管理员组文章数量:1417041
Hello People i need to make some change to Jp graph...
1)i need to set X-axis range from '0' to '100' with step size '10'.
2)i need to set Y-axis range from '-5' to '6' with step size '1'.
3)i need to label the point selected on the graph, something like if the selected values are
'70' and '2'(which is shown in the graph),i wanna name it as 'point1' , if the second selected point lies on '80' and '3' then i want to name it as 'point2'..'point1 and point2 should e on the graph itself...'..is there a way to fix this?please help me to do fix these issues...
Hello People i need to make some change to Jp graph...
1)i need to set X-axis range from '0' to '100' with step size '10'.
2)i need to set Y-axis range from '-5' to '6' with step size '1'.
3)i need to label the point selected on the graph, something like if the selected values are
'70' and '2'(which is shown in the graph),i wanna name it as 'point1' , if the second selected point lies on '80' and '3' then i want to name it as 'point2'..'point1 and point2 should e on the graph itself...'..is there a way to fix this?please help me to do fix these issues...
Share Improve this question asked Sep 13, 2012 at 11:17 FriendFriend 1,34611 gold badges39 silver badges62 bronze badges 2- Fix what? You haven't shown any code. – stark Commented Sep 13, 2012 at 11:22
- 1 He's just asking for a possibility to set the scale of the x-axis and y-axis. – Peter Ilfrich Commented Sep 13, 2012 at 11:57
1 Answer
Reset to default 3$graph = new Graph(450,400,'auto');
$graph->SetScale("textlin");
// set major and minor tick positions manually
$graph->yaxis->SetTickPositions(array(0,10,20,30,40,50,60,70,80,90,100), array(5,15,25,35,45,55,65,75,85,95);
$graph->xaxis->SetTickLabels(array(-5,-4,-3,-2,-1,0,1,2,3,4,5,6));
$graph->yaxis->HideLine(false);
$graph->yaxis->HideTicks(false,false);
$graph->xaxis->HideLine(false);
$graph->xaxis->HideTicks(false,false);
Thats point 1 and 2. I dont know about 3 but they're plenty on online tutorials. Check out http://jpgraph/
本文标签: phpJpgraph How to manually set Ranges for Xaxis and YasxisStack Overflow
版权声明:本文标题:php - Jpgraph: How to manually set Ranges for X-axis and Y-asxis - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745264527a2650518.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论