2nd Y axis obscures part of graph

Bug #936739 reported by Darrell Bishop
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Graphite
Fix Released
High
Michael Leinartas

Bug Description

Found in graphite 0.9.9; attached diff is against a fresh checkout of lp:graphite.

I noticed a graph with a second Y axis "lagging". That is, the data in the graph is correct after a couple of minutes.

I tracked the problem down and I think I've fixed it (see attached patch). I didn't extensively test it with all they types of axis (log, etc.), but it did fix my particular graph.

Revision history for this message
Darrell Bishop (darrellb) wrote :
Revision history for this message
Michael Leinartas (mleinartas) wrote :

2 axis graph with right side chunk missing

Revision history for this message
Michael Leinartas (mleinartas) wrote :

1 axis graph of data from metric2 in 2-axis graph for comparison

Changed in graphite:
importance: Undecided → High
milestone: none → 0.9.10
status: New → Confirmed
assignee: nobody → Michael Leinartas (mleinartas)
Revision history for this message
Michael Leinartas (mleinartas) wrote :

Thanks, this is a great find - not obvious to spot but very impactful bug (the right side of the graph is important!). The patch was very helpful to illustrate what was going on, however I found a simpler fix: The reason this only happened with the right y-axis and not the left is because the adjustments to the border on the left side is always done from the absolute reference of self.margin (or 0 in the case of 1 axis and hideYAxis=true). The right side was calculating the correct offset relative to self.area['xmax'] and then changing that xmax value.

I've changed the setupTwoYAxes xmax shift to calculate from the width (self.width) which resolves the issue. I've also added an additional check in the code that calls the Y axis setup to properly check for changes in xmax as well as xmin from the axis setup.

Revision history for this message
Michael Leinartas (mleinartas) wrote :

Committed in r724

Revision history for this message
Michael Leinartas (mleinartas) wrote :

Oops, marking as committed

Changed in graphite:
status: Confirmed → Fix Committed
Changed in graphite:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.