angular-highcharts
angular-highcharts copied to clipboard
Sample in Readme doesnt work as a basecase.
I installed highcharts and angular-highcharts with versions 8.0.0 and 8.0.3 respectively.
When i created a sample component as described:
@Component(
selector: "app-chart",
template: "<div [chart]="chart"></div>"
)
class ChartComponent implements OnInit {
chart: Chart;
constructor(){
this.chart = new Chart({
chart: {
type: 'line'
},
title: {
text: 'Linechart'
},
credits: {
enabled: false
},
series: [
{
name: 'Line 1',
data: [1, 2, 3]
}
]
});
}
}
but the app will fail saying:
Type '{ name: string; data: number[]; }' is not assignable to type 'SeriesOptionsType'. Property 'type' is missing in type '{ name: string; data: number[]; }' but required in type 'SeriesXrangeOptions'
I think that this needs an updated to add the type, but when looking at types, attempting to assign one, it was failing. Im not quite sure how this is an issue, as this should work out of the box, given it is the sample on your Readme.