Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
9 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
 
14
    // Radialize the colors
15
    Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, function (color) {
16
        return {
17
            radialGradient: {
18
                cx: 0.5,
19
                cy: 0.3,
20
                r: 0.7
21
            },
22
            stops: [
23
                [0, color],
24
                [1, Highcharts.Color(color).brighten(-0.3).get('rgb')] // darken
25
            ]
26
        };
27
    });
28
 
29
    // Build the chart
30
    $('#container').highcharts({
31
        chart: {
32
            plotBackgroundColor: null,
33
            plotBorderWidth: null,
34
            plotShadow: false,
35
            type: 'pie'
36
        },
37
        title: {
38
            text: 'Browser market shares. January, 2015 to May, 2015'
39
        },
40
        tooltip: {
41
            pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
42
        },
43
        plotOptions: {
44
            pie: {
45
                allowPointSelect: true,
46
                cursor: 'pointer',
47
                dataLabels: {
48
                    enabled: true,
49
                    format: '<b>{point.name}</b>: {point.percentage:.1f} %',
50
                    style: {
51
                        color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
52
                    },
53
                    connectorColor: 'silver'
54
                }
55
            }
56
        },
57
        series: [{
58
            name: "Brands",
59
            data: [
60
                {name: "Microsoft Internet Explorer", y: 56.33},
61
                {
62
                    name: "Chrome",
63
                    y: 24.03,
64
                    sliced: true,
65
                    selected: true
66
                },
67
                {name: "Firefox", y: 10.38},
68
                {name: "Safari", y: 4.77}, {name: "Opera", y: 0.91},
69
                {name: "Proprietary or Undetectable", y: 0.2}
70
            ]
71
        }]
72
    });
73
});
74
		</script>
75
	</head>
76
	<body>
77
<script src="../../js/highcharts.js"></script>
78
<script src="../../js/modules/exporting.js"></script>
79
 
80
<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
81
 
82
	</body>
83
</html>