[Chartjs]-Angular-chartjs expression/value inside canvas class

0๐Ÿ‘

โœ…

I am thinking you want to change the type of the chart using angular-chart from line to pie etc. The angular-chart provides dynamically changing chart not based on class but on another attribute chart-type.

Here is a JsFiddle where I am changing the graphtype dynamically using a timeout. Hope it might help

0๐Ÿ‘

Your js fiddle says:

var vm = this;

but it should be:

var vm = $scope;

Your jsfiddle works if you change this because putting the below styles in the css shows that the class name has been applied

.chart{
  border: 3px solid red;
}

.chart-line{
  background-color: purple;
}

Leave a comment