Subversion Repositories php-qbpwcf

Rev

Rev 23 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 liveuser 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
<html>
3
 
4
    <head>
5
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6
        <title>amCharts examples</title>
7
        <link rel="stylesheet" href="style.css" type="text/css">
8
        <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9
        <script src="../amcharts/pie.js" type="text/javascript"></script>
10
 
11
        <script>
12
            var chart;
13
 
14
            var chartData = [
15
                {
16
                    "country": "United States",
17
                    "visits": 9252
18
                },
19
                {
20
                    "country": "China",
21
                    "visits": 1882
22
                },
23
                {
24
                    "country": "Japan",
25
                    "visits": 1809
26
                },
27
                {
28
                    "country": "Germany",
29
                    "visits": 1322
30
                },
31
                {
32
                    "country": "United Kingdom",
33
                    "visits": 1122
34
                },
35
                {
36
                    "country": "France",
37
                    "visits": 1114
38
                },
39
                {
40
                    "country": "India",
41
                    "visits": 984
42
                },
43
                {
44
                    "country": "Spain",
45
                    "visits": 711
46
                }
47
            ];
48
 
49
 
50
            AmCharts.ready(function () {
51
                // PIE CHART
52
                chart = new AmCharts.AmPieChart();
53
 
54
                // title of the chart
55
                chart.addTitle("Visitors countries", 16);
56
 
57
                chart.dataProvider = chartData;
58
                chart.titleField = "country";
59
                chart.valueField = "visits";
60
                chart.sequencedAnimation = true;
61
                chart.startEffect = "elastic";
62
                chart.innerRadius = "30%";
63
                chart.startDuration = 2;
64
                chart.labelRadius = 15;
65
                chart.balloonText = "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>";
66
                // the following two lines makes the chart 3D
67
                chart.depth3D = 10;
68
                chart.angle = 15;
69
 
70
                // WRITE
71
                chart.write("chartdiv");
72
            });
73
        </script>
74
    </head>
75
 
76
    <body>
77
        <div id="chartdiv" style="width:600px; height:400px;"></div>
78
    </body>
79
 
80
</html>