lightweight-charts
lightweight-charts copied to clipboard
Seconds Hours Minutes
Is there anyway to show Hours minutes o seconds cause i only see you can use Days, months , Years
You can use timestamp. see this page
If you're referring to the timescale axis, then you need to configure it via timeVisible
. Example:
const chart = LightweightCharts.createChart(
document.getElementById('container'),
{
timeScale: {
timeVisible: true,
},
},
);
Before:
After:
Is there a way to convert the time from a 24 hr format such as 20:30:00 to a 12hr format 8:30:00 (with maybe PM added to it ... 8:30PM)?
You can use a formatter function for the time:
- https://tradingview.github.io/lightweight-charts/docs/api/interfaces/LocalizationOptions#timeformatter