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/05/17 07:36:55 UTC

[GitHub] [echarts] 100pah commented on issue #14961: VisualMap-piecewise is not applied to Parallel chart, if Parallel has defined ParallelAxis with this data

100pah commented on issue #14961:
URL: https://github.com/apache/echarts/issues/14961#issuecomment-842087734


   @Akkarine it's a bug.
   
   To make a work around, we have to probably add another column in data and make `visualMap` component refer to it. 
   For example:
   
   ```js
   
   option = {
       'visualMap': {
           'orient': 'horizontal',
           'top': 0,
           'left': 'center',
           'seriesIndex': [0],
           'type': 'piecewise',
           'categories': ['flat', 'linear'],
   
           // Refer to the new added column in data
           'dimension': 3,
           // 'dimension': 2,
   
   
           'inRange': {
               'color': ['#155872', '#1cd841']
           },
           'outOfRange': {
               'color': '#ddd',
               'opacity': 0.1
           }
       },
       'parallelAxis': [
           {
               'dim': 0,
               'name': 'mae/amplitude',
               'type': 'value'
           },
           {
               'dim': 1,
               'name': 'time',
               'type': 'value'
           },
           // Just comment line below and visualMap will work
           {
               'dim': 2,
               'name': 'test',
               'type': 'category',
               data: ['flat', 'linear']
           }
       ],
       'parallel': {
           'layout': 'vertical'
       },
       'series': [{
           'name': 'parallel',
           'type': 'parallel',
   
   
           // Add a new column the same as dimension 2
           'data': [
               [0.106873855811681, 40.8704931735992, 'flat', 'flat'],
               [0.116787657916912, 34.3274087905884, 'flat', 'flat'],
               [0.113293574574632, 97.4140477180481, 'linear', 'linear'],
               [0.11207702142822, 51.7055630683899, 'flat', 'flat'],
               [0.107281154014564, 40.8551776409149, 'flat', 'flat']
           ]
       }]
   }
   ```
   
   ```
   


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