Extract the function that pushes an event onto the chart, for reuse outside this...