carlcraig / tc-angular-chartjs

AngularJS directives for Chart.js
http://carlcraig.github.io/tc-angular-chartjs/
Other
233 stars 83 forks source link

CanvasGradient not working as background color. #84

Closed adiq closed 4 years ago

adiq commented 7 years ago

Chart.js supports gradient as background color. Unfortunately it's not working while using tc-angular-chartjs.

The problem here is angular.copy which does not maintain [object CanvasGradient] and put [object Object] instead.

https://github.com/carlcraig/tc-angular-chartjs/blob/master/src/tc-angular-chartjs.js#L119 https://github.com/chartjs/Chart.js/blob/b92b256872e9d01ef56c9b8d4440cda784662fe0/src/core/core.helpers.js#L922

It would be mistake to relay on angular to fix this issue, so it would be good idea to replace this helper.

adiq commented 4 years ago

Closing due to lack of activity.