I am attempting to create a game of this sort – https://www.bloomberg.com/features/2015-stock-chart-trading-game/
I need to generate a dynamic charts for which I am thinking of this https://canvasjs.com/html5-javascript-dynamic-chart/.
My question is how can i record data point values whenever mouse button is click down(buy) and up(sell).
Whenever mouse is clicked down/up record the data point at the right end of the chart window.
Down and Up is one complete trade/cycle of trade (for game purposes) – I have keep track of buy/sell data points and calculate the points/profits made in that chart replay.