Html 角度海图:错误:海图错误#13
我在尝试角度的海图,我得到了一个基本的错误,但我仍然不知道为什么。我有一个组件:Html 角度海图:错误:海图错误#13,html,angular,typescript,charts,highcharts,Html,Angular,Typescript,Charts,Highcharts,我在尝试角度的海图,我得到了一个基本的错误,但我仍然不知道为什么。我有一个组件: import { Chart } from 'highcharts'; import { donutChartOptions } from 'src/assets/donutChartOptions'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component
import { Chart } from 'highcharts';
import { donutChartOptions } from 'src/assets/donutChartOptions';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'prova6';
chart = new Chart(donutChartOptions);
以下是选项:
import { Options } from 'highcharts';
export const donutChartOptions: Options = {
chart: {
type: 'pie',
plotShadow: false,
},
credits: {
enabled: false
},
plotOptions: {
pie: {
innerSize: '99%',
borderWidth: 40,
borderColor: null,
slicedOffset: 20,
dataLabels: {
connectorWidth: 0
}
}
},
title: {
verticalAlign: 'middle',
floating: true,
text: '$ 500.000.00'
},
series: [
{
type: 'pie',
data: [
{name: 'a', y: 1, color: 'blue'},
{name: 'b', y: 2, color: 'red'},
{name: 'c', y: 3, color: 'green'},
{name: 'd', y: 4, color: 'yellow'},
{name: 'e', y: 5, color: 'purple'},
]
}
]
};
我在package.json中安装了这些依赖项
"angular-highcharts": "^11.3.1",
"highcharts": "^9.0.1",
这是html文件
<div class = "container">
<div class = "pie" [chart]="chart"></div>
</div>
我是新手,我知道错误13是什么(重定向到配置错误),但当我尝试将其添加到选项中时,会出现更多错误