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()); }