Create area chart with two series

Description

The following code shows how to create area chart with two series.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>
$(function () {<!--   w  ww  .  ja va 2  s . c  om-->
    $('#container').highcharts({
        chart: {
            type: 'area'
        },
        series: [{
            name: 'B',
            data: [null, 10421, null, 123, null, 6, 11, 32, 110, 235, 369, 640,
                10871, 123, 123, 10527, 10475,123 , 10358, 10295, 10104]
        }, {
            name: 'A',
            data: [
                5, 25, 20000, 120, 19000, 200, 426, 660, 16000, 1060, 1605, 2471, 3322,
                21000, 12, 123, 18000, 18000, 17000,123 ]
        }]
    });    
});
</script>
</head>
<body>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; max-width: 800px; margin: 0 auto"></div>

</body>
</html>

Click to view the demo





















Home »
  highcharts »
    Chart by Type »




Area Chart
Bar Chart
Boxplot Chart
Bubble Chart
Column Chart
Gauge Chart
Line Chart
Pie Chart
Polar Chart
Scatter Chart
Spline Chart