Browse Source

Fix tooltip api callback

pull/1220/merge
Masayuki Tanaka 9 years ago
parent
commit
01f33238c8
  1. 4
      c3.js
  2. 2
      c3.min.js
  3. 4
      src/api.tooltip.js

4
c3.js

@ -6863,13 +6863,13 @@
$$.dispatchEvent('mouseover', index, mouse);
$$.dispatchEvent('mousemove', index, mouse);
this.config.tooltip_onshow.call($$, args.data);
$$.config.tooltip_onshow.call($$, args.data);
};
c3_chart_fn.tooltip.hide = function () {
// TODO: get target data by checking the state of focus
this.internal.dispatchEvent('mouseout', 0);
this.config.tooltip_onhide.call(this);
this.internal.config.tooltip_onhide.call(this);
};
// Features:

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

4
src/api.tooltip.js

@ -29,11 +29,11 @@ c3_chart_fn.tooltip.show = function (args) {
$$.dispatchEvent('mouseover', index, mouse);
$$.dispatchEvent('mousemove', index, mouse);
this.config.tooltip_onshow.call($$, args.data);
$$.config.tooltip_onshow.call($$, args.data);
};
c3_chart_fn.tooltip.hide = function () {
// TODO: get target data by checking the state of focus
this.internal.dispatchEvent('mouseout', 0);
this.config.tooltip_onhide.call(this);
this.internal.config.tooltip_onhide.call(this);
};

Loading…
Cancel
Save