how to change the default No of entries showing in Candlessticks chart?

186 Views Asked by At

I am trying to create a chart by lightweight-chart. I don't know what is the default number of entries showing on the screen. But i want to show only 25 entries on the chart like in this image i want to show only 25 candlestick by default but the user can see the rest of the candlestick by scrolling it. enter image description here

1

There are 1 best solutions below

0
On

It might look a bit hacky, but you can use setVisibleLogicalRange to set any visible logical range (which is range in bars indexes, so it might be something like [lastIndex - 25, lastIndex]).