Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logarithmic scale with minimum axis value renders incorrectly #235

Closed
mleinart opened this issue Mar 13, 2013 · 3 comments · Fixed by #389
Closed

Logarithmic scale with minimum axis value renders incorrectly #235

mleinart opened this issue Mar 13, 2013 · 3 comments · Fixed by #389

Comments

@mleinart
Copy link
Member

Imported from https://bugs.launchpad.net/bugs/1092568

Reported by campbell-stephenson
Date Created Dec 20, 2012

Hi,

I am having a problem with version 0.9.10 of Graphite when applying a logarithmic scale (base 10) on the y axis and specifying a minimum value of 1 to the axis.

The series data has a value of about 42k and it renders correctly without the scale or the minimum value.

If I apply a minimum value of zero to the y-axis it renders correctly, but if I specify a minimum value of 1 Graphite chooses a maximum value of 40k so the series it not visible. I'm not too bothered about this but thought it was worth mentioning.

If I apply a logarithmic scale (base 10) on the y axis without a minimum set the series renders correctly but if I specify a minimum value of 1 the series is rendered below the 10k line which is incorrect.

Any help would be greatly appreciated,
Campbell

@mleinart
Copy link
Member Author

Comment by campbell-stephenson on Dec 20, 2012:

@mleinart
Copy link
Member Author

Comment by jakabov-launchpad on Jan 15, 2013:

This issue crops up even without without a y-axis minimum:

To reproduce: specify these params to the render api: &target=removeBelowValue(sinFunction("1000*sin(x)",1000),1)&logBase=10

Expected output: a graph with maximum value rendered at 1000

Actual output: maximum value is rendered between 100 and 1000 on the y axis.

It appears that the labels on the y-axis are not aligned correctly with the grid and the rendered data.

ralphm added a commit to ralphm/graphite-web that referenced this issue Aug 14, 2013
The code removed in this change added an additional entry to the list of
labels, causing the top of the graph to be extended by self.logBase. As
the corresponding labels have already been drawn, the result is a
graph with n+1 gridlines for n labels. Removing this addition resolves
the issue.

Fixes graphite-project#235.
jdanbrown pushed a commit to jdanbrown/graphite-web that referenced this issue Jan 4, 2014
The code removed in this change added an additional entry to the list of
labels, causing the top of the graph to be extended by self.logBase. As
the corresponding labels have already been drawn, the result is a
graph with n+1 gridlines for n labels. Removing this addition resolves
the issue.

Fixes graphite-project#235.
@jdanbrown
Copy link
Contributor

Thanks @ralphm! This bug has been bothering me for a while on 0.9.10. (Merged into my own fork.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants