Browse Source

Modify unload interface - #342

pull/394/head
Masayuki Tanaka 11 years ago
parent
commit
05fc51dd1b
  1. 7
      c3.js
  2. 2
      c3.min.js
  3. 12
      htdocs/samples/data_load.html
  4. 4
      htdocs/samples/data_load_timeseries.html

7
c3.js

@ -4921,10 +4921,11 @@
}
};
c3.unload = function (targetIds, done) {
unload(mapToTargetIds(targetIds), function () {
c3.unload = function (args) {
args = args || {};
unload(mapToTargetIds(args.ids), function () {
redraw({withUpdateOrgXDomain: true, withUpdateXDomain: true, withLegend: true});
if (typeof done === 'function') { done(); }
if (typeof args.done === 'function') { args.done(); }
});
};

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

12
htdocs/samples/data_load.html

@ -52,10 +52,14 @@
});
},
function () {
chart.unload(['data4', 'data5']);
chart.unload({
ids: ['data4', 'data5']
});
},
function () {
chart.unload('data6');
chart.unload({
ids: 'data6'
});
},
function () {
chart.load({
@ -111,7 +115,9 @@
});
},
function () {
chart.unload(['data2', 'data3']);
chart.unload({
ids: ['data2', 'data3']
});
},
];

4
htdocs/samples/data_load_timeseries.html

@ -34,7 +34,9 @@
}, 1000);
setTimeout(function () {
chart.unload('data2');
chart.unload({
ids: 'data2'
});
}, 2000);
setTimeout(function () {

Loading…
Cancel
Save