crop the text and turn on tooltip when there is a lot of legend text, but the position setting of tooltip has no effect
legend: {
show: true,
x: "center",
tooltip: {
show: true,
trigger: "item",
position: [10, 10]
}
}
crop the text and turn on tooltip when there is a lot of legend text, but the position setting of tooltip has no effect
legend: {
show: true,
x: "center",
tooltip: {
show: true,
trigger: "item",
position: [10, 10]
}
}
tell me why I am.
let originOptions = JSON.parse (JSON.stringify (BASE.CHART_OPTIONS))
I write the configuration information of echarts in CHART_OPTIONS, and then make a deep copy of the assignment to originOptions. The
position method is written in CHART_OPTIONS.
position(point){ // tooltip
return [point[0], "10%"]
}
the problem lies in the deep copy. It would be fine to define the position function directly to originOptions.
Previous: How does Vue judge whether or not to transmit props according to the conditions?
Next: Will the vux introduction component in the vue project report an error in the .js file?