为什么工具提示值四舍五入?

Why are tooltip values rounded?

出于某种原因,我的工具提示四舍五入到最接近的整数?

感谢任何帮助。

这是在 VL 编辑器(版本 3.0.0-rc14)中绘制的 link 图表。

(vega editor link)

{
  "width": 300,
  "height": 300,
  "config": {
    "title": {"fontSize": 15},
    "numberFormat": ".0f",
    "style": {
      "bar": {"size": 20},
      "guide-title": {"value": "asdf", "fontSize": 15},
      "guide-label": {"fontSize": 15}
    },
    "scale": {"bandPaddingInner": 0.5, "bandPaddingOuter": 0.5},
    "legend": {"symbolSize": 100, "titleFontSize": 15, "labelFontSize": 15},
    "axis": {"titleFontSize": 15, "labelFontSize": 15, "labelLimit": 1000}
  },
  "data": {"name": "data-dba50c8bae540866b10e6763560b8ec9"},
  "mark": "circle",
  "encoding": {
    "tooltip": [
      {"type": "quantitative", "field": "expressiveness"},
      {"type": "quantitative", "field": "customization"}
    ],
    "x": {"type": "quantitative", "field": "expressiveness"},
    "y": {"type": "quantitative", "field": "customization"}
  },
  "$schema": "https://vega.github.io/schema/vega-lite/v2.6.0.json",
  "datasets": {
    "data-dba50c8bae540866b10e6763560b8ec9": [
      {"library": "A", "expressiveness": 0, "customization": 1},
      {"library": "B", "expressiveness": 0.4, "customization": 0.7},
      {"library": "C", "expressiveness": 1, "customization": 0.7},
      {"library": "D", "expressiveness": 0.6, "customization": 0.7},
      {"library": "E", "expressiveness": 0, "customization": 1}
    ]
  }
}

因为您在配置中设置了 "numberFormat": ".0f",这也适用于工具提示。