質問編集履歴

1

内容追加

2016/05/05 06:13

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -15,3 +15,111 @@
15
15
 
16
16
 
17
17
  ご意見待っています。
18
+
19
+
20
+
21
+
22
+
23
+ HTML
24
+
25
+
26
+
27
+ <!DOCTYPE html>
28
+
29
+ <html lang="en">
30
+
31
+ <head>
32
+
33
+ <meta charset="UTF-8">
34
+
35
+ <title>secessionCustomer</title>
36
+
37
+ <style>
38
+
39
+ .liquidFillGaugeText { font-family: Helvetica; font-weight: bold; }
40
+
41
+ </style>
42
+
43
+ <script src="../d3-master/d3.min.js" language="JavaScript"></script>
44
+
45
+ <script src="liquidFillGauge.js" language="JavaScript"></script>
46
+
47
+ <script src="https://code.jquery.com/jquery-latest.js" language="JavaScript"></script>
48
+
49
+ <script language="JavaScript">
50
+
51
+
52
+
53
+ var targetTagId = document.getElementById('fillgauge');
54
+
55
+ console.log(targetTagId);
56
+
57
+
58
+
59
+ var config = liquidFillGaugeDefaultSettings();
60
+
61
+
62
+
63
+ config.circleColor = "#FF7777";
64
+
65
+ config.textColor = "#FF4848";
66
+
67
+ config.waveTextColor = "#FF0000";
68
+
69
+ config.waveColor = "#FFDDDD";
70
+
71
+ config.circleThickness = 0.2;
72
+
73
+ config.textVertPosition = 0.2;
74
+
75
+ config.waveAnimateTime = 1000;
76
+
77
+
78
+
79
+ var gauge= loadLiquidFillGauge("fillgauge", 25, config);
80
+
81
+ function NewValue(){
82
+
83
+ if(Math.random() > .5){
84
+
85
+ return Math.round(Math.random()*100);
86
+
87
+ } else {
88
+
89
+ return (Math.random()*100).toFixed(1);
90
+
91
+ }
92
+
93
+ }
94
+
95
+ </script>
96
+
97
+ </head>
98
+
99
+ <body>
100
+
101
+ <header>
102
+
103
+ </header>
104
+
105
+ <section>
106
+
107
+ <div id="main" wdith="50%">
108
+
109
+ <div id="liquidArea" wdith="40%" >
110
+
111
+ <svg id="fillgauge" width="50%" height="50%" onclick="gauge.update(NewValue());"></svg>
112
+
113
+ </div>
114
+
115
+ </div>
116
+
117
+ </section>
118
+
119
+ <footer>
120
+
121
+ </footer>
122
+
123
+ </body>
124
+
125
+ </html>