Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
875 lars 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.8.2/jquery.min.js"></script>
8
		<style type="text/css">
9
${demo.css}
10
		</style>
11
		<script type="text/javascript">
12
$(function () {
13
    $('#container').highcharts({
14
        chart: {
15
            type: 'column'
16
        },
17
        title: {
18
            text: 'Stacked column chart'
19
        },
20
        xAxis: {
21
            categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
22
        },
23
        yAxis: {
24
            min: 0,
25
            title: {
26
                text: 'Total fruit consumption'
27
            },
28
            stackLabels: {
29
                enabled: true,
30
                style: {
31
                    fontWeight: 'bold',
32
                    color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
33
                }
34
            }
35
        },
36
        legend: {
37
            align: 'right',
38
            x: -30,
39
            verticalAlign: 'top',
40
            y: 25,
41
            floating: true,
42
            backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
43
            borderColor: '#CCC',
44
            borderWidth: 1,
45
            shadow: false
46
        },
47
        tooltip: {
48
            formatter: function () {
49
                return '<b>' + this.x + '</b><br/>' +
50
                    this.series.name + ': ' + this.y + '<br/>' +
51
                    'Total: ' + this.point.stackTotal;
52
            }
53
        },
54
        plotOptions: {
55
            column: {
56
                stacking: 'normal',
57
                dataLabels: {
58
                    enabled: true,
59
                    color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white',
60
                    style: {
61
                        textShadow: '0 0 3px black'
62
                    }
63
                }
64
            }
65
        },
66
        series: [{
67
            name: 'John',
68
            data: [5, 3, 4, 7, 2]
69
        }, {
70
            name: 'Jane',
71
            data: [2, 2, 3, 2, 1]
72
        }, {
73
            name: 'Joe',
74
            data: [3, 4, 4, 2, 5]
75
        }]
76
    });
77
});
78
		</script>
79
	</head>
80
	<body>
81
<script src="../../js/highcharts.js"></script>
82
<script src="../../js/modules/exporting.js"></script>
83
 
84
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
85
 
86
	</body>
87
</html>