Commit f71ba151 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Add onrendered callback - #880

parent 6b11a1f7
......@@ -641,8 +641,12 @@
});
})
.call(waitForDraw, function () {
if (flow) { flow(); }
// onrendered callback
if (flow) {
flow();
}
if (config.onrendered) {
config.onrendered.call($$);
}
});
}
else {
......@@ -650,7 +654,9 @@
$$.redrawLine(drawLine);
$$.redrawArea(drawArea);
$$.redrawCircle(cx, cy);
// onrendered callback
if (config.onrendered) {
config.onrendered.call($$);
}
}
// update fadein condition
......@@ -968,6 +974,7 @@
onresize: function () {},
onresized: function () {},
oninit: function () {},
onrendered: function () {},
transition_duration: 350,
data_x: undefined,
data_xs: {},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -20,6 +20,7 @@ c3_chart_internal_fn.getDefaultConfig = function () {
onresize: function () {},
onresized: function () {},
oninit: function () {},
onrendered: function () {},
transition_duration: 350,
data_x: undefined,
data_xs: {},
......
......@@ -636,8 +636,12 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
});
})
.call(waitForDraw, function () {
if (flow) { flow(); }
// onrendered callback
if (flow) {
flow();
}
if (config.onrendered) {
config.onrendered.call($$);
}
});
}
else {
......@@ -645,7 +649,9 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
$$.redrawLine(drawLine);
$$.redrawArea(drawArea);
$$.redrawCircle(cx, cy);
// onrendered callback
if (config.onrendered) {
config.onrendered.call($$);
}
}
// update fadein condition
......
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