Mignon-han commented on issue #8151: dataset 可以为每个数据指定样式
URL: 
https://github.com/apache/incubator-echarts/issues/8151#issuecomment-381821356
 
 
   @pissang 
你好,按照您说的方法,我去试了一下。我想要为柱状图的每个柱子按照不同的category指定样式。但是配置的都有问题,麻烦帮忙看一下,怎么配置能达到我的目的。
   下面是我的例子:http://gallery.echartsjs.com/editor.html?c=xSkA-8JX3z&v=1
   ```
   var option = {
       dataset: {
           source: [
               ['score', 'amount', 'product'],
               [89.3, 58212, 'Matcha'],
               [57.1, 78254, 'Milk'],
               [74.4, 41032, 'Cocoa'],
               [50.1, 12755, 'Brownie'],
               [89.7, 20145, 'HCocoa']
           ]
       },
       xAxis: {},
       yAxis: {
           type: 'category'
       },
       visualMap: [{
           type: 'piecewise',
           dimension: 2,
           categories: ['Matcha', 'Milk', 'Cocoa', 'Brownie', 'HCocoa'],
           color: ['red', '#bf444c', '#d88273', '#f6efa6', 'blue']
       }],
       series: [{
           type: 'bar',
           encode: {
               x: 'score',
               y: 'product'
           }
       }]
   };
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org
For additional commands, e-mail: dev-h...@echarts.apache.org

Reply via email to