Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
776 lars 1
<html>
2
 
3
    <head>
4
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
7
        <script src="http://www.amcharts.com/lib/3/amcharts.js"></script>
8
        <script src="http://www.amcharts.com/lib/3/gauge.js"></script>
9
        <!-- Export plugin includes and styles -->
10
        <script src="../export.js"></script>
11
        <link type="text/css" href="../export.css" rel="stylesheet">
12
        <style>
13
            body,
14
            html {
15
                height: 100%;
16
                padding: 0;
17
                margin: 0;
18
                overflow: hidden;
19
                font-size: 11px;
20
                font-family: Verdana;
21
            }
22
 
23
            #chartdiv {
24
                width: 100%;
25
                height: 100%;
26
            }
27
        </style>
28
        <script type="text/javascript">
29
            var chart = AmCharts.makeChart("chartdiv",
30
            {
31
                "type": "gauge",
32
                "titles": [
33
                {
34
                    "text": "Speedometer",
35
                    "size": 15
36
                }],
37
                "axes": [
38
                {
39
                    "startValue": 0,
40
                    "axisThickness": 1,
41
                    "endValue": 220,
42
                    "valueInterval": 10,
43
                    "bottomTextYOffset": -20,
44
                    "bottomText": "0 km/h",
45
                    "bands": [
46
                    {
47
                        "startValue": 0,
48
                        "endValue": 90,
49
                        "color": "#00CC00"
50
                    },
51
                    {
52
                        "startValue": 90,
53
                        "endValue": 130,
54
                        "color": "#ffac29"
55
                    },
56
                    {
57
                        "startValue": 130,
58
                        "endValue": 220,
59
                        "color": "#ea3838",
60
                        "innerRadius": "95%"
61
                    }]
62
                }],
63
                "arrows": [
64
                {}],
65
                "export":
66
                {
67
                    "enabled": true
68
                }
69
            });
70
            setInterval(randomValue, 2000);
71
            // set random value
72
            function randomValue()
73
            {
74
                var value = Math.round(Math.random() * 200);
75
                chart.arrows[0].setValue(value);
76
                chart.axes[0].setBottomText(value + " km/h");
77
            }
78
        </script>
79
    </head>
80
 
81
    <body>
82
        <div id="chartdiv"></div>
83
    </body>
84
 
85
</html>