You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
这是我的颜色设置对应到canvas的效果,不存在无色的情况鸭,是我的理解有问题吗?
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
var grd=ctx.createLinearGradient(0,0,170,0);
grd.addColorStop(0,"rgba(255,64,28,1)");
grd.addColorStop(0.1,"rgba(0,0,255,1)");
grd.addColorStop(0.2,"rgba(0,0,255,1)");
grd.addColorStop(0.6,"rgba(44,222,148,0.6)");
grd.addColorStop(0.8,"rgba(254,237,83,0.8)");
grd.addColorStop(0.9,"rgba(255,118,50,0.9)");
grd.addColorStop(1,"rgba(255,64,28,1)");
1.import语句

2.处理数据


最后heatData的值为:
3.地图组件

4.问题


其中不同省份的count的值差距很大,比如浙江省的count为3726081.59,新疆的count只有628,这个时候热力图上新疆那一块没有显示颜色。heatData一共有30个省份的数据,但是在地图上只显示了数值较大的省份
地图放大之后
我理解热力图就算有极端情况,不同省份数据差距很大,那些数据很小的省份应该也会有颜色显示的,所以这一块麻烦看一下,是我哪里写的有问题吗?
The text was updated successfully, but these errors were encountered: