Position configuration of echart legend tooltip does not work

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]

}

}

Apr.07,2022

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.

Menu