|
|
|
@ -11,6 +11,7 @@
|
|
|
|
|
var chart = c3.generate({ |
|
|
|
|
data: { |
|
|
|
|
url: '/data/c3_test.csv', |
|
|
|
|
labels: true |
|
|
|
|
}, |
|
|
|
|
subchart: { |
|
|
|
|
show: true |
|
|
|
@ -19,7 +20,7 @@
|
|
|
|
|
enabled: true |
|
|
|
|
}, |
|
|
|
|
transition: { |
|
|
|
|
duration: 100 |
|
|
|
|
duration: 200 |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -27,22 +28,22 @@
|
|
|
|
|
chart.load({ |
|
|
|
|
url: '/data/c3_test2.csv' |
|
|
|
|
}); |
|
|
|
|
}, 250); |
|
|
|
|
}, 1000); |
|
|
|
|
|
|
|
|
|
setTimeout(function () { |
|
|
|
|
chart.load({ |
|
|
|
|
columns: [ |
|
|
|
|
['data1', 30, 20, 50, 40, 60, 50], |
|
|
|
|
['data1@test', 30, 20, 50, 40, 60, 50], |
|
|
|
|
['data2', 200, 130, 90, 240, 130, 220], |
|
|
|
|
['data3', 300, 200, 160, 400, 250, 250] |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
}, 500); |
|
|
|
|
}, 2000); |
|
|
|
|
|
|
|
|
|
setTimeout(function () { |
|
|
|
|
chart.load({ |
|
|
|
|
rows: [ |
|
|
|
|
['data1', 'data2', 'data3'], |
|
|
|
|
['data1@test', 'data2', 'data3'], |
|
|
|
|
[90, 120, 300], |
|
|
|
|
[40, 160, 240], |
|
|
|
|
[50, 200, 290], |
|
|
|
@ -51,7 +52,7 @@
|
|
|
|
|
[90, 220, 320], |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
}, 750); |
|
|
|
|
}, 3000); |
|
|
|
|
|
|
|
|
|
setTimeout(function () { |
|
|
|
|
chart.load({ |
|
|
|
@ -59,11 +60,11 @@
|
|
|
|
|
['data1', 30, 20, 50, 40, 60, 50,100,200] |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
}, 1000); |
|
|
|
|
}, 4000); |
|
|
|
|
|
|
|
|
|
setTimeout(function () { |
|
|
|
|
chart.unload('data1'); |
|
|
|
|
}, 1250); |
|
|
|
|
chart.unload('data1@test'); |
|
|
|
|
}, 5000); |
|
|
|
|
|
|
|
|
|
setTimeout(function () { |
|
|
|
|
chart.load({ |
|
|
|
@ -71,19 +72,11 @@
|
|
|
|
|
['data2', null, 30, 20, 50, 40, 60, 50] |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
}, 1750); |
|
|
|
|
|
|
|
|
|
setTimeout(function () { |
|
|
|
|
chart.load({ |
|
|
|
|
columns:[ |
|
|
|
|
['data2', null, 30, 20, 50, 40, 60, 50] |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
}, 2000); |
|
|
|
|
}, 6000); |
|
|
|
|
|
|
|
|
|
setTimeout(function () { |
|
|
|
|
chart.unload('data3'); |
|
|
|
|
}, 2250); |
|
|
|
|
}, 7000); |
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
</body> |
|
|
|
|