Hey Everyone,
I'm trying to display scientific notation in my pdf using JavaScript but I keep running in to an issue where the .toExponential method thinks my input isn't a number and keeps throwing a type error. Has anyone else had this issue and if so what was your work around? Attached is my test html. The html works in the browser, it's just not rendering with Prince.
If it helps, this was found while working with a line chart from d3js. More specifically the "formatDecimal" method (I believe is only used under the hood) which uses the built in toExponential method (https://github.com/d3/d3-format/blob/master/src/formatDecimal.js#L5)
Thanks!
I'm trying to display scientific notation in my pdf using JavaScript but I keep running in to an issue where the .toExponential method thinks my input isn't a number and keeps throwing a type error. Has anyone else had this issue and if so what was your work around? Attached is my test html. The html works in the browser, it's just not rendering with Prince.
If it helps, this was found while working with a line chart from d3js. More specifically the "formatDecimal" method (I believe is only used under the hood) which uses the built in toExponential method (https://github.com/d3/d3-format/blob/master/src/formatDecimal.js#L5)
Thanks!