floledermann / mapmap.js

A data-driven API for interactive thematic maps
GNU Affero General Public License v3.0
113 stars 12 forks source link

numberformat:'d' prevents display in tooltip for numbers with decimal places #24

Closed wahlatlas closed 9 years ago

wahlatlas commented 9 years ago

Using numberFormat:'d' in the meta definition allows only integers to be displayed in the .hoverInfotooltip, whereas numbers with decimal places are not displayed at all, not even their label. This can currently be worked around with numberFormat:'0f'

floledermann commented 9 years ago

Formatting Strings are passed through to d3.format, which is implemented this way ("use Number.toString, but ignore any non-integer values")

I added a note in the documentation, though.