百子湾pm25

描述:当前是关于Echarts图表中的 3D柱图 示例。
 
            var hours = ['7时', '8时', '9时', '10时', '11时', '12时', '13时',
        '14时', '15时', '16时','17时','18时',
        '19时', '20时', '21时', '22时', '23时'];
var days = ['3.15', '3.16', '3.17',
        '3.18', '3.19', '3.20', '3.21','3.22', '3.23', '3.24', '3.25','3.26', '3.27', '3.28', '3.29'];

var data = [[0,0,145.289285714286],
[0,1,145.385714285714],
[0,2,133.519047619048],
[0,3,97.425],
[0,4,87.68],
[0,5,0],
[0,6,0],
[0,7,77.15],
[0,8,69.7260869565217],
[0,9,70.8698884758365],
[0,10,85.3277777777778],
[0,11,58.64375],
[0,12,0],
[0,13,29.7892156862745],
[0,14,0],
[0,15,22.9],
[0,16,0],
[1,0,41.2272727272727],
[1,1,21.4137254901961],
[1,2,31.1778846153846],
[1,3,31.346],
[1,4,18.3526315789474],
[1,5,22.7915254237288],
[1,6,0],
[1,7,43.1333333333333],
[1,8,56.5604516949153],
[1,9,42.05],
[1,10,33.4837837837838],
[1,11,35.8148550724638],
[1,12,0],
[1,13,30.8652173913044],
[1,14,0],
[1,15,39.6],
[1,16,0],
[2,0,],
[2,1,73.8571428571429],
[2,2,43.8648148148148],
[2,3,85.8923076923077],
[2,4,52.1371428571429],
[2,5,46.5867469879518],
[2,6,0],
[2,7,48.8528301886792],
[2,8,171.193506493507],
[2,9,43.4680672268908],
[2,10,46.0221476510067],
[2,11,48.5025477707006],
[2,12,0],
[2,13,0],
[2,14,0],
[2,15,42.7],
[2,16,0],
[3,0,61.9977777777778],
[3,1,0],
[3,2,209.525],
[3,3,136.377777777778],
[3,4,89.5193548387097],
[3,5,0],
[3,6,91.6625],
[3,7,110.3325],
[3,8,113.60752688172],
[3,9,119.676041666667],
[3,10,119.2625],
[3,11,132.963829787234],
[3,12,106.745454545455],
[3,13,0],
[3,14,0],
[3,15,125.442857142857],
[3,16,0],
[4,0,122.078947368421],
[4,1,103.8],
[4,2,97.3295128939828],
[4,3,93.4935960591133],
[4,4,86.8171428571429],
[4,5,81.1788888888889],
[4,6,86.3166666666667],
[4,7,125.311510791367],
[4,8,87.8233576642336],
[4,9,92.4220338983051],
[4,10,132.7],
[4,11,104.17],
[4,12,132.535135135135],
[4,13,59.6954954954955],
[4,14,0],
[4,15,109.406451612903],
[4,16,0],
[5,0,120.4375],
[5,1,0],
[5,2,0],
[5,3,0],
[5,4,54.8022727272727],
[5,5,45.05],
[5,6,0],
[5,7,53.5976190476191],
[5,8,155.733333333333],
[5,9,0],
[5,10,45.4857142857143],
[5,11,23.3617021276596],
[5,12,0],
[5,13,0],
[5,14,0],
[5,15,9.66153846153846],
[5,16,0],
[6,0,0],
[6,1,39.8846153846154],
[6,2,0],
[6,3,0],
[6,4,32.5666666666667],
[6,5,0],
[6,6,0],
[6,7,32.7517123287671],
[6,8,38.5896551724138],
[6,9,0],
[6,10,60.2461538461539],
[6,11,0],
[6,12,0],
[6,13,0],
[6,14,0],
[6,15,23.1],
[6,16,0],
[7,0,0],
[7,1,82.4666666666667],
[7,2,165.116666666667],
[7,3,77.6631578947368],
[7,4,35.6717391304348],
[7,5,0],
[7,6,0],
[7,7,47.0456521739131],
[7,8,43.1666666666667],
[7,9,56.1409090909091],
[7,10,40.5193548387097],
[7,11,25.9421875],
[7,12,0],
[7,13,22.7],
[7,14,0],
[7,15,42.7836734693878],
[7,16,0],
[8,0,169.59375],
[8,1,0],
[8,2,0],
[8,3,68.95],
[8,4,62.7739669421488],
[8,5,48.7266666666667],
[8,6,0],
[8,7,53.7454545454545],
[8,8,0],
[8,9,86.1933333333334],
[8,10,66.0958333333334],
[8,11,0],
[8,12,62.641],
[8,13,59.2176923076923],
[8,14,52.475],
[8,15,65.6166666666667],
[8,16,0],
[9,0,57.5102040816327],
[9,1,0],
[9,2,30.4682432432432],
[9,3,31.2227906976744],
[9,4,28.2333333333333],
[9,5,44.6964285714286],
[9,6,0],
[9,7,27.3714285714286],
[9,8,38.0541666666667],
[9,9,47.2333333333333],
[9,10,69.97],
[9,11,39.5318181818182],
[9,12,41.6769230769231],
[9,13,0],
[9,14,0],
[9,15,20.61],
[9,16,0],
[10,0,50.4444444444444],
[10,1,143.7],
[10,2,74.3407079646018],
[10,3,0],
[10,4,102.669565217391],
[10,5,83.425],
[10,6,270.0475],
[10,7,70.5818181818182],
[10,8,145.503571428571],
[10,9,166.507142857143],
[10,10,125.090322580645],
[10,11,87.8794117647059],
[10,12,100.778947368421],
[10,13,114.30303030303],
[10,14,118.049450549451],
[10,15,122.253012048193],
[10,16,0],
[11,0,358.95],
[11,1,0],
[11,2,0],
[11,3,259.453623188406],
[11,4,375.188644688644],
[11,5,296.844444444444],
[11,6,263.514705882353],
[11,7,259.963235294118],
[11,8,217.860869565217],
[11,9,183.285714285714],
[11,10,182.883333333333],
[11,11,157.5],
[11,12,0],
[11,13,0],
[11,14,0],
[11,15,239.529411764706],
[11,16,189.777966101695],
[12,0,245.528571428571],
[12,1,0],
[12,2,211.55],
[12,3,191.786666666667],
[12,4,199.033333333333],
[12,5,0],
[12,6,0],
[12,7,152.4],
[12,8,0],
[12,9,0],
[12,10,137.060869565217],
[12,11,0],
[12,12,0],
[12,13,0],
[12,14,0],
[12,15,176.677777777778],
[12,16,0],
[13,0,123.611428571429],
[13,1,0],
[13,2,0],
[13,3,145.8],
[13,4,70.6866666666667],
[13,5,0],
[13,6,0],
[13,7,36.1142857142857],
[13,8,13.6045454545455],
[13,9,0],
[13,10,133.436363636364],
[13,11,0],
[13,12,0],
[13,13,25.6444444444444],
[13,14,0],
[13,15,23.5769230769231],
[13,16,0],
[14,0,81.0928571428571],
[14,1,23.0756345177665],
[14,2,14.0479861111111],
[14,3,13.6545197740113],
[14,4,15.7576086956522],
[14,5,0],
[14,6,170.42],
[14,7,0],
[14,8,0],
[14,9,0],
[14,10,25.2791666666667],
[14,11,0],
[14,12,0],
[14,13,40.8591304347826],
[14,14,37.9222222222222],
[14,15,76.3729166666667],
[14,16,0],

];
option = {
    tooltip: {},
    visualMap: {
        max: 200,
        inRange: {
            color: ['#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8', '#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026']
        }
    },
    xAxis3D: {
        type: 'category',
        data: hours
    },
    yAxis3D: {
        type: 'category',
        data: days
    },
    zAxis3D: {
        type: 'value'
    },
    grid3D: {
        boxWidth: 200,
        boxDepth: 360,
        viewControl: {
            // projection: 'orthographic'
        },
        light: {
            main: {
                intensity: 1.4,
                shadow: false
            },
            ambient: {
                intensity:0.25
            }
        }
    },
    series: [{
        type: 'bar3D',
        data: data.map(function (item) {
            return {
                value: [item[1], item[0], item[2]],
            }
        }),
        shading: 'lambert',

        label: {
            fontSize: 16,
            borderWidth: 1
        },

        emphasis: {
            label: {
                fontSize: 20,
                color: '#900'
            },
            itemStyle: {
                color: '#900'
            }
        }
    }]
}