Getting Started

Performance !!!

Chart Data

Bar and Column Charts

Line and Area Charts

Pie and Funnel Charts

Scatter and Bubble Charts

Radar and Polar Charts

Financial Charts

Gantt Charts

Combinational Charts

Dynamic Charts

Working with Chart Axes

Chart Features

Customizing Chart

Client-Side Events


This sample demonstrates the Scatter chart type.

For detailed implementation, please take a look at the HTML code tab.
 
<!DOCTYPE html>
<html>
<head>
	<title>
    Scatter Chart Example - JavaScript Chart by DataViz Charts
</title>
	<link rel="stylesheet" type="text/css" href="../../css/dataviz.chart.css" />
	<link rel="stylesheet" type="text/css" href="../../themes/le-frog/styles.css" />
	<script src="../../js/dataviz.chart.min.js" type="text/javascript"></script>
	
    <script lang="javascript" type="text/javascript">
        var data1 = [];
        var data2 = [];

        var yValue1 = 100;
        var yValue2 = 20;

        for (var i = 0; i < 20; i++) {

            yValue1 += Math.round(Math.random() * 20 - 10);
            data1.push([i, yValue1]);

            yValue2 += Math.round(Math.random() * 20 - 10);
            data2.push([i, yValue2]);
        }

        
            var chart = new DataViz.Chart({
                title: { text: 'Scatter Chart' },
                animation: { duration: 1 },
                series: [
                    {
                        title: 'Scatter 1',
                        type: 'scatter',
                        data: data1,
                        markers: {
                            type: 'diamond',
                            size: 8
                        }
                    },
                    {
                        title: 'Scatter 2',
                        type: 'scatter',
                        data: data2,
                        markers: {
                            type: 'rectangle',
                            size: 8
                        }
                    }
                ]
            });
        chart.write('container');
    </script>

</head>
<body>
    <div>
        <div id="container" style="width: 500px; height: 300px;">
        </div>
    </div>
</body>
</html>