Browse Source

Add oninit option - #502

pull/542/head
Masayuki Tanaka 11 years ago
parent
commit
aef885afb4
  1. 3
      c3.js
  2. 4
      c3.min.js
  3. 1
      src/config.js
  4. 2
      src/core.js

3
c3.js

@ -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: {},

4
c3.min.js vendored

File diff suppressed because one or more lines are too long

1
src/config.js

@ -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: {},

2
src/core.js

@ -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,

Loading…
Cancel
Save