效果图

228Echarts - 3D 柱状图(3D Bar with Dataset)

源代码

$.get('data/asset/data/life-expectancy-table.json', function (data) {
    option = {
        grid3D: {},
        tooltip: {},
        xAxis3D: {
            type: 'category'
        },
        yAxis3D: {
            type: 'category'
        },
        zAxis3D: {},
        visualMap: {
            max: 1e8,
            dimension: 'Population'
        },
        dataset: {
            dimensions: [
                'Income',
                'Life Expectancy',
                'Population',
                'Country',
                {name: 'Year', type: 'ordinal'}
            ],
            source: data
        },
        series: [
            {
                type: 'bar3D',
                // symbolSize: symbolSize,
                shading: 'lambert',
                encode: {
                    x: 'Year',
                    y: 'Country',
                    z: 'Life Expectancy',
                    tooltip: [0, 1, 2, 3, 4]
                }
            }
        ]
    };

    myChart.setOption(option);
});

相关文章:

  • 2021-07-05
  • 2021-11-06
  • 2021-10-21
  • 2021-07-22
  • 2021-06-18
  • 2021-09-14
  • 2022-02-07
猜你喜欢
  • 2021-12-19
  • 2022-01-18
  • 2021-12-06
  • 2022-01-25
  • 2021-11-13
  • 2021-08-28
相关资源
相似解决方案