Commit aef885af authored by Masayuki Tanaka's avatar Masayuki Tanaka

Add oninit option - #502

parent a0833777
......@@ -264,6 +264,7 @@
// Draw with targets
if (binding) {
$$.updateDimension();
$$.config.oninit.call($$);
$$.redraw({
withTransform: true,
withUpdateXDomain: true,
......@@ -778,6 +779,7 @@
if (selection.node().parentNode) {
window.clearInterval(interval);
$$.updateDimension();
$$.config.oninit.call($$);
$$.redraw({
withTransform: true,
withUpdateXDomain: true,
......@@ -878,6 +880,7 @@
onmouseout: function () {},
onresize: function () {},
onresized: function () {},
oninit: 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.
......@@ -16,6 +16,7 @@ c3_chart_internal_fn.getDefaultConfig = function () {
onmouseout: function () {},
onresize: function () {},
onresized: function () {},
oninit: function () {},
transition_duration: 350,
data_x: undefined,
data_xs: {},
......
......@@ -259,6 +259,7 @@ c3_chart_internal_fn.initWithData = function (data) {
// Draw with targets
if (binding) {
$$.updateDimension();
$$.config.oninit.call($$);
$$.redraw({
withTransform: true,
withUpdateXDomain: true,
......@@ -773,6 +774,7 @@ c3_chart_internal_fn.observeInserted = function (selection) {
if (selection.node().parentNode) {
window.clearInterval(interval);
$$.updateDimension();
$$.config.oninit.call($$);
$$.redraw({
withTransform: true,
withUpdateXDomain: true,
......
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