mirror of https://github.com/masayuki0812/c3.git
Masayuki Tanaka
11 years ago
1 changed files with 0 additions and 48 deletions
@ -1,48 +0,0 @@
|
||||
<html> |
||||
<head> |
||||
<link rel="stylesheet" type="text/css" href="/css/c3.css"> |
||||
</head> |
||||
<body> |
||||
<div id="chart"></div> |
||||
|
||||
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> |
||||
<script src="/js/c3.js"></script> |
||||
<script> |
||||
|
||||
var gauge_fuellevel = c3.generate({ |
||||
data: { |
||||
columns: [ |
||||
[ '%', 81.4 ] |
||||
], |
||||
type: 'gauge' |
||||
}, |
||||
gauge: { |
||||
// color: '', // default value is a grey. "color: '', " is no background. |
||||
label: { |
||||
format: function(value, ratio) { |
||||
return value; |
||||
}, |
||||
// show: false // to turn off the min/max labels. |
||||
}, |
||||
min: 0,//can handle negative min e.g. vacuum / voltage / current flow / rate of change |
||||
max: 100, |
||||
style: 'arc', // Only style currently. |
||||
units: ' %', |
||||
// width: 39 // for adjusting arc thickness |
||||
}, |
||||
legend: { |
||||
show: false |
||||
}, |
||||
size: { |
||||
height: 240, |
||||
width: 240 |
||||
}, |
||||
color: { |
||||
pattern: ['#FF0000', '#F6C600', '#60B044'], // the three color levels for the percentage values. |
||||
values: ['percentage', 30, 60, 90] // alternate first value is 'value' |
||||
} |
||||
}); |
||||
|
||||
</script> |
||||
</body> |
||||
</html> |
Loading…
Reference in new issue