cn-xufei opened a new issue #8096: 气泡图dataset控制symboSize
URL: https://github.com/apache/incubator-echarts/issues/8096
 
 
   <!--
   为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
   -->
   
   
   ### One-line summary [问题简述]
   
气泡图的dataset.source是key-value的格式,想用visualMap控制其大小,但没有映射的配置,只有dimension,不造怎么设置。。。
   
   
   
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]:4.04
   + Browser version [浏览器类型和版本]: Chrome 65
   + OS Version [操作系统类型和版本]: win10
   
   
   
   
   
   ### Expected behaviour [期望结果]
   期望在使用key-value的格式下可以使用visualMap控制气泡大小
   
   
   
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 
option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   option = {
       dataset: {
           dimensions: ['x', 'val', 'r'],
           source: [
               {
                   x: 1,
                   val: 55,
                   r: 9
               }
           ]
       },
       backgroundColor: '#404a59',
       color: [
           '#dd4444', '#fec42c', '#80F1BE'
       ],
       grid: {
           x: '10%',
           x2: 150,
           y: '18%',
           y2: '10%'
       },
       xAxis: {
           type: 'value',
           name: '日期',
           nameGap: 16,
           nameTextStyle: {
               color: '#fff',
               fontSize: 14
           },
           max: 31,
           splitLine: {
               show: false
           },
           axisLine: {
               lineStyle: {
                   color: '#eee'
               }
           }
       },
       yAxis: {
           type: 'value',
           name: 'AQI指数',
           nameLocation: 'end',
           nameGap: 20,
           nameTextStyle: {
               color: '#fff',
               fontSize: 16
           },
           axisLine: {
               lineStyle: {
                   color: '#eee'
               }
           },
           splitLine: {
               show: false
           }
       },
       visualMap: [
           {
               left: 'right',
               top: '10%',
               dimension: 2,
               min: 0,
               max: 250,
               itemWidth: 30,
               itemHeight: 120,
               calculable: true,
               precision: 0.1,
               text: ['圆形大小:PM2.5'],
               textGap: 30,
               textStyle: {
                   color: '#fff'
               },
               inRange: {
                   symbolSize: [10, 70]
               },
               outOfRange: {
                   symbolSize: [10, 70],
                   color: ['rgba(255,255,255,.2)']
               },
               controller: {
                   inRange: {
                       color: ['#c23531']
                   },
                   outOfRange: {
                       color: ['#444']
                   }
               }
           }
       ],
       series: [
           {
               name: '北京',
               type: 'scatter',
               itemStyle: {
                   normal: {
                       opacity: 0.8,
                       shadowBlur: 10,
                       shadowOffsetX: 0,
                       shadowOffsetY: 0,
                       shadowColor: 'rgba(0, 0, 0, 0.5)'
                   }
               },
               encode: {
                   x: 'x',
                   y: 'val',
                   r: 'r'
               }
           }
       ]
   };
   
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   
   

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