239Echarts - 3D 柱状图(Stacked Bar3D)

效果图

239Echarts - 3D 柱状图(Stacked Bar3D)

源代码

$.getScript('vendors/simplex.js').done(function () {


function generateData() {
    var data = [];
    var noise = new SimplexNoise(Math.random);
    for (var i = 0; i <= 10; i++) {
        for (var j = 0; j <= 10; j++) {
            var value = noise.noise2D(i / 5, j / 5);
            data.push([i, j, value * 2 + 4]);
        }
    }
    return data;
}

var series = [];
for (var i = 0; i < 10; i++) {
    series.push({
        type: 'bar3D',
        data: generateData(),
        stack: 'stack',
        shading: 'lambert',
        emphasis: {
            label: {
                show: false
            }
        }
    });
}

myChart.setOption({
    xAxis3D: {
        type: 'value'
    },
    yAxis3D: {
        type: 'value'
    },
    zAxis3D: {
        type: 'value'
    },
    grid3D: {
        viewControl: {
            // autoRotate: true
        },
        light: {
            main: {
                shadow: true,
                quality: 'ultra',
                intensity: 1.5
            }
        }
    },
    series: series
});

});
上一篇:Neural Networks的regularization技巧:谈谈网络的泛化能力与noise、Inductive Bias的关系


下一篇:python – A *算法生成的噪声路径