Closed nuel77 closed 1 year ago
If you want to leave blank spaces in the chart then you can use WhitespaceData. Which is essentially a data point with a time
but no price values.
If you want to insert a bar which has all the ohlc values equal to the previous day's close then you would need to do this yourself in the data before using the setData
method on the series.
I would like to ask if Candlestick only supports the daily line level?
@Kusou1 Could you please clarify what you mean by 'daily line level'? I'm not sure what you are asking.
i mean,timeframe only support 1d,not support 1m or 1h, or 15m @SlicedSilver
The library supports any timeframe that you would like to use. It will always plot a bar for every data point that you provide regardless of the timestamps of the data points.
I believe that you are actually asking about the formatting of the dates on the time scale. You can set timeVisible
to true (https://tradingview.github.io/lightweight-charts/docs/api/interfaces/TimeScaleOptions#timevisible) within the time scale options.
chart.timeScale().applyOptions({
timeVisible: true,
});
but the time only expect yyyy-mm-dd,not yyy-mm-dd hh:mm:ss,how to solve
@SlicedSilver here how to set when i need use hh,mm,ss
The time
property can accept a timestamp value (number) instead of a string of the date. You need to use a timestamp when the resolution is intraday (i.e. hours, minutes, ...).
https://tradingview.github.io/lightweight-charts/docs/time-zones https://tradingview.github.io/lightweight-charts/docs/api#time
Is your feature request related to a problem? Please describe. Interpolation of candlestick data
To handle empty data for candlestick data, the graph skips that value if a data point is missing. for example, consider this graph
Here the data for day 23 is missing, And the graph skips that time point. Is there a way I can populate the missing data with the close price of the previous day so that the time range will be consistent without any missing values? Should look something like this.