Sha256: 4671e9f67216e020c8d2bf4236654ba52d817112ef4247a778ec76c45b2f8832

Contents?: true

Size: 941 Bytes

Versions: 39

Compression:

Stored size: 941 Bytes

Contents

(function (angular) {

	'use strict';

	return angular.module('easypiechart', [])

		.directive('easypiechart', [function() {
			return {
				restrict: 'A',
				require: '?ngModel',
				scope: {
					percent: '=',
					options: '='
				},
				link: function (scope, element, attrs) {

					scope.percent = scope.percent || 0;

					/**
					 * default easy pie chart options
					 * @type {Object}
					 */
					var options = {
						barColor: '#ef1e25',
						trackColor: '#f9f9f9',
						scaleColor: '#dfe0e0',
						scaleLength: 5,
						lineCap: 'round',
						lineWidth: 3,
						size: 110,
						rotate: 0,
						animate: {
							duration: 1000,
							enabled: true
						}
					};
					scope.options = angular.extend(options, scope.options);

					var pieChart = new EasyPieChart(element[0], options);

					scope.$watch('percent', function(newVal, oldVal) {
						pieChart.update(newVal);
					});
				}
			};
		}]);

})(angular);

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
wbase-0.3.0 lib/vendor/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.2.9 lib/vendor/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.2.8 lib/vendor/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.2.7 lib/vendor/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.2.6 lib/vendor/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.2.5 lib/vendor/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.2.4 lib/vendor/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.2.3 lib/vendor/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.2.2 lib/vendor/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.2.1 lib/vendor/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.2.0 lib/vendor/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.1.7 app/assets/javascripts/wbase/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.1.6 app/assets/javascripts/wbase/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.1.5 app/assets/javascripts/wbase/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.1.4 app/assets/javascripts/wbase/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.1.3 app/assets/javascripts/wbase/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.1.2 app/assets/javascripts/wbase/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.1.0 app/assets/javascripts/wbase/admin/jquery.easy-pie-chart/src/angular.directive.js
wbase-0.0.15 app/assets/javascripts/wbase/admin/jquery.easy-pie-chart/src/angular.directive.js