我尝试使用Highcharts绘制热图(50 x 100)。我注意到当我的数据值在很宽的范围内(从0到5,000,000)时,图表无法正常显示。但是,如果我将数据值更改为更小的范围(例如从0到1),则图表似乎没问题。
$('#heatmap').highcharts({
chart: {
type: 'heatmap',
marginTop: 40,
marginBottom: 40,
zoomType: 'xy'
},
credits: {
enabled: false
},
plotOptions: {
series: {
events: {
click: function (event) {
alert('event!');
}
}
}
},
title: {
text: 'Sample title yo'
},
xAxis: {
categories: xCategories,
title: null
},
yAxis: {
categories: yCategories,
title: null
},
colorAxis: {
min: min,
max: maxv,
minColor: '#FFFFFF',
maxColor: Highcharts.getOptions().colors[0]
},
legend: {
align: 'right',
layout: 'vertical',
margin: 0,
verticalAlign: 'top',
y: 25,
symbolHeight: 320
},
tooltip: {
formatter: function () {
return '<b>' + this.series.xAxis.categories[this.point.x] + '</b> sold <br><b>' + this.point.value + '</b> items on <br><b>' + this.series.yAxis.categories[this.point.y] + '</b>';
}
},
series: [{
name: 'Lorem ipsum',
borderWidth: 1,
data: data,
dataLabels: {
enabled: false,
color: 'black',
style: {
textShadow: 'none',
HcTextStroke: null
}
}
}]
});
这是我的小提琴:http://jsfiddle.net/bpp8ahyc/4/
我能做些什么来展示大值吗?