在示例中,轻量级图表 TradingView显示了每日时间范围内的绘图,但我无法弄清楚如何正确地将数据传递给 setData 以便使用每小时和分钟时间范围。
请告诉我。
import { createChart } from 'lightweight-charts';
const chart = createChart(container);
const areaSeries = chart.addAreaSeries();
areaSeries.setData([
{ time: '2018-12-22', value: 32.51 },
{ time: '2018-12-23', value: 31.11 },
{ time: '2018-12-24', value: 27.02 },
{ time: '2018-12-25', value: 27.32 },
{ time: '2018-12-26', value: 25.17 },
{ time: '2018-12-27', value: 28.89 },
{ time: '2018-12-28', value: 25.46 },
{ time: '2018-12-29', value: 23.92 },
{ time: '2018-12-30', value: 22.68 },
{ time: '2018-12-31', value: …Run Code Online (Sandbox Code Playgroud)