Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

Commit

Permalink
update basic usage
Browse files Browse the repository at this point in the history
  • Loading branch information
carlcraig committed Sep 4, 2016
1 parent 671590c commit f752b58
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Just place one of these directives on a `canvas` element to create a Chart.js ch

You will also want to give the chart some `data` and `options`. These can be provided via the `chart-options` and `chart-data` attributes.

For data structures and options please refer to [Chart.js documentation](http://www.chartjs.org/docs/)

You can also handle chart clicks via the `chart-click` attribute.

Example Pie Chart
Expand All @@ -56,8 +58,6 @@ Example Pie Chart
chart-data="myData"
chart-options="myOptions"
chart-click="onChartClick(event)"
width="350"
height="350"
></canvas>
```
```javascript
Expand All @@ -77,6 +77,8 @@ $scope.onChartClick = function (event) {

```

For more examples please view the `demo` folder.

## Using the `tc-chartjs` directive

When using the `tc-chartjs` directive you will need to add an additional attribute to
Expand All @@ -90,8 +92,6 @@ Just attach a `chart-type=""` attribute to the canvas element.
chart-type="doughnut"
chart-data="myData"
chart-options="myOptions"
width="350"
height="350"
></canvas>
```

Expand Down

0 comments on commit f752b58

Please sign in to comment.