apexcharts-card: Yaxis displaying decimals incorrectly

Checklist

  • I updated the card to the latest version available
  • I cleared the cache of my browser
  • I verified that I’m really running the lastest version in my browser console
  • I checked if there is another issue opened with the same problem

Describe the bug A clear and concise description of what the bug is. I have set the decimals for the Y-axis to 0. Yet, it shows decimals.

image

Version of the card Version: 2.0.1

To Reproduce This is the configuration I used:

type: custom:apexcharts-card
header:
  show: true
  title: Unavailable Devices
apex_config:
  chart:
    height: 220px
  xaxis:
    labels:
      format: d/M hhtt
yaxis:
  - min: 0
    apex_config:
      decimalsInFloat: 0
      forceNiceScale: true
graph_span: 24h
series:
  - entity: sensor.unavailable_devices
    extend_to: false
    curve: stepline
    stroke_width: 2.5
    color: FireBrick
type: custom:apexcharts-card
header:
  show: true
  title: Unavailable Devices
apex_config:
  chart:
    height: 220px
  xaxis:
    labels:
      format: d/M hhtt
yaxis:
  - min: 0
    decimals: 0
    apex_config:
      forceNiceScale: true
graph_span: 24h
series:
  - entity: sensor.unavailable_devices
    extend_to: false
    curve: stepline
    stroke_width: 2.5
    color: FireBrick

Screenshots If applicable, add screenshots to help explain your problem.

Expected behavior A clear and concise description of what you expected to happen. I would expect the chart to have no decimals in the yaxis.

Desktop (please complete the following information):

  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22] Version 101.0.4951.54 (Official Build) (64-bit)

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21

Most upvoted comments

Great question! I created a new empty test dashboard and recreated the card there - same thing. I’m at a loss too! I appreciate you helping to test and at least validate that I’m not overlooking something boneheaded in my configuration.