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/03/10 12:34:18 UTC

[GitHub] [incubator-echarts] 6axter82 opened a new issue #12265: Two array series with different time stamps and a different number of data points

6axter82 opened a new issue #12265: Two array series with different time stamps and a different number of data points
URL: https://github.com/apache/incubator-echarts/issues/12265
 
 
   ### What problem does this feature solve?
   I have 2-time series data with different time stamps and a different number of data points.
   
   First one:
   
       ​​[
        { time: "2020-03-10T06:48:08.884220928Z", value: 99.05870056152344 }
       ​​​​​
        { time: "2020-03-10T06:48:10.888220928Z", value: 99.09293365478516 }
       ​​​​​
        { time: "2020-03-10T06:48:14.890221056Z", value: 99.17850494384766 }
       ​​​​​
        { time: "2020-03-10T06:49:18.894221056Z", value: 99.12715911865234 }
       ​​​​​
        { time: "2020-03-10T06:49:20.895220992Z", value: 99.16139221191406 }
       ​​​​​
        { time: "2020-03-10T06:49:24.900220928Z", value: 99.14427185058594 }
       ​​​​​
        { time: "2020-03-10T06:49:26.901220864Z", value: 99.21273040771484 }
       ​​​​​
        { time: "2020-03-10T06:50:30.904220928Z", value: 99.24696350097656 }
       ​​​​​
        { time: "2020-03-10T06:50:32.904220928Z", value: 99.22985076904297 }
       ​​​​​
        { time: "2020-03-10T06:50:36.910221056Z", value: 99.22985076904297 }
       ]
   
   and the second one:
   ​​​​
   
       [
       { time: "2020-03-10T06:48:59.000Z", value: 0 }
       ​​​​
       { time: "2020-03-10T06:49:01", value: 61.7744735137 }
       ​​​​
       { time: "2020-03-10T06:49:05", value: 27.1289544868 }
       ​​​​
       { time: "2020-03-10T06:49:09", value: 100 }
       ]
   
   As I have seen in the stacked line chart https://www.echartsjs.com/examples/en/editor.html?c=line-stack one has to add additional data points to the second array in order to plot it correctly. Otherwise only 4 first points on xAxis (positions 0,1,2,3) are shown on the chart for the second distribution.
   Which is not what I want. I need to place the location according to the data stamp.
   
   It should solve: plot this points in the chart without altering the second array which will be feeding the second series object with nulls?
   
   ### What does the proposed API look like?
   Don't have any idea
   
   LINK TO STACKOVERFLOW WITH THE SAME QUESTION: https://stackoverflow.com/questions/60616117/two-array-series-with-different-time-stamps-and-a-different-number-of-data-point
   
   <!-- 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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #12265: Two array series with different time stamps and a different number of data points

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #12265: Two array series with different time stamps and a different number of data points
URL: https://github.com/apache/incubator-echarts/issues/12265#issuecomment-599924544
 
 
   @6axter82 Please provide a demo for the issue either with https://jsfiddle.net/ovilia/n6xc4df3/ or https://gallery.echartsjs.com/editor.html.

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


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] chrisaut commented on issue #12265: Two array series with different time stamps and a different number of data points

Posted by GitBox <gi...@apache.org>.
chrisaut commented on issue #12265: Two array series with different time stamps and a different number of data points
URL: https://github.com/apache/incubator-echarts/issues/12265#issuecomment-605975341
 
 
   I have a similar problem, I have created a jsfiddle [here](https://jsfiddle.net/j7g1kabe/), notice how the series don't properly stack.
   
   Is this just a configuration 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] chrisaut commented on issue #12265: Two array series with different time stamps and a different number of data points

Posted by GitBox <gi...@apache.org>.
chrisaut commented on issue #12265: Two array series with different time stamps and a different number of data points
URL: https://github.com/apache/incubator-echarts/issues/12265#issuecomment-614477395
 
 
   Why is this marked as waiting for community? What more information do you need?

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


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] MINDoSOFT commented on issue #12265: Two array series with different time stamps and a different number of data points

Posted by GitBox <gi...@apache.org>.
MINDoSOFT commented on issue #12265: Two array series with different time stamps and a different number of data points
URL: https://github.com/apache/incubator-echarts/issues/12265#issuecomment-605161300
 
 
   Hi @6axter82 ,
   
   I don't know of any way to do this.
   But it would be really helpful, for someone to understand your problem, if you provided a working jsfiddle demonstrating the issue.
   
   You can fork my jsfiddle https://jsfiddle.net/758vs6xe/ making the adjustments to reproduce your problem and post it here.
   
   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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] 6axter82 commented on issue #12265: Two array series with different time stamps and a different number of data points

Posted by GitBox <gi...@apache.org>.
6axter82 commented on issue #12265: Two array series with different time stamps and a different number of data points
URL: https://github.com/apache/incubator-echarts/issues/12265#issuecomment-605092678
 
 
   Hi @MINDoSOFT ,
   
   yes, I have managed to achieve what i wanted, but it is not a good way to do so. Do you know any other way of plotting 2 series with different amount of specific data points?
   
   Thx too

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


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] 6axter82 commented on issue #12265: Two array series with different time stamps and a different number of data points

Posted by GitBox <gi...@apache.org>.
6axter82 commented on issue #12265: Two array series with different time stamps and a different number of data points
URL: https://github.com/apache/incubator-echarts/issues/12265#issuecomment-609713856
 
 
   @100pah , totally not correct in [https://jsfiddle.net/1fwd67tu/](https://jsfiddle.net/1fwd67tu/) .
   
   First of all, look the first point in data2 where y is set to 0, but in the chart it starts from above.
   Second, look into the dates and compare them in the arrays.
   Third, Try to set the seconds of times in data2 to some different values:
   
   ```
   const data1 =  [
       ["2020-03-10T06:48:08.884220928Z", 99],
       ["2020-03-10T06:48:10.888220928Z", 09],
       ["2020-03-10T06:48:14.890221056Z", 17],
       ["2020-03-10T06:49:18.894221056Z", 12],
       ["2020-03-10T06:49:20.895220992Z", 16],
       ["2020-03-10T06:49:24.900220928Z", 54],
       ["2020-03-10T06:49:26.901220864Z", 21],
       ["2020-03-10T06:50:30.904220928Z", 24],
       ["2020-03-10T06:50:32.904220928Z", 22],
       ["2020-03-10T06:50:36.910221056Z", 22],
   ];
   const data2 =  [
       ["2020-03-10T06:48:08.884220928Z", 0],
       ["2020-03-10T06:48:12.888220928Z", 29],
       ["2020-03-10T06:48:16.890221056Z", 85],
       ["2020-03-10T06:49:18.894221056Z", 0],
       ["2020-03-10T06:49:20.895220992Z", 0],
       ["2020-03-10T06:49:24.900220928Z", 0],
       ["2020-03-10T06:49:26.901220864Z", 0],
       ["2020-03-10T06:50:30.904220928Z", 0],
       ["2020-03-10T06:50:28.904220928Z", 98],
       ["2020-03-10T06:50:34.910221056Z", 98],
   ];
   ```
   As you can see the result is not what is expected.
   Further, why one cannot use just 4 points in array data2, but specify exactly the same amount of points as in data1? Just like:
   ```
   const data1 =  [
       ["2020-03-10T06:48:08.884220928Z", 99],
       ["2020-03-10T06:48:10.888220928Z", 09],
       ["2020-03-10T06:48:14.890221056Z", 17],
       ["2020-03-10T06:49:18.894221056Z", 12],
       ["2020-03-10T06:49:20.895220992Z", 16],
       ["2020-03-10T06:49:24.900220928Z", 54],
       ["2020-03-10T06:49:26.901220864Z", 21],
       ["2020-03-10T06:50:30.904220928Z", 24],
       ["2020-03-10T06:50:32.904220928Z", 22],
       ["2020-03-10T06:50:36.910221056Z", 22],
   ];
   const data2 =  [
       ["2020-03-10T06:48:10.888220928Z", 29],
       ["2020-03-10T06:48:14.890221056Z", 85],
       ["2020-03-10T06:50:32.904220928Z", 98],
       ["2020-03-10T06:50:36.910221056Z", 98],
   ];
   ```
   
   Anyways, I am thinking to switch to another library

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


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] MINDoSOFT commented on issue #12265: Two array series with different time stamps and a different number of data points

Posted by GitBox <gi...@apache.org>.
MINDoSOFT commented on issue #12265: Two array series with different time stamps and a different number of data points
URL: https://github.com/apache/incubator-echarts/issues/12265#issuecomment-601713410
 
 
   Hi @6axter82  ,
   
   I saw your comment on https://stackoverflow.com/questions/60616117/two-array-series-with-different-time-stamps-and-a-different-number-of-data-point that you managed to implement what you wanted.
   
   So you can close this issue ?
   
   Thanks,
   Sergios.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #12265: Two array series with different time stamps and a different number of data points

Posted by GitBox <gi...@apache.org>.
100pah commented on issue #12265: Two array series with different time stamps and a different number of data points
URL: https://github.com/apache/incubator-echarts/issues/12265#issuecomment-609463815
 
 
   @6axter82 
   It is correct for your case?
   https://jsfiddle.net/1fwd67tu/
   
   But this it not correct, which should better be fixed:
   https://jsfiddle.net/x5y2n4h9/
   

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


With regards,
Apache Git Services

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