Browse Source

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
pull/1855/merge
Kevin Crawford 7 years ago committed by Yoshiya Hinosawa
parent
commit
5ba965a67a
  1. 6
      src/core.js

6
src/core.js

@ -244,6 +244,9 @@ c3_chart_internal_fn.initWithData = function (data) {
// Grid lines // Grid lines
if (config.grid_lines_front) { $$.initGridLines(); } if (config.grid_lines_front) { $$.initGridLines(); }
// Cover whole with rects for events
$$.initEventRect();
// Define g for chart // Define g for chart
$$.initChartElements(); $$.initChartElements();
@ -253,9 +256,6 @@ c3_chart_internal_fn.initWithData = function (data) {
// Set targets // Set targets
$$.updateTargets($$.data.targets); $$.updateTargets($$.data.targets);
// Cover whole with rects for events
$$.initEventRect();
// Set default extent if defined // Set default extent if defined
if (config.axis_x_selection) { $$.brush.selectionAsValue($$.getDefaultSelection()); } if (config.axis_x_selection) { $$.brush.selectionAsValue($$.getDefaultSelection()); }

Loading…
Cancel
Save