projectweekend / angular-peity Goto Github PK
View Code? Open in Web Editor NEWAn AngularJS directive for using Peity charts
License: MIT License
An AngularJS directive for using Peity charts
License: MIT License
Hi. Thanks for the project.
I am trying to make a pie-chart but the data does not get updated when it changes. See plunkr for demo
https://plnkr.co/edit/7rtX5mfDQYw8B2UFxbE2
Hello,
I'm trying to use the line-chart to make a monitor for cpu usage but the data didn't get updated when it changed.
I found that the watcher works when I update some elements of an array, but doesn't work when push or shift to the array.
I checked the source code and found that at line 39-41
var watcher = scope.$watch('data', function(){
span.textContent = scope.data.join();
jQuery( span ).change();
});
The watcher doesn't have params objectEquality
. So I changed it to
var watcher = scope.$watch('data', function(){
span.textContent = scope.data.join();
jQuery( span ).change();
}, true);
And it works, maybe the objectEquality
params should be added to the watcher?
In the bower.json peity is written piety.
e.g. in order for bower to be able to automatically include this script
"main": "angular-piety.js",
should be
"main": "angular-peity.js",
Please upload the package on npm
please, thanks!
Please add this to your directive:
var OptsWatcher = scope.$watch('options', function () {
jQuery(span).peity(chartType, options);
}, true);
scope.$on('$destroy', function () {
watcher();
OptsWatcher();
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.