You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "MHTCCC (via GitHub)" <gi...@apache.org> on 2024/04/08 04:02:04 UTC

[I] [Bug] 使用large模式绘制散点图,一部分数据的tooltip在鼠标悬停时无法正常显示 [echarts]

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

   ### Version
   
   5.5.0
   
   ### Link to Minimal Reproduction
   
   https://echarts.apache.org/examples/zh/editor.html?c=scatter-large
   
   ### Steps to Reproduce
   
   1.打开图表配置界面(随便哪一个都可以), https://echarts.apache.org/examples/zh/editor.html?c=scatter-large 我用的是这个
   2.注释掉原本的代码,黏贴我给出的代码
   
   // 生成x轴数据
   let base = +new Date(2000, 1, 1);
   let timestamp = [];
   for (let i = 1; i < 86400; i++) {
   var now = new Date((base += 1000));
     timestamp.push([String(now.getHours()).padStart(2, '0'), String(now.getMinutes()).padStart(2, '0'), String(now.getSeconds()).padStart(2, '0')].join(':'));
   }
   
   // 模拟数据
   data0 = [['00:00:00',1]]
   data1 = []
   for (let i = 1; i < 8000; i++) {
     data0.push([timestamp[i], 1+Math.random() * 1])
     data1.push([timestamp[i], 2+Math.random() * 1])
   }
   
   option = {
     tooltip: {
         trigger: 'item',
         // showDelay: 0,
         axisPointer: {
             show: true,
             type: 'shadow',
             shadowStyle: {
                 shadowBlur: 10
             },
         }
     },
     toolbox: {
         left: 'center',
         feature: {
             // dataZoom: {}
         }
     },
     backgroundColor: '#cdd0d5',
     grid: {
         top: 25,
         left: 10,
         right: 10
     },
     legend: {
     },
     xAxis: [
         {
             type: 'category',
             data: timestamp
         }
     ],
     yAxis: [
         {
             minorTick: {
                 show: true
             },
             axisLabel: {
                 show: false
             },
         }
     ],
     dataZoom: [
         {
             type: 'inside',
         },
         {
             type: 'slider',
         }
     ],
     animation: false,
     series: [
         {
             name: 'data0',
             type: 'scatter',
             data: data0,
             dimensions: ['x', 'y'],
             symbolSize: 2,
             large: true,
             itemStyle: {
                 'color': 'red'
             }
         },
         {
             name: 'data1',
             type: 'scatter',
             data: data1,
             dimensions: ['x', 'y'],
             symbolSize: 2,
             large: true,
             itemStyle: {
                 'color': 'blue'
             }
         },
     ]
   };
   
   3.代码解释:该段代码模拟绘制了大量数据的散点图,用来large模式,x轴为类目轴,形式大致是 00:00:00 00:00:01 00:00:02 ...
   
   4.bug描述:
   在图中使用鼠标悬停即可发现,蓝色区域的tooltip可以正常显示,而红色区域的tooltip却无法显示。我在业务逻辑中碰到的问题就是这样,经过我排查后,发现问题就是出现在数据本身,如果数据中包含了x轴点位为00:00:00(也就是类目轴的第一项)的数据,那么该数据的tooltip就会无法正常显示,反之,若没有包含,则数据的tooltip就可以正常显示。
   
   ### Current Behavior
   
   在图中使用鼠标悬停即可发现,蓝色区域的tooltip可以正常显示,而红色区域的tooltip却无法显示。我在业务逻辑中碰到的问题就是这样,经过我排查后,发现问题就是出现在数据本身,如果数据中包含了x轴点位为00:00:00(也就是类目轴的第一项)的数据,那么该数据的tooltip就会无法正常显示,反之,若没有包含,则数据的tooltip就可以正常显示。
   
   ### Expected Behavior
   
   本次模拟的数据为8000条,在我自己的业务逻辑中,随这数据的增多,还会出现同一数据,一部分可以显示tooltip,另一部分无法显示tooltip这类情况。总之,在去除掉位置在类目轴第一项的数据之后,一切就会正常显示。对于数轴我这边暂时没有测出这类bug。
   
   ### Environment
   
   ```markdown
   - OS:win10
   - Browser:edge
   - Framework:Vue@2
   ```
   
   
   ### Any additional comments?
   
   _No response_


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


Re: [I] [Bug] 使用large模式绘制散点图,一部分数据的tooltip在鼠标悬停时无法正常显示 [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #19801: [Bug] 使用large模式绘制散点图,一部分数据的tooltip在鼠标悬停时无法正常显示
URL: https://github.com/apache/echarts/issues/19801


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


Re: [I] [Bug] 使用large模式绘制散点图,一部分数据的tooltip在鼠标悬停时无法正常显示 [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19801:
URL: https://github.com/apache/echarts/issues/19801#issuecomment-4217583165

   This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.


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


Re: [I] [Bug] 使用large模式绘制散点图,一部分数据的tooltip在鼠标悬停时无法正常显示 [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19801:
URL: https://github.com/apache/echarts/issues/19801#issuecomment-4271356923

   This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!


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


Re: [I] [Bug] 使用large模式绘制散点图,一部分数据的tooltip在鼠标悬停时无法正常显示 [echarts]

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #19801:
URL: https://github.com/apache/echarts/issues/19801#issuecomment-2043811482

   bug confirmed - ```large:true``` on a second series disables its tooltip 


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


Re: [I] [Bug] 使用large模式绘制散点图,一部分数据的tooltip在鼠标悬停时无法正常显示 [echarts]

Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #19801:
URL: https://github.com/apache/echarts/issues/19801#issuecomment-2041819965

   @MHTCCC It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] When using large mode to draw a scatter plot, the tooltip of some data cannot be displayed properly when the mouse is hovering.
   
   **BODY**
   
   ### Version
   
   5.5.0
   
   ### Link to Minimal Reproduction
   
   https://echarts.apache.org/examples/zh/editor.html?c=scatter-large
   
   ### Steps to Reproduce
   
   1. Open the chart configuration interface (any one will do), https://echarts.apache.org/examples/zh/editor.html?c=scatter-large I use this one
   2. Comment out the original code and paste the code I gave
   
   //Generate x-axis data
   let base = +new Date(2000, 1, 1);
   let timestamp = [];
   for (let i = 1; i < 86400; i++) {
   var now = new Date((base += 1000));
     timestamp.push([String(now.getHours()).padStart(2, '0'), String(now.getMinutes()).padStart(2, '0'), String(now.getSeconds()). padStart(2, '0')].join(':'));
   }
   
   // simulate data
   data0 = [['00:00:00',1]]
   data1 = []
   for (let i = 1; i < 8000; i++) {
     data0.push([timestamp[i], 1+Math.random() * 1])
     data1.push([timestamp[i], 2+Math.random() * 1])
   }
   
   option = {
     tooltip: {
         trigger: 'item',
         // showDelay: 0,
         axisPointer: {
             show: true,
             type: 'shadow',
             shadowStyle: {
                 shadowBlur: 10
             },
         }
     },
     toolbox: {
         left: 'center',
         feature: {
             // dataZoom: {}
         }
     },
     backgroundColor: '#cdd0d5',
     grid: {
         top: 25,
         left: 10,
         right: 10
     },
     legend: {
     },
     xAxis: [
         {
             type: 'category',
             data: timestamp
         }
     ],
     yAxis: [
         {
             minorTick: {
                 show: true
             },
             axisLabel: {
                 show: false
             },
         }
     ],
     dataZoom: [
         {
             type: 'inside',
         },
         {
             type: 'slider',
         }
     ],
     animation: false,
     series: [
         {
             name: 'data0',
             type: 'scatter',
             data: data0,
             dimensions: ['x', 'y'],
             symbolSize: 2,
             large: true,
             itemStyle: {
                 'color': 'red'
             }
         },
         {
             name: 'data1',
             type: 'scatter',
             data: data1,
             dimensions: ['x', 'y'],
             symbolSize: 2,
             large: true,
             itemStyle: {
                 'color': 'blue'
             }
         },
     ]
   };
   
   3. Code explanation: This code simulates drawing a scatter plot of a large amount of data. It is used in large mode. The x-axis is the category axis. The form is roughly 00:00:00 00:00:01 00:00:02.. .
   
   4.bug description:
   By hovering the mouse in the picture, you can find that the tooltip in the blue area can be displayed normally, but the tooltip in the red area cannot be displayed. This is the problem I encountered in the business logic. After my investigation, I found that the problem occurred in the data itself. If the data contains the x-axis point of 00:00:00 (that is, the first item of the category axis ) data, then the tooltip of the data will not be displayed normally. On the contrary, if it is not included, the tooltip of the data will be displayed normally.
   
   ### Current Behavior
   
   By hovering the mouse in the picture, you can find that the tooltip in the blue area can be displayed normally, but the tooltip in the red area cannot be displayed. This is the problem I encountered in the business logic. After my investigation, I found that the problem occurred in the data itself. If the data contains the x-axis point of 00:00:00 (that is, the first item of the category axis ) data, then the tooltip of the data will not be displayed normally. On the contrary, if it is not included, the tooltip of the data will be displayed normally.
   
   ### Expected Behavior
   
   The data simulated this time is 8,000. In my own business logic, as the data increases, the same data will appear. Part of the data can display the tooltip, and the other part cannot display the tooltip. In short, after removing the data located in the first item of the category axis, everything will display normally. Regarding the number axis, I have not detected this kind of bug yet.
   
   ### Environment
   
   ```markdown
   - OS:win10
   -Browser:edge
   - Framework:Vue@2
   ```
   
   
   ### Any additional comments?
   
   _No response_
   </details>


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