Because event propagation was being killed on the click event of each chart, this was not allowing parent DOM elements to receive the click event. Clicks on the background layers (ChartContainer, ChartRow, etc) would bubble up fine, but we miss any click events from charts. This PR allows event propagation at the chart level, and the onBackgroundClick property of the ChartContainer still works as intended by scrutinizing the event target of the click event that bubbles up to it and triggering the onBackgroundClick property only when the event target does not come from a chart component.
NOTE: I mocked up a "playground" example for demonstration that will need to be stripped out.
Because event propagation was being killed on the click event of each chart, this was not allowing parent DOM elements to receive the click event. Clicks on the background layers (
ChartContainer
,ChartRow
, etc) would bubble up fine, but we miss any click events from charts. This PR allows event propagation at the chart level, and theonBackgroundClick
property of theChartContainer
still works as intended by scrutinizing the event target of the click event that bubbles up to it and triggering theonBackgroundClick
property only when the event target does not come from a chart component.NOTE: I mocked up a "playground" example for demonstration that will need to be stripped out.