markdown Chart.js的Angular2指令

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown Chart.js的Angular2指令相关的知识,希望对你有一定的参考价值。

[Official Guida and Examples](https://valor-software.com/ng2-charts/)

1. You can install ng2-charts using npm
```shell
npm install ng2-charts --save
```
2. You need to install and include `Chart.js` library in application via `html`
```
npm install chart.js --save
```
3. Embedding `Chart.js` in application `index.html` or in `.angular-cli.json`
**index.html**
```
<script src="node_modules/chart.js/src/chart.js"></script>
```
**angular-cli.json**
``` json
{
  //...
  "apps": [{
    //...
    "scripts": [
            "./node_modules/chart.js/src/chart.js"
        ]
  }
```
  
}

以上是关于markdown Chart.js的Angular2指令的主要内容,如果未能解决你的问题,请参考以下文章