Chart - formatter in yAxis and in time series

i would like to:

a) multiply the Item series

b) adjust the yAxis

i red all posts regarding this matter but none of the solution worked for me

this should work in case of yAxis, but it doesn’t

formatter: =v=>Number.parseFloat(v)*2000 also tried to put it directly under the config: section without the label but without success

config:
  chartType: ""
  period: D
  label: Wind voltage - needs to be converted to real m/s wind speed
  sidebar: true
slots:
  grid:
    - component: oh-chart-grid
      config:
        includeLabels: true
  xAxis:
    - component: oh-time-axis
      config:
        gridIndex: 0
  yAxis:
    - component: oh-value-axis
      config:
        gridIndex: 0
        label:
          formatter: =v=>Number.parseFloat(v)*2000
  series:
    - component: oh-time-series
      config:
        name: Wind voltage - 142
        gridIndex: 0
        xAxisIndex: 0
        yAxisIndex: 0
        type: line
        item: anometer__esp32dev_Wind_voltage__142
  tooltip:
    - component: oh-chart-tooltip
      config:
        confine: true
        smartFormatter: true
  legend:
    - component: oh-chart-legend
      config:
        bottom: 3
        type: scroll
  dataZoom:
    - component: oh-chart-datazoom
      config:
        type: inside

The formatter property needs to be under axisLabel not just label.

Thank you it helped and did the trick, what about tooltip:

- component: oh-chart-tooltip
config:
confine: true
formatter: =v=>Number.parseFloat(v)*2000

You are looking for valueFormatter not formatter.

Thank you but still without luck

tooltip:

  • component: oh-chart-tooltip
    config:
    confine: true
    valueFormatter: (value) => “km/h”
    show: true

when i add the value Formatter the tooltip is not showing at all, no matter what i put there just simple text or some formula, even the example from the documentation is not working

valueFormatter: (value) => ‘$’ + value.toFixed(2)

You need an equals sign in front of your arrow function. Your yaml is currently just passing a string to valueFormatter which eCharts is trying to parse as one of the basic value formatting templates. To get an actual callback function you need to create a widget expression that returns a function which, in turn, means you need to start your widget value with an =.

valueFormatter: =(value) => '$' + value.toFixed(2)