let res = [ [ "难", "小", "6" ], [ "难", "中等", "2" ], [ "难", "简单", "4" ], [ "中等", "小", "5" ], [ "中等", "中等", "7" ], [ "中等", "简单", "9" ], [ "简单", "小", "10" ], [ "简单", "中等", "12" ], [ "简单", "简单", "14" ], ] option = { backgroundColor: 'rgba(10, 15, 20, 0.35)', xAxis: { // position: 'top', type: 'category', axisLine: { lineStyle: { color: '#fff', } }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { color: '#fff' } }, axisLabel: { show: true, textStyle: { fontSize: 16, color: 'rgba(255,255,255,.8)', } }, }, yAxis: { type: 'category', inverse: true, splitLine: { show: true, lineStyle: { color: '#fff' } }, axisTick: { show: false }, axisLine: { lineStyle: { color: '#fff', } }, axisLabel: { show: true, textStyle: { fontSize: 16, color: 'rgba(255,255,255,.8)', } }, }, visualMap: { type: 'continuous', max: 1, min: -1, inRange: { color: 'rgba(118, 221, 255, 0.20)' }, show: false, }, series: [{ type: 'heatmap', symbolSize: function (data) { return 100 }, data: res, label: { color: '#fff', textStyle: { fontSize: 20, //字体大小 }, formatter: '{@[2]}', show: true } }] };