Reputation: 21
I am fairly new to angular. Trying to use angular-charts for some data visualization. Charts.js lists an attribute "fill" for coloring below a line but I am not sure how to reference this in angular. Any suggestions?
Upvotes: 2
Views: 2200
Reputation: 714
In the latest version of angular-chart (1.X), chartjs 2.x is used. In this version, you need to use
$scope.options = {
elements: {
line: {
fill: false
}
}
}
Upvotes: 4
Reputation: 71
Ok I found that I've made a huge mistake. The master branch of angular-chart is based on version 1.x of chart.js, but document on chartjs.org is for verion 2.x.
https://github.com/chartjs/Chart.js/blob/v1.1.1/docs/01-Line-Chart.md
This is the correct line-chart option for angular-chart. So simply using
$scope.options = {
datasetFill : false
}
is Ok.
Upvotes: 1