Browse Source

Update sample for gauge - #254

pull/274/head
Masayuki Tanaka 11 years ago
parent
commit
facf083dc1
  1. 32
      htdocs/samples/chart_arc_gauge.html

32
htdocs/samples/chart_arc_gauge.html

@ -40,7 +40,9 @@
var cycleDemo = function () { var cycleDemo = function () {
setTimeout(function () { setTimeout(function () {
chart = chart.update(['gauge', 'color'], ''); d3.select('#chart .c3-chart-arcs-background')
.transition()
.style('fill', '#333');
}, 1000); }, 1000);
setTimeout(function () { setTimeout(function () {
@ -61,9 +63,11 @@
}); });
}, 4000); }, 4000);
// setTimeout(function () { setTimeout(function () {
// chart = chart.update(['gauge', 'color'], '#e0e0e0'); d3.select('#chart .c3-chart-arcs-background')
// }, 5000); .transition()
.style('fill', '#e0e0e0');
}, 5000);
setTimeout(function () { setTimeout(function () {
chart.load({ chart.load({
@ -83,49 +87,41 @@
}); });
}, 8000); }, 8000);
// setTimeout(function () {
// chart = chart.update(['gauge', 'width'], 10);
// }, 9000);
setTimeout(function () { setTimeout(function () {
chart.load({ chart.load({
columns: [[ 'data', 0 ]] columns: [[ 'data', 0 ]]
}); });
}, 10000); }, 9000);
setTimeout(function () { setTimeout(function () {
chart.load({ chart.load({
columns: [[ 'data', 50 ]] columns: [[ 'data', 50 ]]
}); });
}, 11000); }, 10000);
setTimeout(function () { setTimeout(function () {
chart.load({ chart.load({
columns: [[ 'data', 91.4 ]] columns: [[ 'data', 91.4 ]]
}); });
}, 12000); }, 11000);
// setTimeout(function () {
// chart = chart.update(['gauge', 'width'], 39);
// }, 13000);
setTimeout(function () { setTimeout(function () {
chart.load({ chart.load({
columns: [[ 'data', 0 ]] columns: [[ 'data', 0 ]]
}); });
}, 14000); }, 12000);
setTimeout(function () { setTimeout(function () {
chart.load({ chart.load({
columns: [[ 'data', 50 ]] columns: [[ 'data', 50 ]]
}); });
}, 15000); }, 13000);
setTimeout(function () { setTimeout(function () {
chart.load({ chart.load({
columns: [[ 'data', 91.4 ]] columns: [[ 'data', 91.4 ]]
}); });
}, 16000); }, 14000);
} }

Loading…
Cancel
Save