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
                plotBackgroundColor: null,
16
                plotBorderWidth: null,
17
                plotShadow: false
18
            },
19
            title: {
20
                text: 'Browser market shares at a specific website, 2010'
21
            },
22
            tooltip: {
23
                formatter: function() {
24
                    return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %';
25
                }
26
            },
27
            plotOptions: {
28
                pie: {
29
                    allowPointSelect: true,
30
                    cursor: 'pointer',
31
                    dataLabels: {
32
                        enabled: true,
33
                        color: '#000000',
34
                        connectorColor: '#000000',
35
                        formatter: function() {
36
                            return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %';
37
                        }
38
                    }
39
                }
40
            },
41
            series: [{
42
                type: 'pie',
43
                name: 'Browser share',
44
                data: [
45
                    ['Firefox',   45.0],
46
                    ['IE',       26.8],
47
                    {
48
                        name: 'Chrome',
49
                        y: 12.8,
50
                        sliced: true,
51
                        selected: true
52
                    },
53
                    ['Safari',    8.5],
54
                    ['Opera',     6.2],
55
                    ['Others',   0.7]
56
                ]
57
            }]
58
        });
59
    });
60
    
61
});
62
		</script>
63
	</head>
64
	<body>
65
<script src="http://code.highcharts.com/highcharts.js"></script>
66
<script src="http://code.highcharts.com/modules/exporting.js"></script>
67

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

    
70
	</body>
71
</html>
    (1-1/1)