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

format don't work with exponential numbers #7405

Closed
xrado opened this issue Nov 15, 2017 · 4 comments
Closed

format don't work with exponential numbers #7405

xrado opened this issue Nov 15, 2017 · 4 comments
Assignees
Labels

Comments

@xrado
Copy link

@xrado xrado commented Nov 15, 2017

Expected behaviour

Highcharts.format('num {value:.8f}',{value:8.3000000e-7})
"num 0.00000083"

Actual behaviour

Highcharts.format('num {value:.8f}',{value:8.3000000e-7});
"num 8.30000000e-7"

Live demo with steps to reproduce

http://jsfiddle.net/xrado/jyLh6pqn/

see tooltip on the smallest bar

Affected browser(s)

probably all

@KacperMadej KacperMadej self-assigned this Nov 15, 2017
@KacperMadej
Copy link
Contributor

@KacperMadej KacperMadej commented Nov 15, 2017

Thank you for reporting the problem.

@xrado
Copy link
Author

@xrado xrado commented Nov 21, 2017

👍🏼

@xrado
Copy link
Author

@xrado xrado commented Jul 5, 2019

hi,

this still doesn't work with latest hc
I have on a serie
tooltip: { valueDecimals: 8 ..
and getting 9.0-e7

using highchairs 7.1.1 StockChart

@KacperMadej

@KacperMadej
Copy link
Contributor

@KacperMadej KacperMadej commented Jul 8, 2019

Hi @xrado

9.0-e7 is a correct number and it is meeting the decimals requirement as far as I can tell.

If you want to have a different format you could use tooltip formatter and process numbers as you wish.

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

Successfully merging a pull request may close this issue.

None yet
2 participants