我将使用Echart.js库。 var echartLine = echarts.init(document.getElementById('myChart'), theme); 在echart选项中,我添加了: tooltip: { show: true, showContent: true, alwaysShowContent: true, triggerOn: 'mousemove', trigger: 'axis', axisPointer: { label: { show: true, } } }, 工具提示未显示。图像在下面。
在我的情况下,当我将axisPointer.axis选项添加为“x”时,它可以正常工作,像这样:tooltip: { trigger: "axis", axisPointer: { type: "shadow", axis: "x" } }