Project

General

Profile

1
<!DOCTYPE HTML>
2
<html>
3
	<head>
4
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
		<title>Highcharts Example</title>
6

    
7
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
8
		<script type="text/javascript">
9
$(function () {
10
    var chart;
11
    $(document).ready(function() {
12
        chart = new Highcharts.Chart({
13
            chart: {
14
                renderTo: 'container',
15
                type: 'area'
16
            },
17
            title: {
18
                text: 'Historic and Estimated Worldwide Population Growth by Region'
19
            },
20
            subtitle: {
21
                text: 'Source: Wikipedia.org'
22
            },
23
            xAxis: {
24
                categories: ['1750', '1800', '1850', '1900', '1950', '1999', '2050'],
25
                tickmarkPlacement: 'on',
26
                title: {
27
                    enabled: false
28
                }
29
            },
30
            yAxis: {
31
                title: {
32
                    text: 'Billions'
33
                },
34
                labels: {
35
                    formatter: function() {
36
                        return this.value / 1000;
37
                    }
38
                }
39
            },
40
            tooltip: {
41
                formatter: function() {
42
                    return ''+
43
                        this.x +': '+ Highcharts.numberFormat(this.y, 0, ',') +' millions';
44
                }
45
            },
46
            plotOptions: {
47
                area: {
48
                    stacking: 'normal',
49
                    lineColor: '#666666',
50
                    lineWidth: 1,
51
                    marker: {
52
                        lineWidth: 1,
53
                        lineColor: '#666666'
54
                    }
55
                }
56
            },
57
            series: [{
58
                name: 'Asia',
59
                data: [502, 635, 809, 947, 1402, 3634, 5268]
60
            }, {
61
                name: 'Africa',
62
                data: [106, 107, 111, 133, 221, 767, 1766]
63
            }, {
64
                name: 'Europe',
65
                data: [163, 203, 276, 408, 547, 729, 628]
66
            }, {
67
                name: 'America',
68
                data: [18, 31, 54, 156, 339, 818, 1201]
69
            }, {
70
                name: 'Oceania',
71
                data: [2, 2, 2, 6, 13, 30, 46]
72
            }]
73
        });
74
    });
75
    
76
});
77
		</script>
78
	</head>
79
	<body>
80
<script src="http://code.highcharts.com/highcharts.js"></script>
81
<script src="http://code.highcharts.com/modules/exporting.js"></script>
82

    
83
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
84

    
85
	</body>
86
</html>
    (1-1/1)