前30 数据分布echarts scatter配置项内容和展示

分布

配置项如下
      var hours = ['1996', '1997', '1998', '1999', '2000', '2001', '2002','2003', '2004', '2005','2006','2007','2008', '2009', '2010', '2011', '2012', '2013','2014', '2015', '2016', ' '];
var days = [ '土耳其', '阿根廷', '挪威', '以色列', '瑞士', '墨西哥', '中国', '丹麦', '南非', '印度', '荷兰', '西班牙', '意大利', '德国', '巴西', '澳大利亚', '法国', '加拿大', '英国', '  ', '美国'];
var data = [
[00,0,0],[00,1,0],[00,2,0],[00,3,1],[00,4,0],[00,5,0],[00,6,0],[00,7,0],[00,8,0],[00,9,1],[00,10,0],[00,11,1],[00,12,0],[00,13,0],[00,14,0],[00,15,0],[00,16,0],[00,17,0],[00,18,2],[00,19,1],[00,20,2],[00,21,0],[00,22,0],
[01,0,0],[01,1,0],[01,2,0],[01,3,1],[01,4,0],[01,5,0],[01,6,1],[01,7,1],[01,8,0],[01,9,0],[01,10,0],[01,11,1],[01,12,0],[01,13,0],[01,14,1],[01,15,0],[01,16,1],[01,17,0],[01,18,1],[01,19,1],[01,20,1],[01,21,0],[01,22,0],
[02,0,0],[02,1,0],[02,2,0],[02,3,0],[02,4,0],[02,5,0],[02,6,0],[02,7,1],[02,8,0],[02,9,0],[02,10,0],[02,11,0],[02,12,0],[02,13,1],[02,14,1],[02,15,0],[02,16,1],[02,17,1],[02,18,3],[02,19,1],[02,20,1],[02,21,0],[02,22,0],
[03,0,1],[03,1,1],[03,2,0],[03,3,0],[03,4,0],[03,5,0],[03,6,0],[03,7,0],[03,8,0],[03,9,0],[03,10,0],[03,11,2],[03,12,2],[03,13,0],[03,14,0],[03,15,1],[03,16,1],[03,17,3],[03,18,1],[03,19,0],[03,20,1],[03,21,0],[03,22,0],
[04,0,0],[04,1,1],[04,2,0],[04,3,0],[04,4,0],[04,5,0],[04,6,1],[04,7,0],[04,8,0],[04,9,0],[04,10,0],[04,11,0],[04,12,1],[04,13,2],[04,14,1],[04,15,1],[04,16,3],[04,17,1],[04,18,0],[04,19,1],[04,20,3],[04,21,0],[04,22,0],
[05,0,1],[05,1,0],[05,2,0],[05,3,1],[05,4,0],[05,5,0],[05,6,1],[05,7,0],[05,8,0],[05,9,0],[05,10,0],[05,11,1],[05,12,1],[05,13,1],[05,14,0],[05,15,1],[05,16,2],[05,17,5],[05,18,1],[05,19,0],[05,20,1],[05,21,0],[05,22,0],
[06,0,0],[06,1,0],[06,2,0],[06,3,0],[06,4,0],[06,5,0],[06,6,1],[06,7,0],[06,8,1],[06,9,1],[06,10,2],[06,11,0],[06,12,0],[06,13,4],[06,14,1],[06,15,0],[06,16,0],[06,17,2],[06,18,2],[06,19,0],[06,20,6],[06,21,0],[06,22,0],
[07,0,1],[07,1,0],[07,2,0],[07,3,0],[07,4,1],[07,5,3],[07,6,0],[07,7,0],[07,8,0],[07,9,2],[07,10,1],[07,11,0],[07,12,0],[07,13,1],[07,14,1],[07,15,1],[07,16,2],[07,17,2],[07,18,4],[07,19,1],[07,20,0],[07,21,0],[07,22,0],
[08,0,2],[08,1,0],[08,2,1],[08,3,0],[08,4,0],[08,5,1],[08,6,0],[08,7,0],[08,8,0],[08,9,1],[08,10,0],[08,11,0],[08,12,2],[08,13,0],[08,14,2],[08,15,1],[08,16,2],[08,17,2],[08,18,2],[08,19,3],[08,20,2],[08,21,0],[08,22,0],
[09,0,0],[09,1,0],[09,2,0],[09,3,0],[09,4,0],[09,5,0],[09,6,0],[09,7,0],[09,8,1],[09,9,0],[09,10,0],[09,11,2],[09,12,0],[09,13,3],[09,14,1],[09,15,4],[09,16,1],[09,17,1],[09,18,5],[09,19,2],[09,20,3],[09,21,0],[09,22,0],
[10,0,0],[10,1,1],[10,2,0],[10,3,2],[10,4,0],[10,5,0],[10,6,0],[10,7,0],[10,8,1],[10,9,0],[10,10,0],[10,11,0],[10,12,0],[10,13,0],[10,14,0],[10,15,0],[10,16,0],[10,17,0],[10,18,0],[10,19,0],[10,20,5],[10,21,0],[10,22,0],
[11,0,0],[11,1,0],[11,2,0],[11,3,0],[11,4,1],[11,5,0],[11,6,0],[11,7,0],[11,8,0],[11,9,0],[11,10,1],[11,11,0],[11,12,2],[11,13,1],[11,14,2],[11,15,6],[11,16,2],[11,17,10],[11,18,3],[11,19,1],[11,20,1],[11,21,0],[11,22,0],
[12,0,0],[12,1,0],[12,2,0],[12,3,0],[12,4,1],[12,5,0],[12,6,0],[12,7,0],[12,8,1],[12,9,0],[12,10,0],[12,11,2],[12,12,0],[12,13,3],[12,14,3],[12,15,5],[12,16,6],[12,17,4],[12,18,1],[12,19,4],[12,20,3],[12,21,0],[12,22,0],
[13,0,1],[13,1,0],[13,2,2],[13,3,0],[13,4,0],[13,5,0],[13,6,1],[13,7,2],[13,8,2],[13,9,1],[13,10,2],[13,11,4],[13,12,4],[13,13,6],[13,14,1],[13,15,4],[13,16,6],[13,17,3],[13,18,8],[13,19,7],[13,20,3],[13,21,0],[13,22,0],
[14,0,0],[14,1,0],[14,2,1],[14,3,0],[14,4,1],[14,5,2],[14,6,1],[14,7,0],[14,8,1],[14,9,1],[14,10,2],[14,11,5],[14,12,7],[14,13,2],[14,14,5],[14,15,4],[14,16,3],[14,17,8],[14,18,5],[14,19,7],[14,20,5],[14,21,0],[14,22,0],
[15,0,0],[15,1,0],[15,2,1],[15,3,0],[15,4,2],[15,5,0],[15,6,0],[15,7,2],[15,8,1],[15,9,0],[15,10,0],[15,11,4],[15,12,5],[15,13,9],[15,14,5],[15,15,4],[15,16,10],[15,17,5],[15,18,3],[15,19,5],[15,20,4],[15,21,0],[15,22,0],
[16,0,1],[16,1,2],[16,2,3],[16,3,5],[16,4,5],[16,5,3],[16,6,1],[16,7,1],[16,8,1],[16,9,3],[16,10,0],[16,11,4],[16,12,3],[16,13,4],[16,14,4],[16,15,3],[16,16,6],[16,17,5],[16,18,8],[16,19,12],[16,20,0],[16,21,0],[16,22,0],
[17,0,0],[17,1,1],[17,2,0],[17,3,2],[17,4,3],[17,5,3],[17,6,1],[17,7,4],[17,8,2],[17,9,6],[17,10,4],[17,11,2],[17,12,9],[17,13,8],[17,14,6],[17,15,7],[17,16,1],[17,17,7],[17,18,5],[17,19,5],[17,20,8],[17,21,0],[17,22,0],
[18,0,0],[18,1,2],[18,2,3],[18,3,0],[18,4,1],[18,5,2],[18,6,5],[18,7,4],[18,8,5],[18,9,4],[18,10,8],[18,11,6],[18,12,7],[18,13,8],[18,14,12],[18,15,6],[18,16,17],[18,17,10],[18,18,10],[18,19,5],[18,20,9],[18,21,0],[18,22,0],
[20,0,7],[20,1,7],[20,2,19],[20,3,15],[20,4,15],[20,5,17],[20,6,10],[20,7,17],[20,8,20],[20,9,23],[20,10,22],[20,11,18],[20,12,34],[20,13,33],[20,14,20],[20,15,29],[20,16,26],[20,17,37],[20,18,34],[20,19,32],[20,20,34],[20,21,0],[20,22,0],
]
data = data.map(function (item) {
    return [item[1], item[0], item[2]];
});

option = {
    title: {
        text: ' ',
        link: 'https://github.com/pissang/echarts-next/graphs/punch-card'
    },
    legend: {
        data: ['Punch Card'],
        left: 'right'
    },
    tooltip: {
        position: 'top',
        formatter: function (params) {
            return params.value[2] + ' commits in ' + hours[params.value[0]] + ' of ' + days[params.value[1]];
        }
    },
    grid: {
        left: 2,
        bottom: 10,
        right: 10,
        containLabel: true
    },
    xAxis: {
        type: 'category',
        data: hours,
        axisLabel: {
            show: true,
            textStyle: {
                fontSize: 16,
                
                }
            },
        boundaryGap: false,
        splitLine: {
            show: true,
            lineStyle: {
                color: '#ddd',
                type: 'dashed'
            }
        },
        axisLine: {
            show: false
        }
    },
    yAxis: {
        type: 'category',
        data: days,
        axisLabel: {
            show: true,
            textStyle: {
                fontSize: 20,
                
                }
            },
        boundaryGap: false,
        splitLine: {
            show: true,
            lineStyle: {
                color: '#ddd',
                type: 'dashed'
            }
        },
        axisLine: {
            show: false
        }
    },
    series: [{
        name: '数据量',
        type: 'scatter',
        symbolSize: function (val) {
            return val[2] * 2.3;
        },
        data: data
    }]
};
    
截图如下