Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.0

Bug #4522 Image_Graph_Axis::_calcLabelInterval() dont work like it was working before
Submitted: 2005-06-03 18:20 UTC
From: sebhtml at users dot sourceforge dot net Assigned:
Status: Bogus Package: Image_Graph
PHP Version: 4.3.11 OS: Slackware 10
Roadmaps: (Not assigned)    

 [2005-06-03 18:20 UTC] sebhtml at users dot sourceforge dot net
Description: ------------ Look at the expected result and actual result. The automatic interval don 't work... I can't set it manually because all users have a max-min that is different... When I was using Image_Graph 0.3.0, the histograms were not working , but the automatic interval was working. I checked the code and it it not the same for the method Image_Graph_Axis::_calcLabelInterval() --sebhtml Reproduce code: --------------- The code to reproduce the bug is : (this is a class) and the code that use the class : Expected result: ---------------- If I set manually the interval, it looks like this : Actual result: -------------- The actual result look like this :


 [2005-06-03 18:41 UTC] pear dot nosey at veggerby dot dk
Actually it works as designed (as far as I can see)... The only discrepancy is that I'd have said this thing was changed prior to 0.3.0, but I _do_ think it is the "culprit": The "problem" lies in that the default x-axis is now not a linear scale axis but a category axis (i.e. the actual x-values are distributed equally in-order-of-dataset on the axis), this also means that auto-labelinterval calculations aren't used on the x-axis - all values are shows by default! What you can do to remedy this is : 1) Make the graph use a linear x-axis as in the old days, by specifying the axis "types" as parameters on the plotarea constructor: $Plotarea = new Image_Graph_Plotarea("axis", "axis"); 2) Use setLabelInterval() on the x-axis, which leeds me to: You should not access methods or attributes that are named starting with an _ (underscore) they are private (pseudo- since PHP4 has no method/attribute visibility). There is a method setLabelOptions() for accessing the _labelOptions attribute (not that it makes any difference in this case, but visibility is there for _me_ as a provider of the class to be able to always be certain of the class' inner state, which cannot be guaranteed if you fiddle with the private variables :)) Hope this helps you on your path... regards Jesper
 [2005-06-03 21:03 UTC] sebhtml at yahoo dot ca
Thank you very much!!!!!!
 [2006-12-27 05:21 UTC] cellog (Greg Beaver)
not a bug