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/07/23 01:21:45 UTC

[GitHub] [echarts] bnuzhengshan opened a new issue #15407: 当x轴为时间轴时,visualMap展示的颜色不对

bnuzhengshan opened a new issue #15407:
URL: https://github.com/apache/echarts/issues/15407


   ### Version
   5.1.2
   
   ### Steps to reproduce
   x轴设为时间轴,visualMap设置pieces和outOfRange,series的data的值都在pieces的范围之外,线条颜色显示不正确
   
   ### What is expected?
   线条显示灰色
   
   ### What is actually happening?
   线条显示红色
   
   ---
   {
           title: {
               text: 'Beijing AQI',
               left: '1%'
           },
           tooltip: {
               trigger: 'axis'
           },
           grid: {
               left: '5%',
               right: '15%',
               bottom: '10%'
           },
           xAxis: {
               "type": "time",
               "boundaryGap": true,
           },
           yAxis: {},
           toolbox: {
               right: 10,
               feature: {
                   dataZoom: {
                       yAxisIndex: 'none'
                   },
                   restore: {},
                   saveAsImage: {}
               }
           },
           dataZoom: [{
               startValue: '2014-06-01'
           }, {
               type: 'inside'
           }],
           visualMap: {
               top: 50,
               right: 10,
               pieces: [
                 {
                   "gte": 300,
                   "lt": 400,
                   "color": "#FF2E00"
                 },
                 {
                   "gte": 400,
                   "color": "#D00000"
                 }
               ],
               outOfRange: {
                   color: '#999'
               }
           },
           series: {
               name: 'Beijing AQI',
               type: 'line',
               data: [
           {
             "name": "474eb6f5",
             "value": [
               1626943980000,
               128
             ]
           },
           {
             "name": "474eb6f5",
             "value": [
               1626944040000,
               186
             ]
           },
           {
             "name": "474eb6f5",
             "value": [
               1626944100000,
               262
             ]
           },
           {
             "name": "474eb6f5",
             "value": [
               1626944160000,
               231
             ]
           },
           {
             "name": "474eb6f5",
             "value": [
               1626944220000,
               65
             ]
           },
           {
             "name": "474eb6f5",
             "value": [
               1626944280000,
               227
             ]
           },
           {
             "name": "474eb6f5",
             "value": [
               1626944340000,
               31
             ]
           },
           {
             "name": "474eb6f5",
             "value": [
               1626944400000,
               241
             ]
           },
           {
             "name": "474eb6f5",
             "value": [
               1626944460000,
               103
             ]
           },
           {
             "name": "474eb6f5",
             "value": [
               1626944520000,
               172
             ]
           },
           {
             "name": "474eb6f5",
             "value": [
               1626944580000,
               241
             ]
           },
           {
             "name": "474eb6f5",
             "value": [
               1626944640000,
               222
             ]
           }],
           }
       }
   
   <!-- 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] susiwen8 commented on issue #15407: 当x轴为时间轴时,visualMap展示的颜色不对

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


   Little workaround for now
   
   ```js
                   visualMap: {
                       top: 50,
                           right: 10,
                               pieces: [
                                   {
                                       "gte": 300,
                                       "lt": 400,
                                       "color": "yellow"
                                   },
                                   {
                                       "gte": 400,
                                       "lt": 500, // add lt
                                       "color": "green"
                                   }
                               ],
                                   outOfRange: {
                           color: '#999'
                       }
                   },
   ```


-- 
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] susiwen8 commented on issue #15407: 当x轴为时间轴时,visualMap展示的颜色不对

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


   @plainheart Could you take a look on this?


-- 
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 closed issue #15407: 当x轴为时间轴时,visualMap展示的颜色不对

Posted by GitBox <gi...@apache.org>.
pissang closed issue #15407:
URL: https://github.com/apache/echarts/issues/15407


   


-- 
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] susiwen8 edited a comment on issue #15407: 当x轴为时间轴时,visualMap展示的颜色不对

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


   Little workaround for now
   
   ```js
                   visualMap: {
                       top: 50,
                           right: 10,
                               pieces: [
                                   {
                                       "gte": 300,
                                       "lt": 400,
                                       "color": "yellow"
                                   },
                                   {
                                       "gte": 400,
                                       "lt": 500, // add lt
                                       "color": "green"
                                   }
                               ],
                                   outOfRange: {
                           color: '#999'
                       }
                   },
   ```
   
   Or downgrade to `5.1.1`


-- 
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] bnuzhengshan commented on issue #15407: 当x轴为时间轴时,visualMap展示的颜色不对

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


   使用4.x版本的echarts并不会有这个问题,这个问题是升级5.1.2之后出现的


-- 
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 #15407: 当x轴为时间轴时,visualMap展示的颜色不对

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






-- 
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] susiwen8 edited a comment on issue #15407: 当x轴为时间轴时,visualMap展示的颜色不对

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


   Relate to #14602
   
   https://github.com/apache/echarts/blob/cf7c4efc5c33961e1e932c450e2c16073feaa8fc/src/chart/line/LineView.ts#L246


-- 
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] susiwen8 commented on issue #15407: 当x轴为时间轴时,visualMap展示的颜色不对

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


   Relate to #14602


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