当我使用 HighCharts angular 时出现此错误,请键入 '{ text: string; }' 不可分配给类型“TitleObject”。
const sampleData: Highcharts.Chart = {
chart: {
type: 'column',
},
title: { text: 'Total Predected Revenue Vs Actual Revenue' },
xAxis: {
categories: [
'2010',
'2011',
'2012',
'2013',
'2014',
'2015',
'2016',
'2017',
],
crosshair: true,
},
yAxis: {
min: 0,
},
series: [
{
name: 'Predected',
data: [14, 17, 9, 10, 6, 19, 6, 8] ,
} ,
{
name: 'Actual',
data: [65, 74, 44, 66, 9, 23, 36, 51],
},
],
};
对于标题、类别、yaxis 和数据,我得到错误类型“{}”不可分配给类型“”。在高图表中