Angular Echarts lite
AngularJS 1.2+ directive for baidu echarts v3
Demo (updated with every release)
Quick start
Install the library
npm install --save angular-echarts-lite
Then simply include the correct file in a closing <script>
tag after angularJS and echarts
Add dependency and declare a demo controller
angular
Add this markup into page
That's all! Now you can get up and running the demo.
Use angular echarts lite with webpack
You can obtain angular echarts lite directly in project via webpack
//To add dependency into your moduleangular
Usage
You can find all possible attributes for the directive in the table below:
Attribute | Usage |
---|---|
config | Object , set the configuration of chart by using echarts optionsHere is some additional configuration: forceClear boolean , whether to remove chart before updatenotMerge boolean , whether not to merge with previouserrorMsg Object , configuration item while error, more detail |
theme | Object or string , set the theme of chart |
instance | Bind a function to get chart instance |
unwatch | Cancel scope watch for config and theme , just takes effort during directive init |
Running the demo
Setup the repo:
git clone https://github.com/LeungZ9/angular-echarts-lite.git && cd angular-echarts-lite
npm i
Run the development server:
cd /path/to/angular-echarts-lite
npm run dev