I want to set a width between vertical grid or time interval, in my case I wish to set it to 15 seconds per grid on lightweight chart.
I have gone through the documentation thoroughly and tried manipulating between barSpacing, minBarSpacing with
// Create the Main Series (Candlesticks)
const mainSeries = chart.addAreaSeries({
topColor: "rgba(47, 150, 240, 0.56)",
bottomColor: "rgba(47, 150, 240, 0.04)",
lineColor: "#2f96f0",
lineWidth: 3,
crosshairMarkerVisible: false,
});
chart.timeScale().applyOptions({
barSpacing: 5.5,
minBarSpacing: 0.5,
});
I have also tried manipulating the setVisibleRange. With Data with time value of Every Second.
chart.timeScale().setVisibleRange({
from: 1681961040,
to: 1681961140,
});`
So with properly setting everything up right, I can get it to be in a 10 seconds interval with a reasonable width between each grid. Whenever I try to get anything more or less the width between vertical grid lines do not change. Is there any way to customly achieve this outside the lightweight chart settings available. Any assitance or point in the right direction will be appreciated.