Additional decimal Apexchart

Hi, I’m trying to add the extra zero. If the value is 0.30 €/kWh, it shows as 0.3 €/kWh.
Spent 4 hours on it sofar… (help…)

Here’s my code. Thx!

type: custom:apexcharts-card
now:
  show: true
  label: Nu
  color: '#ffc0cb'
locale: nl
header:
  show: true
  title: Smart Charging
  show_states: true
graph_span: 2d
yaxis:
  - min: ~0
    decimals: 2
    apex_config:
      forceNiceScale: true
span:
  start: day
apex_config:
  legend:
    show: false
  xaxis:
    labels:
      show: true
      format: HH
      rotate: 0
      rotateAlways: true
      hideOverlappingLabels: true
      style:
        fontSize: 10
        fontWeight: 10
series:
  - entity: sensor.ev_smart_charging_charging
    name: Dynamisch tarief ANWB
    unit: ' €/kWh'
    data_generator: >
      return entity.attributes.raw_two_days.map((entry) => { return [new
      Date(entry.start), entry.value]; });
    type: line
    float_precision: 2
    show:
      in_header: before_now
    extend_to: false
    color_threshold:
      - value: -0.19
        color: yellow
      - value: 0
        color: green
      - value: 0.19
        color: orange
      - value: 0.29
        color: red
      - value: 0.39
        color: magenta
      - value: 0.49
        color: black
  - entity: number.ev_smart_charging_low_price_charging_level
    stroke_width: 1
    color: lightgreen
    curve: straight
    show:
      in_header: false
  - entity: number.ev_smart_charging_electricity_price_limit
    stroke_width: 1
    color: red
    curve: straight
    show:
      in_header: false
  - entity: sensor.ev_smart_charging_charging
    name: Charging
    data_generator: >
      return entity.attributes.charging_schedule.map((entry) => { return [new
      Date(entry.start), entry.value]; });
    type: area
    curve: stepline
    color: black
    show:
      in_header: false
    extend_to: false
experimental:
  color_threshold: true

I was about to recommend float_precision, but you have that already.

Only way would be to modify the card using another HACS custom integration like cardmod.

I would recommend just using a separate card to show the current state, and hide the label on your graph. That’s probably the easiest way to do it.