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/04/07 09:33:36 UTC

[GitHub] [echarts] Renhj90520 opened a new issue #14607: visualMap bug for multi series

Renhj90520 opened a new issue #14607:
URL: https://github.com/apache/echarts/issues/14607


   ### Version
   4.7.0
   
   ### Steps to reproduce
   There are two line series, but only one of them is effected by visualMap. I find the other one seems also changes its color in tooltip.
   ![image](https://user-images.githubusercontent.com/7686919/113844659-4d885b00-97c7-11eb-8352-d949b45e0b13.png)
   
   the option is following:
   ```json
   {
     "color": ["#3fb1e3", "#6be6c1", "#626c91", "#a0a7e6", "#33b86c", "#96dee8"],
     "dataset": {
       "source": [
         {
           "down_threshold": -0.05,
           "mean_threshold": 0.09,
           "time": "2021-04-06 00:00:00.000",
           "up_threshold": 0.24,
           "value": 0.17279120676562648
         },
         {
           "down_threshold": -0.05,
           "mean_threshold": 0.09,
           "time": "2021-04-06 01:00:00.000",
           "up_threshold": 0.24,
           "value": 0.1918523077076779
         },
         {
           "down_threshold": -0.05,
           "mean_threshold": 0.09,
           "time": "2021-04-06 02:00:00.000",
           "up_threshold": 0.24,
           "value": 0.21198067458580033
         },
         {
           "down_threshold": -0.05,
           "mean_threshold": 0.09,
           "time": "2021-04-06 03:00:00.000",
           "up_threshold": 0.24,
           "value": 0.23904901094433784
         },
         {
           "down_threshold": -0.05,
           "mean_threshold": 0.09,
           "time": "2021-04-06 05:00:00.000",
           "up_threshold": 0.24,
           "value": 0.21231917196347566
         }
       ]
     },
     "series": [
       {
         "type": "line",
         "encode": { "x": "time", "y": "value" },
         "name": "结果值",
         "symbol": "none",
         "markLine": {
           "silent": true,
           "lineStyle": { "color": "red" },
           "data": [
             {
               "yAxis": 0.2,
               "label": { "formatter": "0.2(上限)", "position": "insideEndBottom" }
             },
             {
               "yAxis": 0.18,
               "label": {
                 "formatter": "0.18(下限)",
                 "position": "insideEndBottom"
               }
             }
           ]
         }
       },
       {
         "type": "line",
         "encode": { "x": "time", "y": "mean_threshold" },
         "name": "平均值",
         "symbol": "none"
       }
     ],
     "title": {
       "textStyle": { "color": "#aaa", "fontSize": 14 },
       "left": "center",
       "top": 10,
       "show": true,
       "text": "结果图"
     },
     "tooltip": {
       "trigger": "axis",
       "axisPointer": {
         "type": "cross",
         "label": { "backgroundColor": "#6a7985" }
       }
     },
     "xAxis": {
       "type": "category",
       "boundaryGap": false,
       "axisLine": {
         "lineStyle": { "color": "#efefef", "width": 1, "type": "solid" }
       },
       "axisTick": { "show": false },
       "axisLabel": { "color": "#9a9a9a" },
       "splitLine": { "show": false },
       "nameTextStyle": { "color": "#9a9a9a" }
     },
     "yAxis": {
       "type": "value",
       "axisLine": {
         "lineStyle": { "color": "#efefef", "width": 1, "type": "solid" }
       },
       "nameTextStyle": { "color": "#9a9a9a" },
       "axisTick": { "show": false },
       "axisLabel": { "color": "#9a9a9a" },
       "splitLine": { "show": true, "lineStyle": { "width": 1, "type": "dash" } }
     },
     "grid": { "show": false, "top": 50, "bottom": 50, "left": 45, "right": 22 },
     "legend": {
       "show": true,
       "left": "center",
       "top": "bottom",
       "textStyle": { "color": "#333" },
       "data": [
         { "name": "结果值", "textStyle": { "color": "#3fb1e3" } },
         { "name": "平均值", "textStyle": { "color": "#6be6c1" } }
       ]
     },
     "visualMap": [
       {
         "seriesIndex": 0,
         "type": "piecewise",
         "show": false,
         "pieces": [
           { "color": "red", "gte": 0.2 },
           { "color": "red", "lte": 0.18 }
         ],
         "outOfRange": { "color": "#3fb1e3" }
       },
       {
         "seriesIndex": 1,
         "type": "piecewise",
         "show": false,
         "pieces": [
           { "color": "red", "gte": 0.2 },
           { "color": "red", "lte": 0.18 }
         ],
         "outOfRange": { "color": "#6be6c1" }
       }
     ]
   }
   ```
   ### What is expected?
   The two series should be both  effected by visualMap.
   
   ### What is actually happening?
   One of the series is not effected by visualMap.
   
   <!-- 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