I'm trying to implement this histogram using highcharts and highcharts-angular. I implemented both libraries and got the "Hello World" chart working.
But as soon as I try to change its chart type to 'histogram'
, I get the following error pointing to the series
object:
Type '{series...}' is not assignable to 'SeriesOptionsType'.
Type '{series...}' is not assignable to 'SeriesParetoOptions'.
Hello World:
export class AppComponent {
Highcharts: typeof Highcharts = Highcharts;
chartOptions: Highcharts.Options = {
series: [{
data: [1, 2, 3],
type: 'line'
}]
};
...
}
Changing chart type, where the error is occuring:
export class ChartComponent implements OnInit {
Highcharts: typeof Highcharts = Highcharts;
chartOptions: Highcharts.Options = {
series: [{
data: [3.5, 3, 3.2, 3.1, 3.6, 3.9, 3.4]
type: 'histogram',
xAxis: 1,
yAxis: 1,
baseSeries: 1
}]
};
constructor() {
}
ngOnInit() {
}
}