Closed dret closed 8 years ago
Hi,
if I set the hovernumber accordingly it formats both to two decimals
hoverNumber: { decimalsX: 3, decimalsY: 2 },
Can you provide a sample?
thanks for the feedback! this screen shot shows the problem, and here's the config i am using:
hoverNumber: {
decimalsX: 2,
decimalsY: 0,
formatter: undefined
}
i am not sure where the formatter
is coming from, i guess i just copied this from somewhere. is it possible that the formatter is the problem?
The "decimalsY" attribute is used for the height labels. So setting it to 2 should round your numbers as you wish. The formatter attribute can be deleted if you don´t specify a formatting function.
it works for the graph tooltip, but not for the line tooltip, as you can see in the screen shot. i am not sure if that's a bug, or a missing feature.
But your example states decimalsY=0 not 2. Or do you want to have no decimals at all?
On 2016-03-03 11:17 , Felix Bache wrote:
But your example states decimalsY=0 not 2. Or do you want to have no decimals at all?
i am fine with how it shows up on the graph: two decimals for distance, none for elevation. what i was hoping for that it also would show up like this (no decimals, and not full precision as it is now) on the pointer on the line.
With the latest version this works fine for me.
On 2016-03-03 19:32 , Felix Bache wrote:
With the latest version this works fine for me.
i have to admit that i was using 0.0.2 so far. however, now i am trying to switch to 0.0.4, but when simply switching the JS and CSS files, things stop working completely. i don't even see my track anymore, let alone the elevation graph. i guess i have to spend some time to try to figure out how to upgrade from 0.0.2 to 0.0.4, or is there anything that comes to mind that could be a problem?
figured out my upgrade issues and on this new screen shot, it indeed works. i should have looked at the version i am using. thanks for the feedback and help!
Great to hear it works now!
when setting the elevation formatting to 2 decimals, this is taken into account for the graph, but not for the tooltip that is following the line. this still displays elevation in full resolution (which often is way too much). it would be great to apply he formatting function to the tooltip as well.