当我使用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],
},
],
};
对于标题,类别,坐标和数据,我得到错误类型'{}'不能分配给类型''。在高图中
尝试创建Chart
类的实例。
const sampleData = Highcharts.Chart(options = {...})