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/09/22 04:47:25 UTC

[GitHub] [echarts] qiangxinglin opened a new issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

qiangxinglin opened a new issue #15763:
URL: https://github.com/apache/echarts/issues/15763


   ### What problem does this feature solve?
   Currently, to make a horizontal gradient color line chart is only possible for dimension[1] (namely y). It will be more powerful to give the opportunity to decide the line color based on 3rd/4th column of the data. For example: data in following format
   `[data category, data value, more value]`
   
   Note that I know there is a "category" option in visualmap to do a color mapping, but what I want is a "continuous gradient horizontal line which color is based on the third dimension (e.g. whether it > 1, < 0, etc.)". But for now, only the data point is colored, rather than the connecting line segment.
   
   ### What does the proposed API look like?
   No API change.
   
   <!-- 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.

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] pissang commented on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

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


   I'm afraid we won't support it in the near future. You can calculate the color stops and use a gradient object on the`lineStyle.color`.


-- 
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 #15763: Enable more dimensions (more than x & y) visualmap for line chart

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


   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](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 to 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.

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] pissang commented on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

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


   @qiangxinglin I will suggest you create three separate series.


-- 
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] qiangxinglin commented on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

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


   Yeah, I understand completely. So either the gradient is entirely vertial or horizontal, will this feature be supported in the future? Does this kind of render will consume too much memory? I'm really appreciate the development staff to make it come true :)


-- 
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] qiangxinglin commented on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

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


   @pissang Any solution?


-- 
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] qiangxinglin commented on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

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


   @Ovilia I know this option, but it only colored the data point rather than the **_line segment_** between them.
   ```
   visualMap: {
     type: 'continuous',
     inRange: {
       color: ['orange', 'green', 'red'],
     },
     dimension: 3 // For line chart, it will only highlight the point if set the dimension > 1 
   }
   ```
   ![image](https://user-images.githubusercontent.com/20382522/134516869-d72e1a09-e8cd-484e-a547-ee53f42c19cc.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] qiangxinglin commented on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

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


   @pissang CMIIW, this will make a 3 colors line but the color is changed suddenly rather than gradually.


-- 
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] pissang commented on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

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


   For example:
   ```ts
   const data = [1, 2, 3, 4, 5];
   const series0 = { type: 'line', lineStyle: {color: 'green' }, data: data.map(item => item > 3 ? item : '-') };
   const series1 = { type: 'line', lineStyle: {color: 'red' }, data: data.map(item => item <= 3 ? item : '-') };
   ``


-- 
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] Ovilia commented on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

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


   This feature is supported right now. Checkout [visualMap.dimension](https://echarts.apache.org/en/option.html#visualMap-continuous.dimension).


-- 
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] pissang commented on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

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


   Understand, I thought you want the segmented line in your chart.js example link.


-- 
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] pissang edited a comment on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #15763:
URL: https://github.com/apache/echarts/issues/15763#issuecomment-926425988


   For example:
   ```ts
   const data = [1, 2, 3, 4, 5];
   const series = [{
       type: 'line',
       lineStyle: {color: 'green' },
       data: data.map(item => item > 3 ? item : '-')
     },
     {
       type: 'line',
       lineStyle: {color: 'red' },
       data: data.map(item => item <= 3 ? item : '-')
     }
   ]
   ``


-- 
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] qiangxinglin commented on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

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


   @pissang I prefer to make the color of the line between each data point changed gradually (from slight green -> slight red etc., which is based on the 2 endpoints). What's the purpose of the 3 separate series? I'm looking for features like this in [chart.js](https://www.chartjs.org/docs/3.2.0/samples/line/segments.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.

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] pissang edited a comment on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #15763:
URL: https://github.com/apache/echarts/issues/15763#issuecomment-926431448






-- 
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] pissang edited a comment on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #15763:
URL: https://github.com/apache/echarts/issues/15763#issuecomment-926425988


   For example:
   ```ts
   const data = [1, 2, 3, 4, 5];
   const series0 = {
     type: 'line',
     lineStyle: {color: 'green' },
     data: data.map(item => item > 3 ? item : '-')
   };
   const series1 = {
     type: 'line',
     lineStyle: {color: 'red' },
     data: data.map(item => item <= 3 ? item : '-')
   };
   ``


-- 
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] qiangxinglin edited a comment on issue #15763: Enable more dimensions (more than x & y) visualmap for line chart

Posted by GitBox <gi...@apache.org>.
qiangxinglin edited a comment on issue #15763:
URL: https://github.com/apache/echarts/issues/15763#issuecomment-926427471


   @pissang CMIIW, this will make a 3 colors line but the color is changed suddenly rather than gradually. I want the line color is based on the endpoints. 
   e.g. 
   Point color: 1 red, 3 green, 4 yellow, 5 red
   Then the line color:
   [1,3] red -> green, [3,4] green -> yellow, [4,5] yellow -> red


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