Commit 30194f6b authored by Masayuki Tanaka's avatar Masayuki Tanaka

Support json and rows on flow api - #424

parent 05707358
......@@ -4942,9 +4942,23 @@
};
c3.flow = function (args) {
var targets = convertDataToTargets(convertColumnsToData(args.columns), true), notfoundIds = [],
var targets, data, notfoundIds = [],
orgDataCount = getMaxDataCount(), dataCount, domain, baseTarget, baseValue, length = 0, tail = 0, diff, to;
if (args.json) {
data = convertJsonToData(args.json, args.keys);
}
else if (args.rows) {
data = convertRowsToData(args.rows);
}
else if (args.columns) {
data = convertColumnsToData(args.columns);
}
else {
return;
}
targets = convertDataToTargets(data, true);
// Update/Add data
c3.data.targets.forEach(function (t) {
var found = false, i, j;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -61,10 +61,11 @@
setTimeout(function () {
// Load only one data
chart.flow({
columns: [
['data1', 500, 200, 100],
['data2', 100, null, 50],
['data3', 200, null, null],
rows: [
['data1', 'data2', 'data3'],
[500, 100, 200],
[200, null, null],
[100, 50, null]
],
duration: 1500,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment