You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/08/10 11:01:53 UTC

[GitHub] [echarts] DetectiveBox opened a new issue, #17496: [Bug] tooltip does not shown when tooltip.trigger is axis in line chart,it is OK while tooltip.trigger is item

DetectiveBox opened a new issue, #17496:
URL: https://github.com/apache/echarts/issues/17496

   ### Version
   
   ^5.3.3
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   1. set  tooltip.trigger axis
   2. mouse move enter chart
   3. the line shown but tooltip is not shown
   
   ### Current Behavior
   
   option = {
             title: {
               show: false,
             },
             legend: {
               data: ['百度', '谷歌'],
               show: true,
               selectedMode: true,
               top: 'top',
               right: 0,
               orient: 'vertical',
             },
             tooltip: {
               trigger: 'axis',
               axisPointer: {
   type: "line"
   },
             },
             xAxis: {
               type: 'category',
               data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
             },
             yAxis: {
               type: 'value',
             },
             series: [
               {
                 name: '百度',
                 data: [65, 78, 130, 65, 56, 73, 89],
                 type: 'line',
                 smooth: true,
                 itemStyle: {
                   // 折线的颜色
                   color: 'rgb(249,120,69,1)',
                 },
                 areaStyle: {
                   color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                     {
                       offset: 0,
                       color: 'rgba(249,120,69,0.8)',
                     },
                     {
                       offset: 1,
                       color: 'rgba(249,120,69,0.3)',
                     },
                   ]),
                 },
               },
               {
                 name: '谷歌',
                 data: [65, 56, 123, 36, 32, 69, 78],
                 type: 'line',
                 smooth: true,
                 itemStyle: {
                   // 折线的颜色
                   color: 'rgba(58,77,233,1)',
                 },
                 areaStyle: {
                   color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                     {
                       offset: 0,
                       color: 'rgba(58,77,233,0.8)',
                     },
                     {
                       offset: 1,
                       color: 'rgba(58,77,233,0.3)',
                     },
                   ]),
                 },
               },
             ],
           }
   
   ### Expected Behavior
   
   option = {
             title: {
               show: false,
             },
             legend: {
               data: ['百度', '谷歌'],
               show: true,
               selectedMode: true,
               top: 'top',
               right: 0,
               orient: 'vertical',
             },
             tooltip: {
               trigger: 'axis',
               axisPointer: {
   type: "line"
   },
             },
             xAxis: {
               type: 'category',
               data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
             },
             yAxis: {
               type: 'value',
             },
             series: [
               {
                 name: '百度',
                 data: [65, 78, 130, 65, 56, 73, 89],
                 type: 'line',
                 smooth: true,
                 itemStyle: {
                   // 折线的颜色
                   color: 'rgb(249,120,69,1)',
                 },
                 areaStyle: {
                   color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                     {
                       offset: 0,
                       color: 'rgba(249,120,69,0.8)',
                     },
                     {
                       offset: 1,
                       color: 'rgba(249,120,69,0.3)',
                     },
                   ]),
                 },
               },
               {
                 name: '谷歌',
                 data: [65, 56, 123, 36, 32, 69, 78],
                 type: 'line',
                 smooth: true,
                 itemStyle: {
                   // 折线的颜色
                   color: 'rgba(58,77,233,1)',
                 },
                 areaStyle: {
                   color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                     {
                       offset: 0,
                       color: 'rgba(58,77,233,0.8)',
                     },
                     {
                       offset: 1,
                       color: 'rgba(58,77,233,0.3)',
                     },
                   ]),
                 },
               },
             ],
           }
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   When I put the option configuration in this https://echarts.apache.org/examples/zh/editor.html?c=line-stack&version=5.3.3, it works OK.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] KiKiYang97 commented on issue #17496: [Bug] tooltip does not shown when tooltip.trigger is axis in line chart,it is OK while tooltip.trigger is item

Posted by GitBox <gi...@apache.org>.
KiKiYang97 commented on issue #17496:
URL: https://github.com/apache/echarts/issues/17496#issuecomment-1233702592

   Hi, I fixed in my project. The special thing is that its Vue3 project. 
   I use **markRaw** to mark an object so that it will never be converted to a proxy. Returns the object itself.
   `import { markRaw } from 'vue';
   state.myChart = markRaw(echarts.init(chartDom));`
   
   Not sure if it helps
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] KiKiYang97 commented on issue #17496: [Bug] tooltip does not shown when tooltip.trigger is axis in line chart,it is OK while tooltip.trigger is item

Posted by GitBox <gi...@apache.org>.
KiKiYang97 commented on issue #17496:
URL: https://github.com/apache/echarts/issues/17496#issuecomment-1229660156

   Same issue, same confused


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] justice47 commented on issue #17496: [Bug] tooltip does not shown when tooltip.trigger is axis in line chart,it is OK while tooltip.trigger is item

Posted by GitBox <gi...@apache.org>.
justice47 commented on issue #17496:
URL: https://github.com/apache/echarts/issues/17496#issuecomment-1250950410

   Same problem was for me.
   
   @KiKiYang97 big thank you, made my day! 🙏


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org