3D Scatter Chart Tutorial With Examples

Today, We want to share with you 3D Scatter Chart Tutorial With Examples.In this post we will show you 3D scatter chart using higcharts with examples, hear for How to use highcharts to create 3D scatter chart with example we will give you demo and example for implement.In this post, we will learn about 3d scatter plot excel with an example.

3D Scatter Chart Tutorial With Examples

There are the Following The simple About interactive 3d scatter plot Full Information With Example and source code.

As I will cover this Post with live Working example to develop Highcharts 3D scatter chart with points example, so the highcharts line chart is used for this example is following below.

Highcharts 3D Scatter Chart Example

index.html

Angular is a platform for building mobile & desktop web Based user friendly and light weight applications.Angular,It’s TypeScript-based open-source Angularjs web application framework.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Highcharts - 3D Scatter Chart - www.pakainfo.com</title>
    <script src="https://www.pakainfo.com/jquery/js/jquery-1.12.4.js"></script>
    <script src="https://www.pakainfo.com/jquery/js/highcharts.js"></script>
    <script src="https://code.highcharts.com/highcharts-3d.js"></script>
    <script src="https://code.highcharts.com/modules/exporting.js"></script>
    <script type="text/javascript">
        $(function () {
            // Give the points a 3D feel by adding a radial gradient
            Highcharts.getOptions().colors = $.map(Highcharts.getOptions().colors, function (color) {
                return {
                    radialGradient: {
                        cx: 0.4,
                        cy: 0.3,
                        r: 0.5
                    },
                    stops: [
                        [0, color],
                        [1, Highcharts.Color(color).brighten(-0.2).get('rgb')]
                    ]
                };
            });
            var graphtype = {
                renderTo: 'chart-full-content',
                margin: 100,
                type: 'scatter',
                options3d: {
                    enabled: true,
                    alpha: 10,
                    beta: 30,
                    depth: 250,
                    viewDistance: 5,
                    fitToPlot: false,
                    frame: {
                        bottom: { size: 1, color: 'rgba(0,0,0,0.02)' },
                        back: { size: 1, color: 'rgba(0,0,0,0.04)' },
                        side: { size: 1, color: 'rgba(0,0,0,0.06)' }
                    }
                }
            }
            var graphTitle = {
                text: 'Draggable box'
            }
            var graphchildtitle = {
                text: 'Click and drag the plot area to rotate in space'
            }
            var graphplotoptions = {
                scatter: {
                    width: 10,
                    height: 10,
                    depth: 10
                }
            }
            var graphxaxis = {
                min: 0,
                max: 10,
                gridLineWidth: 1
            }
            var graphyaxis = {
                min: 0,
                max: 10,
                title: null
            }
            var chartzaxis = {
                min: 0,
                max: 10,
                showFirstLabel: false
            }
            var graphlegend = {
                enabled: false
            }
            var graphseries = [{
                name: 'Reading',
                colorByPoint: true,
                data: [[1, 6, 5], [8, 7, 9], [1, 3, 4], [4, 6, 8], [5, 7, 7], [6, 9, 6], [7, 0, 5], [2, 3, 3], [3, 9, 8], [3, 6, 5], [4, 9, 4], [2, 3, 3], [6, 9, 9], [0, 7, 0], [7, 7, 9], [7, 2, 9], [0, 6, 2], [4, 6, 7], [3, 7, 7], [0, 1, 7], [2, 8, 6], [2, 3, 7], [6, 4, 8], [3, 5, 9], [7, 9, 5], [3, 1, 7], [4, 4, 2], [3, 6, 2], [3, 1, 6], [6, 8, 5], [6, 6, 7], [4, 1, 1], [7, 2, 7], [7, 7, 0], [8, 8, 9], [9, 4, 1], [8, 3, 4], [9, 8, 9], [3, 5, 3], [0, 2, 4], [6, 0, 2], [2, 1, 3], [5, 8, 9], [2, 1, 1], [9, 7, 6], [3, 0, 2], [9, 9, 0], [3, 4, 8], [2, 6, 1], [8, 9, 2], [7, 6, 5], [6, 3, 1], [9, 3, 1], [8, 9, 3], [9, 1, 0], [3, 8, 7], [8, 0, 0], [4, 9, 7], [8, 6, 2], [4, 3, 0], [2, 3, 5], [9, 1, 4], [1, 1, 4], [6, 0, 2], [6, 1, 6], [3, 8, 8], [8, 8, 7], [5, 5, 0], [3, 9, 6], [5, 4, 3], [6, 8, 3], [0, 1, 5], [6, 7, 3], [8, 3, 2], [3, 8, 3], [2, 1, 6], [4, 6, 7], [8, 9, 9], [5, 4, 2], [6, 1, 3], [6, 9, 5], [4, 8, 2], [9, 7, 4], [5, 4, 2], [9, 6, 1], [2, 7, 3], [4, 5, 4], [6, 8, 1], [3, 4, 0], [2, 2, 6], [5, 1, 2], [9, 9, 7], [6, 9, 9], [8, 4, 3], [4, 1, 7], [6, 2, 5], [0, 4, 9], [3, 5, 9], [6, 9, 1], [1, 9, 2]]
            }]
            // Set up the chart
            var chart = new Highcharts.Chart({
                chart:graphtype,
                title: graphTitle,
                subtitle:graphchildtitle,
                plotOptions: graphplotoptions,
                xAxis: graphxaxis,
                yAxis: graphyaxis,
                zAxis:chartzaxis,
                legend:graphlegend,
                series: graphseries
            });
            // Add mouse events for rotation
            $(chart.chart-full-content).bind('mousedown.hc touchstart.hc', function (eStart) {
                eStart = chart.pointer.normalize(eStart);
                var posX = eStart.pageX,
                    posY = eStart.pageY,
                    alpha = chart.options.chart.options3d.alpha,
                    beta = chart.options.chart.options3d.beta,
                    newAlpha,
                    newBeta,
                    sensitivity = 5; // lower is more sensitive
                $(document).bind({
                    'mousemove.hc touchdrag.hc': function (e) {
                        // Run beta
                        newBeta = beta + (posX - e.pageX) / sensitivity;
                        chart.options.chart.options3d.beta = newBeta;
                        // Run alpha
                        newAlpha = alpha + (e.pageY - posY) / sensitivity;
                        chart.options.chart.options3d.alpha = newAlpha;
                        chart.redraw(false);
                    },
                    'mouseup touchend': function () {
                        $(document).unbind('.hc');
                    }
                });
            });
        });
    </script>
</head>
<body>
    <div id="chart-full-content" style="min-width: 335px; height: 425px; margin: 0 auto"></div>
</body>
</html>

Web Programming Tutorials Example with Demo

Read :

Also Read This 👉   Scatter with Regression Line Chart Tutorial

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about free 3d scatter plot.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.