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 2020/08/15 19:50:43 UTC

[GitHub] [incubator-echarts] yangdachu opened a new issue #13136: 请问xAxis为'time'时,怎么设置区间日期?多条曲线的数据长度不一致时,两点之间的空白数据如何连接成一条直线?

yangdachu opened a new issue #13136:
URL: https://github.com/apache/incubator-echarts/issues/13136


   ### Version
   4.8.0
   
   ### Steps to reproduce
   ```
   const option = {
               tooltip: {
                   trigger: 'axis',
                   axisPointer: false,
                   animation: false
               },
               color: ['blue', 'yellow', 'green'],
               legend: {
                   data: chartData.map(item => item.name)
               },
               animation: false, animationDurationUpdate: 0,
               grid: {
                   left: '3%',
                   right: '4%',
                   bottom: '10%',
                   containLabel: true
               },
               backgroundColor: 'transparent',
               xAxis: {
                   type: 'time'
               },
               yAxis: {
                   type: 'value',
                   boundaryGap: [0, '100%'],
                   splitLine: {
                       show: false
                   }
               },
               dataZoom: [{
                   // startValue: xAxisData[0],
                   textStyle: {
                       color: '#fff'
                   }
               }, {
                   type: 'inside'
               }],
               series: yData
   ```
   
   ## series data数据结构
   
   ```
   const data =  {
           '一曲线': [
               ["2020/08/15 12:00:05.000", 2126],
               ["2020/08/15 12:00:20.230", 21126],
               ["2020/08/15 12:00:40.000", 21],
               ["2020/08/15 12:00:41.760", 2116] // ...长度为610
           ],
           '二曲线': [
               ["2020/08/15 12:00:03.000", 2126],
               ["2020/08/15 12:00:12.230", 999],
               ["2020/08/15 12:02:22.000", 21],
               ["2020/08/15 12:00:41.760", 2116] // ...长度为200
           ],
           '三曲线': [
               ["2020/08/15 12:00:02.120", 2126],
               ["2020/08/15 12:00:20.230", 2222],
               ["2020/08/15 12:04:33.000", 21],
               ["2020/08/15 12:09:41.123", 12122] // ...长度为300
           ]
       }
   ```
   
   ### What is expected?
   1、xAxis为'time'根据可以设置时间区间,并且x轴数据可以按照毫秒时间显示。
   2、time匹配数据的时间,进行数据显示,如果匹配不到的则连接前后来个点为直线
   
   ### What is actually happening?
   1、xAxis为'time' 这样设置后数据不对,没有按照series里的数据显示
   2、如果数据series多条曲线长度不一样的话,希望能按照设置的区间时间去连接中间没有的数据
   
   <!-- 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] [incubator-echarts] 100pah edited a comment on issue #13136: 请问xAxis为'time'时,怎么设置区间日期?多条曲线的数据长度不一致时,两点之间的空白数据如何连接成一条直线?

Posted by GitBox <gi...@apache.org>.
100pah edited a comment on issue #13136:
URL: https://github.com/apache/incubator-echarts/issues/13136#issuecomment-677652644


   @yangdachu 
   
   ```js
           '二曲线': [
               ["2020/08/15 12:00:03.000", 2126],
               ["2020/08/15 12:00:12.230", 999],
               ["2020/08/15 12:02:22.000", 21],
               ["2020/08/15 12:00:41.760", 2116] // ...长度为200
           ],
   ```
   这个数据并没有按时间顺序排列,这是否符合预期?
   如果按时间排序,那么  https://www.highcharts.com.cn/demo/highcharts/spline-irregular-time 效果应该可以画出来。


----------------------------------------------------------------
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] [incubator-echarts] yangdachu edited a comment on issue #13136: 请问xAxis为'time'时,怎么设置区间日期?多条曲线的数据长度不一致时,两点之间的空白数据如何连接成一条直线?

Posted by GitBox <gi...@apache.org>.
yangdachu edited a comment on issue #13136:
URL: https://github.com/apache/incubator-echarts/issues/13136#issuecomment-675221931


   @pissang  @Ovilia @plainheart  有空帮忙回答下这个疑问吗?非常感谢!


----------------------------------------------------------------
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] [incubator-echarts] yangdachu commented on issue #13136: 请问xAxis为'time'时,怎么设置区间日期?多条曲线的数据长度不一致时,两点之间的空白数据如何连接成一条直线?

Posted by GitBox <gi...@apache.org>.
yangdachu commented on issue #13136:
URL: https://github.com/apache/incubator-echarts/issues/13136#issuecomment-675221931


   @pissang  @Ovilia 两位有空可以帮忙回答下这个疑问吗?非常感谢!


----------------------------------------------------------------
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] [incubator-echarts] pissang commented on issue #13136: 请问xAxis为'time'时,怎么设置区间日期?多条曲线的数据长度不一致时,两点之间的空白数据如何连接成一条直线?

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #13136:
URL: https://github.com/apache/incubator-echarts/issues/13136#issuecomment-679028624


   @yangdachu 有 `connectNulls` 配置


----------------------------------------------------------------
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] [incubator-echarts] 100pah commented on issue #13136: 请问xAxis为'time'时,怎么设置区间日期?多条曲线的数据长度不一致时,两点之间的空白数据如何连接成一条直线?

Posted by GitBox <gi...@apache.org>.
100pah commented on issue #13136:
URL: https://github.com/apache/incubator-echarts/issues/13136#issuecomment-677652644


   @yangdachu 
   
   ```js
           '二曲线': [
               ["2020/08/15 12:00:03.000", 2126],
               ["2020/08/15 12:00:12.230", 999],
               ["2020/08/15 12:02:22.000", 21],
               ["2020/08/15 12:00:41.760", 2116] // ...长度为200
           ],
   ```
   这个数据并没有按时间顺序排列,这是否符合预期?


----------------------------------------------------------------
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] [incubator-echarts] yangdachu closed issue #13136: 请问xAxis为'time'时,怎么设置区间日期?多条曲线的数据长度不一致时,两点之间的空白数据如何连接成一条直线?

Posted by GitBox <gi...@apache.org>.
yangdachu closed issue #13136:
URL: https://github.com/apache/incubator-echarts/issues/13136


   


----------------------------------------------------------------
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] [incubator-echarts] echarts-bot[bot] commented on issue #13136: 请问xAxis为'time'时,怎么设置区间日期?多条曲线的数据长度不一致时,两点之间的空白数据如何连接成一条直线?

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


   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 questions.
   
   If you are interested in the project, you may also subscribe our [mail 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] [incubator-echarts] yangdachu commented on issue #13136: 请问xAxis为'time'时,怎么设置区间日期?多条曲线的数据长度不一致时,两点之间的空白数据如何连接成一条直线?

Posted by GitBox <gi...@apache.org>.
yangdachu commented on issue #13136:
URL: https://github.com/apache/incubator-echarts/issues/13136#issuecomment-679831949


   > @yangdachu 有 `connectNulls` 配置
   
   @pissang 我看了一下,对于缺失的数据需要指定null代替,而我的数据是直接就缺失的。可能不太符合我的需求,谢谢。


----------------------------------------------------------------
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] [incubator-echarts] yangdachu commented on issue #13136: 请问xAxis为'time'时,怎么设置区间日期?多条曲线的数据长度不一致时,两点之间的空白数据如何连接成一条直线?

Posted by GitBox <gi...@apache.org>.
yangdachu commented on issue #13136:
URL: https://github.com/apache/incubator-echarts/issues/13136#issuecomment-678955859


   @100pah 时间是连续的,已经解决。有些中间缺少的数据怎么用线连接起来?用datazoom放大后有些折线是缺失的。


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