質問編集履歴
1
内容追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,4 +6,58 @@
|
|
6
6
|
|
7
7
|
もしかするとSVGタグに接近する時、特別なselectorがあるのですか?
|
8
8
|
|
9
|
-
ご意見待っています。
|
9
|
+
ご意見待っています。
|
10
|
+
|
11
|
+
|
12
|
+
HTML
|
13
|
+
|
14
|
+
<!DOCTYPE html>
|
15
|
+
<html lang="en">
|
16
|
+
<head>
|
17
|
+
<meta charset="UTF-8">
|
18
|
+
<title>secessionCustomer</title>
|
19
|
+
<style>
|
20
|
+
.liquidFillGaugeText { font-family: Helvetica; font-weight: bold; }
|
21
|
+
</style>
|
22
|
+
<script src="../d3-master/d3.min.js" language="JavaScript"></script>
|
23
|
+
<script src="liquidFillGauge.js" language="JavaScript"></script>
|
24
|
+
<script src="https://code.jquery.com/jquery-latest.js" language="JavaScript"></script>
|
25
|
+
<script language="JavaScript">
|
26
|
+
|
27
|
+
var targetTagId = document.getElementById('fillgauge');
|
28
|
+
console.log(targetTagId);
|
29
|
+
|
30
|
+
var config = liquidFillGaugeDefaultSettings();
|
31
|
+
|
32
|
+
config.circleColor = "#FF7777";
|
33
|
+
config.textColor = "#FF4848";
|
34
|
+
config.waveTextColor = "#FF0000";
|
35
|
+
config.waveColor = "#FFDDDD";
|
36
|
+
config.circleThickness = 0.2;
|
37
|
+
config.textVertPosition = 0.2;
|
38
|
+
config.waveAnimateTime = 1000;
|
39
|
+
|
40
|
+
var gauge= loadLiquidFillGauge("fillgauge", 25, config);
|
41
|
+
function NewValue(){
|
42
|
+
if(Math.random() > .5){
|
43
|
+
return Math.round(Math.random()*100);
|
44
|
+
} else {
|
45
|
+
return (Math.random()*100).toFixed(1);
|
46
|
+
}
|
47
|
+
}
|
48
|
+
</script>
|
49
|
+
</head>
|
50
|
+
<body>
|
51
|
+
<header>
|
52
|
+
</header>
|
53
|
+
<section>
|
54
|
+
<div id="main" wdith="50%">
|
55
|
+
<div id="liquidArea" wdith="40%" >
|
56
|
+
<svg id="fillgauge" width="50%" height="50%" onclick="gauge.update(NewValue());"></svg>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
</section>
|
60
|
+
<footer>
|
61
|
+
</footer>
|
62
|
+
</body>
|
63
|
+
</html>
|