From 5ba965a67a8cc38ce38733f120bd89319357bccc Mon Sep 17 00:00:00 2001 From: Kevin Crawford Date: Tue, 10 Jul 2018 08:18:32 -0700 Subject: [PATCH] Append mouse event nodes before chart elements (#2359) Mouse event nodes were appended last, which covered up the chart elements so that their events weren't firing correctly. Fixes #2329 and #2354 --- src/core.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core.js b/src/core.js index 9f8a196..2b12f0d 100644 --- a/src/core.js +++ b/src/core.js @@ -244,6 +244,9 @@ c3_chart_internal_fn.initWithData = function (data) { // Grid lines if (config.grid_lines_front) { $$.initGridLines(); } + // Cover whole with rects for events + $$.initEventRect(); + // Define g for chart $$.initChartElements(); @@ -253,9 +256,6 @@ c3_chart_internal_fn.initWithData = function (data) { // Set targets $$.updateTargets($$.data.targets); - // Cover whole with rects for events - $$.initEventRect(); - // Set default extent if defined if (config.axis_x_selection) { $$.brush.selectionAsValue($$.getDefaultSelection()); }