Value formatter in charts

Sorry for yet another (e)chart question.
I’m using markPoints to get the bubbles to show min and max values, but these show fractional numbers I’d like to round.

Apache echarts googld wisdom suggest to use sth like

formatter: (value) => (value * 1000) / 1000

but I can’t get that formatter to work.
Does anybody have a working example?

This works for me:

    markPoint:
      label:
        formatter: =v=>v.data.value.toFixed(0)
      data:
        - name: min
          type: min
        - name: max
          type: max

That worked - thanks!
Do you also know how to round the values shown in the legend?

What numbers do you have in legend? Is this not typically the item name (label) that is shown in legend?

Mmh, I don’t explicitly define which items to include in the legend so I guess it’s the default.

The label: in your code only applies to markPoint. In legend, the same item’s value is fractional again and I wouldn’t know where to put another formatter: to apply to the legend, too.
I have UoM number items, unfortunately the legend display doesn’t apply the item display pattern.
Also, legend only shows the values (BTW in default US locale which is another annoyance).
I’ve opened this: (non) formatted values in charts · Issue #3583 · openhab/openhab-webui · GitHub

I use this in an aggregate series to format the values:

formatter: =v=>Number.parseFloat(v.data[1]).toFixed(1)

- component: oh-aggregate-series
  config:
    aggregationFunction: average
    dimension1: date
    gridIndex: 0
    item: Netatmo_Aussen_Temperatur
    label:
      formatter: =v=>Number.parseFloat(v.data[1]).toFixed(1)
      position: top
      show: true
    name: Ø Aussentemperatur
    type: line
    xAxisIndex: 0
    yAxisIndex: 0

Maybe this or something similar does also work in legend?

yeah I experimented some but couldn’t get this to work in legend