Highcharts Demo

author(s): Torstein Hønsi

by sqiudward

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-3d.js"></script>

<div id="container" style="height: 400px"></div>

CSS

#container {
    height: 400px; 
    min-width: 310px; 
    max-width: 800px;
    margin: 0 auto;
}

JavaScript

Highcharts.chart('container', {
    chart: {
        type: 'bar3d',
        options3d: {
            enabled: true,
            alpha: 20,
            beta: 30,
            depth: 200,
            viewDistance: 10,
            frame: {
                bottom: {
                    size: 1,
                    color: 'rgba(0,0,0,0.05)'
                }
            }
        }
    },
    title: {
        text: 'a 3D Scatter Chart'
    },
    subtitle: {
        text: 'using x y z coordinates'
    },
    yAxis: {
        min: 0,
        max: 10
    },
    xAxis: {
        min: 0,
        max: 10,
        gridLineWidth: 1
    },
    zAxis: {
        min: 0,
        max: 10,
        showFirstLabel: false
    },
    series: [{
        data: [
            // [X, Y, Z]
            [1, 1, 1],
            [1, 2, 1],
            [1, 3, 1],
            [2, 4, 1],
            [2, 5, 1],
            [4, 6, 1],
            [4, 7, 1],
            [7, 8, 1],
            [7, 9, 1],
            [8, 10, 1]
        ]
    }]
});