Commit 75d9119a authored by Masayuki Tanaka's avatar Masayuki Tanaka

Add duration to flow

parent 10b3d852
......@@ -3943,6 +3943,7 @@
flowStart = getValueOnIndex(c3.data.targets[0].values, flowIndex),
flowEnd = getValueOnIndex(c3.data.targets[0].values, flowIndex + flowLength),
orgDomain = x.domain(),
durationForFlow = options.flow.duration || duration,
wait = generateWait();
// remove head data after rendered
......@@ -3961,7 +3962,7 @@
}
transform = 'translate(' + translateX + ',0) scale(' + scaleX + ',1)';
d3.transition().ease('linear').each(function () {
d3.transition().ease('linear').duration(durationForFlow).each(function () {
wait.add(axes.x.transition().call(xAxis));
wait.add(mainBar.transition().attr('transform', transform));
wait.add(mainLine.transition().attr('transform', transform));
......@@ -4776,7 +4777,8 @@
redraw({
flow: {
index: c3.data.targets[0].values[0].index,
length: length
length: length,
duration: args.duration
},
withLegend: true
});
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -66,7 +66,8 @@
['data1', 500],
['data2', 100],
['data3', 200],
]
],
duration: 500
});
}, 1000);
......@@ -76,7 +77,8 @@
['data1', 200],
// ['data2', 100],
['data3', 100]
]
],
duration: 150
});
}, 2000);
......
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