Browse Source

Fix tooltip position when arc and legend right - #847

pull/851/head
Masayuki Tanaka 10 years ago
parent
commit
2de76376d0
  1. 2
      c3.js
  2. 2
      c3.min.js
  3. 2
      src/tooltip.js

2
c3.js

@ -3647,7 +3647,7 @@
mouse = d3.mouse(element);
// Determin tooltip position
if (forArc) {
tooltipLeft = ($$.width / 2) + mouse[0];
tooltipLeft = (($$.width - ($$.isLegendRight ? $$.getLegendWidth() : 0)) / 2) + mouse[0];
tooltipTop = ($$.height / 2) + mouse[1] + 20;
} else {
svgLeft = $$.getSvgLeft(true);

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

2
src/tooltip.js

@ -56,7 +56,7 @@ c3_chart_internal_fn.tooltipPosition = function (dataToShow, tWidth, tHeight, el
mouse = d3.mouse(element);
// Determin tooltip position
if (forArc) {
tooltipLeft = ($$.width / 2) + mouse[0];
tooltipLeft = (($$.width - ($$.isLegendRight ? $$.getLegendWidth() : 0)) / 2) + mouse[0];
tooltipTop = ($$.height / 2) + mouse[1] + 20;
} else {
svgLeft = $$.getSvgLeft(true);

Loading…
Cancel
Save