【发布时间】:2021-12-30 09:54:10
【问题描述】:
我正在使用库 highChart https://www.highcharts.com/ 作为统计图表,我想知道是否有可能在不同时期创建不同的数据,例如我有这样的系列:
Categories : [
'2021-01-01',
'2021-01-02',
'2021-01-03',
'2021-01-04',
'2021-01-05',
'2021-01-06',
'2021-01-07',
'2021-01-08',
'2021-01-09',
'2021-01-10',
'2021-01-11',
'2021-01-12',
'2021-01-13',
'2021-01-14',
'2021-01-15',
'2021-01-16',
'2021-01-17',
'2021-01-18',
'2021-01-19',
'2021-01-20',
'2021-01-21',
'2021-01-22',
'2021-01-23',
'2021-01-24',
'2021-01-25',
'2021-01-26',
'2021-01-27',
'2021-01-28',
'2021-01-29',
'2021-01-30',
]
series : [
{
name : 'serie 1',
data : [
{x : '2021-01-05' , s : 5},
{x : '2021-01-10' , s : 20},
{x : '2021-01-11' , s : 40},
{x : '2021-01-15' , s : 80},
{x : '2021-01-30' , s : 20},
]
}
]
i wanna the x values in the graphic get the period in categories and get the x value from series to compare if the x value in series exist then get s value in the series else put 0
How i can do that in highChart
【问题讨论】:
标签: node.js reactjs highcharts