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 2021/02/01 10:50:52 UTC

[GitHub] [echarts] muleyvarun opened a new issue #14176: Tooltip issue in case of multiple grid with xAxis type as 'time'

muleyvarun opened a new issue #14176:
URL: https://github.com/apache/echarts/issues/14176


   ### Version
   4.8.0
   
   ### Steps to reproduce
   Add multiple grid in echarts with multiple xaxis (xAxisType: 'time') and yaxis add series in each grid, hover over any 1 grid on the canvas
   
   ### What is expected?
   Expectation is tool tip of both series (gridIndex: 0 series and gridIndex:1sereis) should be visible together.
   
   ### What is actually happening?
   In actual, only the grid over which mouse is hovered the tooltip of that grid is shown not the tooltips of both the series.
   
   ---
   This works fine when xAxis type is 'category', but the same behavior is not there when xaxis type is 'time'
   
   <!-- 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:
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] echarts-bot[bot] commented on issue #14176: Tooltip issue in case of multiple grid with xAxis type as 'time'

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #14176:
URL: https://github.com/apache/echarts/issues/14176#issuecomment-770764179


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice 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.

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] muleyvarun commented on issue #14176: Tooltip issue in case of multiple grid with xAxis type as 'time'

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


   Modified code from examples to reproduce the issue:
   
   function randomData() {
       now = new Date(+now + oneDay);
       value = value + Math.random() * 21 - 10;
       return {
           name: now.toString(),
           value: [
               [now.getFullYear(), now.getMonth() + 1, now.getDate()].join('/'),
               Math.round(value)
           ]
       };
   }
   
   var data = [];
   var now = +new Date(1997, 9, 3);
   var oneDay = 24 * 3600 * 1000;
   var value = Math.random() * 1000;
   for (var i = 0; i < 1000; i++) {
       data.push(randomData());
   }
   
   option = {
       title: {
           text: '动态数据 + 时间坐标轴'
       },
       tooltip: {
           trigger: 'axis',
           formatter: function (params) {
               params = params[0];
               var date = new Date(params.name);
               return date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear() + ' : ' + params.value[1];
           },
           axisPointer: {
               animation: false
           }
       },
       grid: [{
           left: 50,
           right: 50,
           height: '35%'
       }, {
           left: 50,
           right: 50,
           top: '55%',
           height: '35%'
       }],
       xAxis: [{
           type: 'time',
           splitLine: {
               show: false
           }
       },{
           type: 'time',
           splitLine: {
               show: false
           },
           gridIndex: 1
       }],
       yAxis: [{
           type: 'value',
           boundaryGap: [0, '100%'],
           splitLine: {
               show: false
           }
       },{
           type: 'value',
           boundaryGap: [0, '100%'],
           splitLine: {
               show: false
           },
           gridIndex: 1
       }],
       series: [{
           name: '模拟数据',
           type: 'line',
           showSymbol: false,
           hoverAnimation: false,
           data: data
       },
       {
           name: '模拟数据',
           type: 'line',
           showSymbol: false,
           hoverAnimation: false,
           data: data,
           xAxisIndex: 1,
           yAxisIndex: 1
       }]
   };
   
   setInterval(function () {
   
       for (var i = 0; i < 5; i++) {
           data.shift();
           data.push(randomData());
       }
   
       myChart.setOption({
           series: [{
               data: data
           },{
               data: data
           }]
       });
   }, 1000);


----------------------------------------------------------------
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:
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] susiwen8 commented on issue #14176: Tooltip issue in case of multiple grid with xAxis type as 'time'

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


   Could you try with 5.0.1?


----------------------------------------------------------------
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:
users@infra.apache.org



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