dragon
Posts: 2
Joined: Thu Nov 17, 2022 3:43 am

How to use the up and down keys on the keyboard to control the K-line zoom?

This question involves several points: 1. let the chart respond to keyboard events; 2. how to redraw the chart. I don't know how to do it right now, so I'm asking someone for advice.
User avatar
dawid.d
Posts: 807
Joined: Thu Oct 06, 2022 11:31 am

Re: How to use the up and down keys on the keyboard to control the K-line zoom?

Hi,

Welcome to our forum and thanks for contacting us with your question!

1. It depends on what you mean. The accessibility module allows you to navigate the chart using the keyboard. However, if you want to define your own behaviour based on events, you can do it using appropriate methods. For example, for zoom, you can use the setExtremes method for an axis. See: https://api.highcharts.com/class-refere ... etExtremes

2. To redraw a chart, use the redraw method: https://api.highcharts.com/class-refere ... art#redraw

Demo: https://jsfiddle.net/BlackLabel/gm1zv385/

Let me know if that was what you were looking for!
Best regards
Dawid Draguła
Highcharts Developer

Return to “Highcharts Stock”