Can't bind to 'chart' since it isn't a known property of 'div'
See original GitHub issueI just installed angular-highcharts and highcharts, did everything that was documented to start basic chart. But I ma getting this error:
Uncaught Error: Template parse errors:
Can't bind to 'chart' since it isn't a known property of 'div'. ("
<button (click)="add()">Add Point!</button>
<div [ERROR ->][chart]="chart"></div>
"): ng:///EDLModule/EDLComponent.html@2:7
at syntaxError (compiler.es5.js:1694)
at TemplateParser.webpackJsonp.../../../compiler/@angular/compiler.es5.js.TemplateParser.parse (compiler.es5.js:12937)
at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileTemplate (compiler.es5.js:27133)
at compiler.es5.js:27052
at Set.forEach (<anonymous>)
at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileComponents (compiler.es5.js:27052)
at compiler.es5.js:26939
at Object.then (compiler.es5.js:1683)
at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileModuleAndComponents (compiler.es5.js:26938)
at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler.compileModuleAsync (compiler.es5.js:26867)
below is my component:
import { Chart } from 'angular-highcharts';
@Component({
selector: 'app-edl',
template: `
<button (click)="add()">Add Point!</button>
<div [chart]="chart"></div>
`
})
export class EDLComponent extends BaseWidget {
/**
* testing highcharts here
*/
chart = new Chart({
chart: {
type: 'line'
},
title: {
text: 'Linechart'
},
credits: {
enabled: false
},
series: [{
name: 'Line 1',
data: [1, 2, 3]
}]
});
// add point to chart serie
add() {
this.chart.addPoint(Math.floor(Math.random() * 10));
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Can't bind to 'options' since it isn't a known property of 'chart'
You can set import the HighChartsModule in the IonicPageModule in which it is used instead of the app.module.ts
Read more >Common errors in Angular: Can't bind to since it isn't a known ...
Ever made an Angular application , opened your console and saw an error message similar to: “Can't bind to ngclass since it isn't...
Read more >Can't bind to 'chartType' since it isn't a known property of
I'm trying to put a pie chart in my page using the mdb, but i receive: Can't bind to 'chartType' since it isn't...
Read more >can't bind to 'options' since it isn't a known property of 'canvas'.
Normally, this error occurs when you missed some imports. Please add these line if missing: import { FormsModule, ReactiveFormsModule } ...
Read more >can't bind 'canvasjs-chart' in Angular
html:2:19 – error NG8002: Can't bind to 'options' since it isn't a known property of 'canvasjs-chart'. 1. If 'canvasjs-chart' is an Angular ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
import ChartModule in your Module
Resolution is
as described in https://www.npmjs.com/package/angular-highcharts#usage-example