Below is my Apache Echarts tooltip. How can I have different backgroundColor based on my series Index? For example from seriesIndex 0-30 having white and > 30 to be red. Also for my textStyle I want only the value to be bold (from the screenshot only the 152.2% part)
tooltip: {
trigger: "axis",
formatter: function (params) {
return params[0].dataIndex === 0
? `${rangeLow.format("DD")}-${rangeLow.add(firstWeek.length-1, "day").format("DD MMM")} \n ${params[0].value.toFixed(1)}%` //prettier-ignore
: params[0].dataIndex === 52
? `${rangeHigh.subtract(lastWeek.length-1, "day").format("DD")}-${rangeHigh.format("DD MMM")} \n ${params[0].value.toFixed(1)}%` //prettier-ignore
: `${newRangeLow.add(params[0].dataIndex-1, "week").format("DD")}-${newRangeLow.add(params[0].dataIndex-1,"week").add(6,'day').format("DD MMM")} \n ${params[0].value.toFixed(1)}%` //prettier-ignore
},
confine: true,
axisPointer: {
type: "none",
},
backgroundColor: "#BFBBB8",
textStyle: {
fontWeight: "bold",
},
},