Browse Source

Fix x and index of tooltip.show API - #509

pull/542/head
Masayuki Tanaka 10 years ago
parent
commit
ad81613558
  1. 4
      c3.js
  2. 2
      c3.min.js
  3. 4
      src/api.tooltip.js

4
c3.js

@ -6059,10 +6059,10 @@
index = isValue(args.data.index) ? args.data.index : $$.getIndexByX(args.data.x);
}
}
else if (args.x) {
else if (typeof args.x !== 'undefined') {
index = $$.getIndexByX(args.x);
}
else if (args.index) {
else if (typeof args.index !== 'undefined') {
index = args.index;
}

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

4
src/api.tooltip.js

@ -18,10 +18,10 @@ c3_chart_fn.tooltip.show = function (args) {
index = isValue(args.data.index) ? args.data.index : $$.getIndexByX(args.data.x);
}
}
else if (args.x) {
else if (typeof args.x !== 'undefined') {
index = $$.getIndexByX(args.x);
}
else if (args.index) {
else if (typeof args.index !== 'undefined') {
index = args.index;
}

Loading…
Cancel
Save