diff --git a/src/helpers/helpers.chart.js b/src/helpers/helpers.chart.js index bc1774b56..b94780667 100644 --- a/src/helpers/helpers.chart.js +++ b/src/helpers/helpers.chart.js @@ -137,13 +137,15 @@ export function resolvePointProperties(chart, options) { options.radius = radius; } const size = radius * 2; + const adjustCenterX = box.centerX + options.xAdjust; + const adjustCenterY = box.centerY + options.yAdjust; return { - x: box.x + options.xAdjust, - y: box.y + options.yAdjust, - x2: box.x + size + options.xAdjust, - y2: box.y + size + options.yAdjust, - centerX: box.centerX + options.xAdjust, - centerY: box.centerY + options.yAdjust, + x: adjustCenterX - radius, + y: adjustCenterY - radius, + x2: adjustCenterX + radius, + y2: adjustCenterY + radius, + centerX: adjustCenterX, + centerY: adjustCenterY, width: size, height: size }; diff --git a/test/fixtures/point/hooks.png b/test/fixtures/point/hooks.png index 1484473fa..ec6b76122 100644 Binary files a/test/fixtures/point/hooks.png and b/test/fixtures/point/hooks.png differ diff --git a/test/fixtures/polygon/hooks.png b/test/fixtures/polygon/hooks.png index b406650da..fb47360cf 100644 Binary files a/test/fixtures/polygon/hooks.png and b/test/fixtures/polygon/hooks.png differ