Zooming out a chart


I've made a chart with a template and a ui_template node (see flow in addendum). The chart
depicts time (x) vs energy(y) over a seven day period. This works fine.

Then I want to be able to zoom in on a certain time period by clicking two points on the graph.
First point selection

Second point selection

Then it is zoomed out

but as soon as my mouse pointer moves the initial chart is shown again? Also when I click the
chart again, it seems I cannot select points anymore (see console of your browser). What am I doing
wrong ?

Any help greatly appreciated

flows(1).json (48.9 KB)