jRobin

Vertical labels disappear on a certain graphs

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.5.9
  • Fix Version/s: 1.5.12
  • Component/s: General
  • Labels:
  • Environment:
    Operating System: Linux
    Platform: PC

Description

When selecting the one week view on this graph it seems the vertical label would disappear if the bandwidth went above a certain amount. When traffic is lower for the week view the labels remain however.

Activity

Hide
Tyler W. Mills added a comment -

Created an attachment (id=1011)
jrbs, pngs.

Information requested for bug. Images and JRB's included in zip.

Show
Tyler W. Mills added a comment - Created an attachment (id=1011) jrbs, pngs. Information requested for bug. Images and JRB's included in zip.
Hide
Craig Miskell added a comment -

The attached patch does a better job of picking the correct y-axis scale/grid step/label factor under the sort of circumstances seen in this bug report. It's primarily a problem with positive/negative graphs, on the boundaries of the various label factors/grid steps, where the zero-line label isn't sufficient

Show
Craig Miskell added a comment - The attached patch does a better job of picking the correct y-axis scale/grid step/label factor under the sort of circumstances seen in this bug report. It's primarily a problem with positive/negative graphs, on the boundaries of the various label factors/grid steps, where the zero-line label isn't sufficient
Hide
Craig Miskell added a comment -

As for a couple of other bug fixes of mine recently: can someone else review this patch and commit to version control if it looks ok? Sourceforge is taking their time sorting out my login.

Show
Craig Miskell added a comment - As for a couple of other bug fixes of mine recently: can someone else review this patch and commit to version control if it looks ok? Sourceforge is taking their time sorting out my login.
Hide
Benjamin Reed added a comment -

I'm not sure I understand the code well enough to review this. Any chance you could create some unit tests with common data to confirm it does the right thing? Then we could at least try the unit tests against the old and new code and make sure only the expected changes happened.

Show
Benjamin Reed added a comment - I'm not sure I understand the code well enough to review this. Any chance you could create some unit tests with common data to confirm it does the right thing? Then we could at least try the unit tests against the old and new code and make sure only the expected changes happened.
Hide
Craig Miskell added a comment -

Will do. Was actually thinking of doing a whole bunch of unit tests for JRobin in general, including the other recent fixes (64-bit, Version 3 etc). I think it needs it

Show
Craig Miskell added a comment - Will do. Was actually thinking of doing a whole bunch of unit tests for JRobin in general, including the other recent fixes (64-bit, Version 3 etc). I think it needs it
Hide
Benjamin Reed added a comment -

That would totally rock.

There are some nice data-generation bits in JRobinConverterTest.java in opennms-tools, if you want something to work off of

Show
Benjamin Reed added a comment - That would totally rock. There are some nice data-generation bits in JRobinConverterTest.java in opennms-tools, if you want something to work off of
Hide
Craig Miskell added a comment -

Ok, so I've added some unit tests so as to be able to validate the axis behaviour before and after. And patched the bug without affecting any of the tests in unexpected ways.
Committed as 53e38943c1ad6b3ac1a601a20a38958facc8d327
There's room for more unit tests of the ValueAxis code; the structure/examples that's there are good for more. The tests still need later refactoring to pass ImageWorker into RrdGraph, but we need other unit tests of RrdGraph itself to be able to do that truly safely.

Interestingly, the tests fail on bamboo (looks like different axis behaviour, possibly font related). Bugger; I'll look at that now.

Show
Craig Miskell added a comment - Ok, so I've added some unit tests so as to be able to validate the axis behaviour before and after. And patched the bug without affecting any of the tests in unexpected ways. Committed as 53e38943c1ad6b3ac1a601a20a38958facc8d327 There's room for more unit tests of the ValueAxis code; the structure/examples that's there are good for more. The tests still need later refactoring to pass ImageWorker into RrdGraph, but we need other unit tests of RrdGraph itself to be able to do that truly safely. Interestingly, the tests fail on bamboo (looks like different axis behaviour, possibly font related). Bugger; I'll look at that now.
Hide
Craig Miskell added a comment -

No idea why the tests are behaving differently on bamboo. If it's fonts, it's odd. Commented out some of the tests; they'll need revisiting when I've got more time (it's late here; I'm going to bed)

Show
Craig Miskell added a comment - No idea why the tests are behaving differently on bamboo. If it's fonts, it's odd. Commented out some of the tests; they'll need revisiting when I've got more time (it's late here; I'm going to bed)
Hide
Craig Miskell added a comment -

Have reinstated the previously broken tests, having enforced the use of the built in DejaVu font to get consistent cross-platform results (an excellent idea for reliable automated testing ). I'm pretty happy with the results, and I think this bug is now resolved.

Show
Craig Miskell added a comment - Have reinstated the previously broken tests, having enforced the use of the built in DejaVu font to get consistent cross-platform results (an excellent idea for reliable automated testing ). I'm pretty happy with the results, and I think this bug is now resolved.
Hide
Craig Miskell added a comment -

As mentioned earlier, this has been fixed. I probably didn't put the right magic in the commit message for it to be picked up by JIRA though. I think it got released in at least 1.5.12, or failing that 1.5.13 today. Can someone with the appropriate rights mark this bug as fixed?

Show
Craig Miskell added a comment - As mentioned earlier, this has been fixed. I probably didn't put the right magic in the commit message for it to be picked up by JIRA though. I think it got released in at least 1.5.12, or failing that 1.5.13 today. Can someone with the appropriate rights mark this bug as fixed?
Hide
Donald Desloge added a comment -

Found an issue with your patch. There seems to be on line 196 of ValueAxis.java the if (this.getPixelsPerGridline(thisYLab) > 5 ) {} doesn't have an else attached and returns a null. The outer while loop, loops until not null is found. Thus causing an infinite loop.

I have this reproduced in DefaultRrdDaoIntegrationTest in 1.9.91 the test is testNMS4861.

I need some jrobin insight, what should happen if we get a value less than 5?

Show
Donald Desloge added a comment - Found an issue with your patch. There seems to be on line 196 of ValueAxis.java the if (this.getPixelsPerGridline(thisYLab) > 5 ) {} doesn't have an else attached and returns a null. The outer while loop, loops until not null is found. Thus causing an infinite loop. I have this reproduced in DefaultRrdDaoIntegrationTest in 1.9.91 the test is testNMS4861. I need some jrobin insight, what should happen if we get a value less than 5?
Hide
Donald Desloge added a comment -

A patch to JRobin, prevents an infinite look, when the range between datapoints is too large for the YLab

Show
Donald Desloge added a comment - A patch to JRobin, prevents an infinite look, when the range between datapoints is too large for the YLab

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: