You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/04/09 04:49:16 UTC

[GitHub] forzkgd opened a new issue #8122: ������ heatmap ������������������������������������������������������������

forzkgd opened a new issue #8122: 使用 heatmap 模拟伪彩图的时候,网格之间避免有白色间隙
URL: https://github.com/apache/incubator-echarts/issues/8122
 
 
   <!--
   为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
   -->
   
   
   ### One-line summary [问题简述]
   
   使用 heatmap 模拟伪彩图的时候,网格之间有白色间隙
   
   
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]:4.0.2
   + Browser version [浏览器类型和版本]:chrome   65.0.3325.181
   + OS Version [操作系统类型和版本]: win 10
   
   
   
   
   
   ### Expected behaviour [期望结果]
   网格之间能不能连续起来?不要有那么明显的白色间隙~
   
   
   
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   option = {
   tooltip: {
                       extraCssText: "font-size:12px;background:rgba(0,0,0,0.8);border-radius:12;box-shadow:2px 3px 9px 0px rgba(184, 182, 182, 0.8);border-radius:4px;padding:8px;line-height:1.5",
                       formatter: function (params) {
   
                           // console.log(params)
   
                           return ("<p style='margin-bottom:6px;'>" +
                               String(params.value[0]).replace(/-/g, "/") +
                               "</p>" +
                               params.marker +
                               (params.data[1]) +
                               "nm<b style='margin-left:4px;'>" +
                               (Number(params.data[2]).toFixed(2)) +
                               "(个/cm³)</b>"
                           );
                       }
                   },
                   grid: {
                       // height:"70%"
                       bottom: "80",
                   },
                   toolbox: {
                       feature: {
                           saveAsImage: { show: true }
                       }
                   },
                   xAxis: {
                       // axisPointer:{
                       //     show:true,
                       //     type:"line"
                       // },
                       type: 'category',
                       splitLine: {
                           show: false
                       },
                       axisLabel: {
                           color: axisColors.labelColor,
                           formatter: function (value, index) {
                               return value.split(" ")[1] + "\n" + value.split(" ")[0].replace(/-/g, "/")
                           }
                       },
                       axisLine: {
                           lineStyle: {
                               color: axisColors.light.axis
                           }
                       },
                   },
                   yAxis: {
   
                       name: "粒径Dp(nm)",
                       // nameLocation: "middle",
                       type: 'category',
   
                       // logBase: 10,//默认就是 10
                       nameTextStyle: {
                           color: axisColors.labelColor,
                       },
                       axisLabel: {
                           color: axisColors.labelColor,
                            
                       },
   
                       axisLine: {
                           lineStyle: {
                               color: axisColors.light.axis
                           }
                       },
   
                   },
                   visualMap: {
                       type: 'continuous',
                       textGap: 20,
                       // textStyle:{
                       //     color:"red"
                       // },
                       text: ['dN/dLogDp\n(个/cm³)', ''],
                       realtime: false,
                       itemHeight: 200,
                       // itemWidth: 20,
                       align: 'left',
                       top: 'middle',
                       // left: 'right',
                       right: '3%',
                       calculable: true,
                       min: 0,
                       max: maxV,
                       calculable: true,
                       realtime: true,
                       inRange: {
                           color: colorx,//['#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8', '#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026']
                       }
                   },
                   dataZoom: [
                       {
                           bottom: "10",
                           // xAxisIndex: [0, 1],
                           // show: true,
                           type: 'slider',
                           // y: '90%',
                           filterMode: "filter",
                           start: 0,
                           end: 23,
                           minSpan: 10,
                       }
                   ],
                   series: [{
                       name: '伪彩图',
                       type: 'heatmap',
                       data: psdColorData,
                       // itemStyle: {
                       //     emphasis: {
                       //         borderColor: '#333',
                       //         borderWidth: 1
                       //     }
                       // },
                       emphasis: {
                           itemStyle: {
                               color: "rgba(0,0,0,0.4)",
                               // shadowColor: 'rgba(0, 0, 0, 0.4)',
                               // shadowBlur: 5
                               // opacity:1
                               // borderColor: '#fff',
                               // borderWidth: 1
                           }
                       },
                       progressive: 1000,
                       animation: false
                   }]
   }
   
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   [图片](https://i.loli.net/2018/04/09/5acaf09b22ba0.png)
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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