source: ether_statistics/web/resources/js/Wijmo.2.2.2/Wijmo-Complete/development-bundle/samples/radialgauge/RPM.html @ 651

Last change on this file since 651 was 651, checked in by vmipsl, 12 years ago

wijmo

File size: 4.7 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4    <title></title>
5    <meta charset="utf-8" />
6    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
7    <meta name="description" content="%description%" />
8    <meta name="keywords" content="" />
9    <meta name="author" content="ComponentOne" />
10    <link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" />
11    <script src="../../external/jquery-1.8.0.min.js" type="text/javascript"></script>
12    <script src="../../external/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script>
13    <script src="../../external/raphael-min.js" type="text/javascript"></script>
14    <script src="../../wijmo/jquery.wijmo.raphael.js" type="text/javascript"></script>
15    <script src="../../wijmo/jquery.wijmo.wijgauge.js" type="text/javascript"></script>
16    <script src="../../wijmo/jquery.wijmo.wijradialgauge.js" type="text/javascript"></script>
17    <script type="text/javascript">
18        $(document).ready(function () {
19            $("#gauge").wijradialgauge({
20                width: 500,
21                height: 500,
22                radius: "auto",
23                value: 468,
24                max: 1200,
25                min: 0,
26                startAngle: 270,
27                sweepAngle: 240,
28                labels: {
29                    style: {
30                        "font-size": 15,
31                        "font-weight": "800",
32                        fill: "#000"
33                    },
34                    offset: -5
35                },
36                pointer: {
37                    length: 1,
38                    width: 16,
39                    style: { fill: "340-#FB7800-#C00100", stroke: "none" }
40                },
41                cap: {
42                    style: {
43                        fill: "#C00100",
44                        stroke: "none"
45                    }
46                },
47                tickMajor: {
48                    factor: 8,
49                    offset: 0,
50                    interval: 100,
51                    position: "inside",
52                    style: { fill: "#333333", stroke: "none", height: 4 }
53                },
54                tickMinor: {
55                    factor: 3,
56                    visible: true,
57                    offset: 10,
58                    interval: 25,
59                    position: "inside",
60                    style: { fill: "#333333", stroke: "none", height: 1 }
61                },
62                face: {
63                    style: {},
64                    template: function (ui) {
65                        var set = ui.canvas.set();
66                        var circle = ui.canvas.circle(ui.origin.x, ui.origin.y, ui.r);
67                        circle.attr({ "stroke": "#474747", "stroke-width": 3, fill: "#fff" });
68                        set.push(circle);
69                        var circle2 = ui.canvas.circle(ui.origin.x, ui.origin.y, 100);
70                        circle2.attr({ fill: "#060606" });
71                        set.push(circle2);
72                        return set;
73                    }
74                },
75                ranges: [{
76                    startWidth: 73,
77                    endWidth: 73,
78                    startValue: 1000,
79                    endValue: 1200,
80                    startDistance: 0.575,
81                    endDistance: 0.575,
82                    style: {
83                        fill: "40-#FB7800-#C00100", stroke: "none"
84                    }
85                }, {
86                    startWidth: 10,
87                    endWidth: 1,
88                    startValue: 625,
89                    endValue: 1175,
90                    startDistance: 0.75,
91                    endDistance: 0.8,
92                    style: {
93                        fill: "#333333", stroke: "none"
94                    }
95                }]
96            });
97        });
98   
99    </script>
100</head>
101<body class="demo-single">
102    <div class="container">
103        <div class="header">
104            <h2>
105                Speedometer</h2>
106        </div>
107        <div class="main demo">
108            <!-- Begin demo markup -->
109            <div id="gauge" style="background: #000" class="ui-corner-all">
110            </div>
111            <!-- End demo markup -->
112            <div class="demo-options">
113                <!-- Begin options markup -->
114                <!-- End options markup -->
115            </div>
116        </div>
117        <div class="footer demo-description">
118            <p>This sample use <b>face</b>'s <b>template</b> and <b>range</b>.</p>
119        </div>
120    </div>
121</body>
122</html>
Note: See TracBrowser for help on using the repository browser.