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 2019/12/26 04:16:35 UTC

[GitHub] [incubator-echarts] yangzj208 opened a new issue #11910: Line增加数据类型

yangzj208 opened a new issue #11910: Line增加数据类型
URL: https://github.com/apache/incubator-echarts/issues/11910
 
 
   ### What problem does this feature solve?
   目前的Line类型的曲线横纵坐标的值必须是一一对应的,很多场合下,横坐标的值一般都是从某一值开始,等间隔分布的,这时如果每一条曲线都按现在的方式存储值的话,在数据量大的时候太浪费空间了。
   建议增加一个类型,x值可只保存起始值,间隔值这两个值就可以,具体Y对应的值通过这两个值计算即可
   或者有没有其他的方式可实现这一需求,请大家帮忙指教,谢谢
   
   ### What does the proposed API look like?
   series:{
     x:{
       startvalue:0.1,
       interval:0.2
     },
     y:[0,1.1,3,4,5.6,...]
   }
   
   <!-- 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.
 
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] yangzj208 edited a comment on issue #11910: Line增加数据类型

Posted by GitBox <gi...@apache.org>.
yangzj208 edited a comment on issue #11910: Line增加数据类型
URL: https://github.com/apache/incubator-echarts/issues/11910#issuecomment-569021813
 
 
   > ```js
   > Array(n).fill().map((v, i) => startvalue + i * interval);
   > ```
   
   谢谢!
   请问需要如何配置?
   我看示例里都是这样配置的
   series: [{
       data: [
           // 维度X   维度Y   其他维度 ...
           [  3.4,    4.5,   15,   43],
           [  4.2,    2.3,   20,   91],
           [  10.8,   9.5,   30,   18],
           [  7.2,    8.8,   18,   57]
       ]
   }]
   各个维度数据必须长度一样

----------------------------------------------------------------
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] pissang closed issue #11910: Line增加数据类型

Posted by GitBox <gi...@apache.org>.
pissang closed issue #11910: Line增加数据类型
URL: https://github.com/apache/incubator-echarts/issues/11910
 
 
   

----------------------------------------------------------------
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] yangzj208 commented on issue #11910: Line增加数据类型

Posted by GitBox <gi...@apache.org>.
yangzj208 commented on issue #11910: Line增加数据类型
URL: https://github.com/apache/incubator-echarts/issues/11910#issuecomment-569231829
 
 
   > 比如你的Y数据是` [2, 4, 5, 6, 8, 9, 10, 14, 17, 23, 30]`
   > 
   > 就可以写成:
   > 
   > ```js
   > let yData = [2, 4, 5, 6, 8, 9, 10, 14, 17, 23, 30];
   > let startvalue = 1;
   > let interval = 2;
   > let data = yData.map((v, i) => [startvalue + i * interval, v])
   > 
   > option = {
   >     xAxis: {
   >     },
   >     yAxis: {
   >         type: 'value'
   >     },,
   >     series: [{
   >         data: data,
   >         type: 'line'
   >     }]
   > };
   > ```
   还可以这样做的,非常感谢,我试试
   

----------------------------------------------------------------
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] SnailSword commented on issue #11910: Line增加数据类型

Posted by GitBox <gi...@apache.org>.
SnailSword commented on issue #11910: Line增加数据类型
URL: https://github.com/apache/incubator-echarts/issues/11910#issuecomment-569061047
 
 
   比如你的Y数据是``` [2, 4, 5, 6, 8, 9, 10, 14, 17, 23, 30]```
   
   就可以写成:
   
   ```javascript
   let yData = [2, 4, 5, 6, 8, 9, 10, 14, 17, 23, 30];
   let startvalue = 1;
   let interval = 2;
   let data = yData.map((v, i) => [startvalue + i * interval, v])
   
   option = {
       xAxis: {
       },
       yAxis: {
           type: 'value'
       },
       series: [{
           data: data,
           type: 'line'
       }]
   };
   ```

----------------------------------------------------------------
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] SnailSword commented on issue #11910: Line增加数据类型

Posted by GitBox <gi...@apache.org>.
SnailSword commented on issue #11910: Line增加数据类型
URL: https://github.com/apache/incubator-echarts/issues/11910#issuecomment-569020731
 
 
   ```javascript
   Array(n).fill().map((v, i) => startvalue + i * interval);
   ```

----------------------------------------------------------------
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] yangzj208 commented on issue #11910: Line增加数据类型

Posted by GitBox <gi...@apache.org>.
yangzj208 commented on issue #11910: Line增加数据类型
URL: https://github.com/apache/incubator-echarts/issues/11910#issuecomment-569021813
 
 
   > ```js
   > Array(n).fill().map((v, i) => startvalue + i * interval);
   > ```
   
   谢谢!
   请问需要如何配置?
   我看示例里都是这样配置的
   series: [{
       data: [
           // 维度X   维度Y   其他维度 ...
           [  3.4,    4.5,   15,   43],
           [  4.2,    2.3,   20,   91],
           [  10.8,   9.5,   30,   18],
           [  7.2,    8.8,   18,   57]
       ]
   }]
   各个维数数据必须长度一样

----------------------------------------------------------------
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 #11910: Line增加数据类型

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #11910: Line增加数据类型
URL: https://github.com/apache/incubator-echarts/issues/11910#issuecomment-568964695
 
 
   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


With regards,
Apache Git Services

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