If I create a bar chart (with the JavaScript Bar Chart node) that averages several identical values, even if they are integers, some of the resulting values end up being infinitesimally more or less than the original values. For example, if I plot a category consisting of five 3s (that is, an integer column with five rows of the value ‘3’), then hover my cursor over the relevant bar, the label says 'Value: 3.00000000004" (or something close – I didn’t count the exact number of zeros!).
Funnily enough, the value reverts to an exact integer if I only include four rows of 3. And five rows of 2, 4 or 5 also yield proper integers. But five 6s convert to 6.0000000000001.
I assume that this behaviour stems from some quirk of the floating point engine that underlies all the arithmetic in KNIME. Indeed, I can see that the same values are created by the GroupBy node if you view the results with full precision. In most instances, this doesn’t matter. But the bar chart provides no way to correct for these deviations, for example by rounding to a given number of decimals. It is very annoying when some of your data labels show the expected number of decimal places while others show about 12 decimal places, most of them 0s.
Is there some way to fix this, or is there a fix on the horizon?