LinsRock opened a new issue #14342:
URL: https://github.com/apache/echarts/issues/14342


   ### Version
   5.0.2
   
   ### Reproduction link
   
[https://codesandbox.io/s/magical-smoke-vyigt?file=/src/components/chart.vue](https://codesandbox.io/s/magical-smoke-vyigt?file=/src/components/chart.vue)
   
   ### Steps to reproduce
   1. 当我将tooltip设置成一个空对象时,tooltip显示
   2. 当我给tooltip设置值时,tooltip不显示
   3. 但我将相同的options复制到官方示例中,又可以正常显示tooltip,不确定是不是Vue3环境的问题
    
   ```
   options = {
      grid: { left: 10, bottom: 20, top: 10, right: 30 },
       xAxis: {
         type: 'category',
         boundaryGap: false,
         data: [11, 12, 13, 14, 15, 16, 17]
       },
       yAxis: {
         type: 'value',
         position: 'right'
         // min: 213,
         // max: 416
       },
       // tooltip: {},
       tooltip: {
         trigger: 'axis',
         axisPointer: {
           type: 'cross',
           animation: false,
           label: {
             backgroundColor: '#ccc',
             borderColor: '#aaa',
             borderWidth: 1,
             shadowBlur: 0,
             shadowOffsetX: 0,
             shadowOffsetY: 0,
             color: '#222'
           }
         },
         formatter: function(params: any) {
           console.log(params)
           return params.name   ':'   params.value;
         }
       },
       series: [
         {
           type: 'line',
           symbolSize: 6,
           // showSymbol: false,
           // hoverAnimation: false,
           lineStyle: {
             color: ' #76A9FF'
           },
           areaStyle: {
             color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
               {
                 offset: 0,
                 color: 'rgba(159, 195, 255, 0.61)'
               },
               {
                 offset: 1,
                 color: 'rgba(157, 194, 255, 0)'
               }
             ])
           },
           data: [312.23, 366.21, 355.21, 310.2, 370.11, 300, 360.99]
         }
       ]
   }
   ```
   
   ### What is expected?
   期望鼠标hover时可以显示tooltip
   
   ### What is actually happening?
   当我给tooltip设置值时,tooltip不显示
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to