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

Z exponent fix #2422

Merged
merged 2 commits into from
Feb 28, 2018
Merged

Z exponent fix #2422

merged 2 commits into from
Feb 28, 2018

Conversation

alexcjohnson
Copy link
Collaborator

Fixes #2420 - #2106 improved formatting here but broke the default behavior for z values that need exponents. Fortunately the fix was a one-liner.

cc @etpinard

@etpinard etpinard added the bug something broken label Feb 28, 2018
@@ -1528,7 +1528,7 @@ function numFormat(v, ax, fmtoverride, hover) {
if(hover) {
// make a dummy axis obj to get the auto rounding and exponent
var ah = {
exponentformat: ax.exponentformat,
exponentformat: exponentFormat,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch 🎣

['123.4568', '12.34568B', expFmt('1', 23)]
]
.forEach(function(row, y) {
row.forEach(function(zVal, x) {
Copy link
Contributor

@etpinard etpinard Feb 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ test! Why create 12 test cases when we can loop over 12 bricks!

@etpinard
Copy link
Contributor

💃 nicely done

@alexcjohnson alexcjohnson merged commit 22cfd39 into master Feb 28, 2018
@alexcjohnson alexcjohnson deleted the z-exponent-fix branch February 28, 2018 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contour plot "undefined" label when z >= 10 million
2 participants