Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
776 lars 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
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
7
        <title>amCharts Responsive Example</title>
8
        <script src="http://www.amcharts.com/lib/3/amcharts.js"></script>
9
        <script src="http://www.amcharts.com/lib/3/pie.js"></script>
10
        <script src="../responsive.min.js"></script>
11
        <style>
12
            body,
13
            html {
14
                height: 100%;
15
                padding: 0;
16
                margin: 0;
17
            }
18
 
19
            .chartdiv {
20
                width: 50%;
21
                height: 100%;
22
                float: left;
23
            }
24
        </style>
25
        <script>
26
            AmCharts.makeChart("chart1",
27
            {
28
                "type": "pie",
29
                "titles": [
30
                {
31
                    "text": "Visits",
32
                    "size": 16
33
                }],
34
                "dataProvider": [
35
                {
36
                    "country": "United States",
37
                    "visits": 7252
38
                },
39
                {
40
                    "country": "China",
41
                    "visits": 3882
42
                },
43
                {
44
                    "country": "Japan",
45
                    "visits": 1809
46
                },
47
                {
48
                    "country": "Germany",
49
                    "visits": 1322
50
                },
51
                {
52
                    "country": "United Kingdom",
53
                    "visits": 1122
54
                }],
55
                "valueField": "visits",
56
                "titleField": "country",
57
                "startEffect": "elastic",
58
                "startDuration": 2,
59
                "labelRadius": 15,
60
                "innerRadius": "50%",
61
                "depth3D": 10,
62
                "balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>",
63
                "angle": 15,
64
                "legend":
65
                {},
66
                "responsive":
67
                {
68
                    "enabled": true
69
                }
70
            });
71
            AmCharts.makeChart("chart2",
72
            {
73
                "type": "pie",
74
                "theme": "none",
75
                "titles": [
76
                {
77
                    "text": "Views",
78
                    "size": 16
79
                }],
80
                "dataProvider": [
81
                {
82
                    "country": "United States",
83
                    "visits": 10616
84
                },
85
                {
86
                    "country": "China",
87
                    "visits": 9845
88
                },
89
                {
90
                    "country": "Japan",
91
                    "visits": 3111
92
                },
93
                {
94
                    "country": "Germany",
95
                    "visits": 2874
96
                },
97
                {
98
                    "country": "United Kingdom",
99
                    "visits": 2110
100
                }],
101
                "valueField": "visits",
102
                "titleField": "country",
103
                "startEffect": "elastic",
104
                "startDuration": 2,
105
                "labelRadius": 15,
106
                "innerRadius": "50%",
107
                "depth3D": 10,
108
                "balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>",
109
                "angle": 15,
110
                "legend":
111
                {},
112
                "responsive":
113
                {
114
                    "enabled": true
115
                }
116
            });
117
        </script>
118
    </head>
119
 
120
    <body>
121
        <div id="chart1" class="chartdiv"></div>
122
        <div id="chart2" class="chartdiv"></div>
123
    </body>
124
 
125
</html>