Home Forums Chart Support Useing CanvasJS with mousewheel Reply To: Useing CanvasJS with mousewheel

#23374

@mihaela,

Similar to how wheel event was attached to achieve zooming the chart with mouse-wheel, you need to attach keydown event to achieve on pressing any key in the keyboard. Please take a look at this JSFiddle. Please refer this stackoverflow thread for more information on key-codes.

Note: As JSFiddle has multiple panels (like HTML, JS, Result, etc), make sure you click somewhere in the result panel and then on top of chart once so that keyboard events are captured by chart.


Vishwas R
Team CanvasJS