'handle zooming in lightweight chart

i want when my chart is created, chart automaticly zoom to 20 or 10 last candles. enter image description here

its default zoom when chart creating.

enter image description here

this picture describes what i want.

is there a solution for this question?

thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source