Add unit in both Y axis and tooltip display
Apache ECharts offer the availability to add a unit formatter.
There are two functions to provide. One for Y axis and one for the tooltip:
yAxis: {
axisLabel: {
formatter: "{value} °C"
}
},
tooltip: {
valueFormatter: (value, _dataIndex) => Math.round(value * 100) / 100 + " °C",
},