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/11/25 08:31:18 UTC

[GitHub] [echarts] legcc opened a new issue #16109: With dataZoom displaying data per second for 24 hours of the day, dataZoom cannot display thumbnails, and tooltip does not display data.

legcc opened a new issue #16109:
URL: https://github.com/apache/echarts/issues/16109


   ### Version
   5.2.2
   
   ### Steps to reproduce
   <!--
       THIS EXAMPLE WAS DOWNLOADED FROM https://echarts.apache.org/examples/zh/editor.html?c=multiple-x-axis
   -->
   <!DOCTYPE html>
   <html style="height: 100%">
       <head>
           <meta charset="utf-8">
       </head>
       <body style="height: 100%; margin: 0">
           <div id="container" style="height: 100%"></div>
   
           <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5.2.2/dist/echarts.min.js"></script>
   
           <script type="text/javascript">
   var dom = document.getElementById("container");
   var myChart = echarts.init(dom);
   var app = {};
   
   var option;
   
   const times = []
   const second = 86400
   const initStart = new Date(new Date().toLocaleDateString()).getTime()
   const data = {
     [initStart]: [initStart, 100],
     [initStart   400000]: [initStart   400000, 120],
     [initStart   1000000]: [initStart   1000000, 130],
     [initStart   2000000]: [initStart   2000000, 160],
     [initStart   3000000]: [initStart   3000000, 10],
   }
   
   let start = initStart
   for (let i = 0; i < second; i  ) {
     if (!!data[start]) {
       times.push(data[start])
     } else {
       times.push([start, null])
     }
     start  = 1000
   }
   
   const colors = ['#5470C6', '#EE6666'];
    option = {
     color: ['#2db7f5'],
     tooltip: {
       trigger: 'axis',
       axisPointer: {
         type: 'line',
         animation: false,
         label: {
           backgroundColor: '#505765',
         },
       },
     },
     xAxis: {
       type: 'time',
       splitNumber: 12,
       minInterval: 30 * 60 * 1000,
       maxInterval: 60 * 60 * 1000,
       axisLabel: {
         formatter: '{HH}:{mm}',
         showMinLabel: true,
         showMaxLabel: true,
         hideOverlap: true,
       },
     },
     dataZoom: [
       {
         type: 'slider',
         start: 0,
         end: 25,
         minValueSpan: 30 * 60 * 1000,
       },
     ],
     yAxis: {
       type: 'value',
       name: '功率(kW)',
     },
     series: [
       {
         data: times,
         type: 'line',
         smooth: true,
         symbol: null,
         symbolSize: 0,
         connectNulls: true,
         markPoint: {
           symbolSize: 40,
           data: [
             { xAxis: initStart, yAxis: 100 },
             { xAxis: initStart   400000, yAxis: 120 },
             // { xAxis: initStart   1000000, yAxis: 130 },
             { xAxis: initStart   2000000, yAxis: 160 },
             { xAxis: initStart   3000000, yAxis: 10 },
           ],
           label: {
             show: false,
           },
           itemStyle: {
             color: '#d9001b',
             borderWidth: 1,
             borderColor: '#fff',
             shadowColor: '#333',
             shadowBlur: 5,
           },
         },
       },
     ],
     // style: { height: 800 },
     // opts: { locale: 'FR' },
   }
   
   if (option && typeof option === 'object') {
       myChart.setOption(option);
   }
   
           </script>
       </body>
   </html>
       
   
   ### What is expected?
   Solution
   
   ### What is actually happening?
   ..
   
   ---
   I always want to display 24 hours of data, the minimum zoom precision is seconds, but dataZoom does not display data thumbnails, and tooltips cannot be displayed.
   
   <!-- This issue is generated by echarts-issue-helper. 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.

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] legcc commented on issue #16109: With dataZoom displaying data per second for 24 hours of the day, dataZoom cannot display thumbnails, and tooltip does not display data.

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


   ![企业微信截图_16378292061168](https://user-images.githubusercontent.com/23158742/143407241-81a98792-2acd-4d2a-9fe9-55c4db023816.png)
   ![企业微信截图_16378293452607](https://user-images.githubusercontent.com/23158742/143407249-cf3b4dd7-92cc-4226-bccf-bc8dc073b179.png)
   ![企业微信截图_1637829389719](https://user-images.githubusercontent.com/23158742/143407251-8769997c-b6f1-46f2-8d57-3e6e86bd8b80.png)
   


-- 
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] echarts-bot[bot] commented on issue #16109: With dataZoom displaying data per second for 24 hours of the day, dataZoom cannot display thumbnails, and tooltip does not display data.

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


   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 it contains **a minimum reproducible demo** and necessary **images** to illustrate. Otherwise, our committers will ask you to do so.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
   
   You may also check out the [API](https://echarts.apache.org/api.html) and [chart option](https://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 to our [mailing list](https://echarts.apache.org/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.

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