Are you annoyed that the Echarts Tooltip is incomplete?Copy the code

This is the official says: echarts.baidu.com/option.html… Tooltip. Confine the tooltip box to the area of the chart. Boolean [default: false] Whether to confine the tooltip box to the area of the chart. This configuration is useful when the outer dom of the diagram is set to ‘overflow: hidden’, or when the narrow screen on the mobile side causes the Tooltip to be truncated beyond the outside world.

Tooltip: {trigger: 'axis', confine: true, // axisPointer: {// type: confine: 'shadow' / / default is linear, optional for: 'the line' | 'shadow' / /}},Copy the code

But it is not working in anger under how to whole? The good news is that there’s a Tooltip.padding

Echarts.baidu.com/option.html… Tooltip. Padding number [default: 5] Padding number in the float layer, unit: px.

Example:

Tooltip: {trigger: 'axis', confine: true, // Set padding in four directions respectively: [5, // up 30, // right 5, // down 30, // left], // axisPointer: {// coordinate axis indicator, coordinate axis trigger valid // type: 'shadow' / / default is linear, optional for: 'the line' | 'shadow' / /}},Copy the code

The results are great! It’s just a little far away