Create Area chart with negative values
Description
The following code shows how to create Area chart with negative values.
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 () {<!--from ww w .j a v a 2s . c o m-->
$('#container').highcharts({
chart: {
type: 'area'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
series: [{
name: 'A',
data: [5, 3, 4, 7, 2]
}, {
name: 'B',
data: [2, -2, -3, 2, 1]
}, {
name: 'C',
data: [3, 4, 4, -2, 5]
}]
});
});
</script>
</head>
<body>
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; height: 400px; max-width: 800px; margin: 0 auto"></div>
</body>
</html>