#1. How to integrate Echarts with Angular 10
Read time : 8-10 minutes
Step-1 : Create a Angular 10 project .
Note : If you are not aware how to create Angular 10 then please visit the following link.Step-2 : Installation of Echarts with Angular 10 project.
Run the following command if you are using npm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install echarts -S | |
npm install ngx-echarts -S | |
npm install @types/echarts -D |
OR
Run the following command if you are using yarn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn add echarts | |
yarn add ngx-echarts | |
yarn add @types/echarts -D |
NOTE : Plugin version may differ with the time , Above npm or yarn command will always install the latest version of plugin.
See my package.json
Step-3 : Add ngx-echart entry into app.module.ts .
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgxEchartsModule } from 'ngx-echarts'; | |
// import your component | |
@NgModule({ | |
declarations: [ | |
AppComponent | |
], | |
imports: [ | |
NgxEchartsModule | |
] | |
}) |
Conclusion :
Echart has been successfully integrated with Angular 10 . Now we can use any charts provided by Echarts .
In out next post we will see how to use different Echarts with Angular 10.
See how to integrate Basic line Echarts with Angular 10.
See Project Demo :
Find Source Code :
For more updates please follow us on :
Facebook : https://www.facebook.com/dorado2041
Instagram : https://www.instagram.com/dorado2041
Blogger : https://doradosolutions.blogspot.com
No comments: