carbon-design-system / carbon-charts

:bar_chart: :chart_with_upwards_trend:⠀Robust dataviz framework implemented using D3 & typescript
https://charts.carbondesignsystem.com
Apache License 2.0
908 stars 184 forks source link

Donut chart: Values on the Y-axis are showing as a decimal instead of a whole number #1444

Closed gentryb closed 1 year ago

gentryb commented 2 years ago

Description

Problem: Values on the Y-axis are showing as a decimal, e.g. 0.2, instead of a whole number.

Screenshot image

I have been informed by development using this component, that this is a bug within the donut chart component and can't be resolved on their end. Let me know what additional info you need, code snippet, etc. or the best next steps. Related issue

theiliad commented 1 year ago

Hi, the decimals can now be removed by doing

  "axes": {
    "left": {
      "mapsTo": "value",
      "ticks": {
        "values": [0, 1]
      }
    }
  }

https://stackblitz.com/edit/so38eu?file=data.json,options.json