mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
N°5621 Move C3 0.4.11 to NPM
This commit is contained in:
64
node_modules/c3/htdocs/samples/custom_xs_scale.html
generated
vendored
Normal file
64
node_modules/c3/htdocs/samples/custom_xs_scale.html
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
<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 chart = c3.generate({
|
||||
bindto: '#chart',
|
||||
data: {
|
||||
xs : {
|
||||
'data1': 'x1',
|
||||
'data2': 'x2',
|
||||
},
|
||||
columns: [
|
||||
['x1', 100, 120, 130, 200, 240, 500],
|
||||
['x2', 150, 220, 230, 400, 540, 600, 800],
|
||||
['data1', 30, 200, 100, 400, 150, 250],
|
||||
['data2', 130, 100, 300, 200, 250, 350, 100],
|
||||
],
|
||||
selection: {
|
||||
enabled: true
|
||||
},
|
||||
onclick: function (d) { console.log("onclick", d); },
|
||||
onmouseover: function (d) { console.log("onmouseover", d); },
|
||||
onmouseout: function (d) { console.log("onmouseout", d); }
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(function () {
|
||||
chart.load({
|
||||
columns: [
|
||||
['data1', 100, 210, 150, null, 200, 150],
|
||||
['data2', 200, 310, 50, 400, 120, 250, 10],
|
||||
]
|
||||
});
|
||||
}, 1000);
|
||||
|
||||
setTimeout(function () {
|
||||
chart.load({
|
||||
columns: [
|
||||
['x2', 150, 220, 230, 400, 540, 600, 800],
|
||||
['data2', 200, 310, 50, 400, 120, 250, 10],
|
||||
['data3', 300, 410, 350, 600, 420, 550, 310],
|
||||
],
|
||||
xs: {
|
||||
data3: 'x2'
|
||||
}
|
||||
});
|
||||
}, 2000);
|
||||
|
||||
setTimeout(function () {
|
||||
chart.xs({
|
||||
'data1': [200, 210, 350, 400, 600, 750],
|
||||
'data2': [200, 210, 350, 400, 550, 750, 900]
|
||||
});
|
||||
}, 3000);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user