You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

tc-angular-chartjs

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tc-angular-chartjs - npm Package Compare versions

Comparing version

to
2.1.1

5

dist/tc-angular-chartjs.js

@@ -122,4 +122,4 @@ /**

$scope.$watch('data', function ( value ) {
if (value) {
$scope.$watch('[data, options]', function (value) {
if (value && $scope.data) {
if (chartObj && typeof chartObj.destroy === 'function') {

@@ -143,3 +143,2 @@ chartObj.destroy();

$scope.legend = chartObj.generateLegend();
console.log($scope.legend);
}

@@ -146,0 +145,0 @@

2

dist/tc-angular-chartjs.min.js

@@ -6,2 +6,2 @@ /**

*/
!function(t,e){"function"==typeof define&&define.amd?define(["angular","chart.js"],e):"object"==typeof exports?module.exports=e(require("angular"),require("chart.js")):t.tcAngularChartjs=e(t.angular,t.Chart)}(this,function(t,e){function r(t){return new t}function n(t){return new t("line")}function c(t){return new t("bar")}function a(t){return new t("radar")}function i(t){return new t("polararea")}function o(t){return new t("pie")}function u(t){return new t("doughnut")}function s(t){return new t("bubble")}function h(){return function(r){function n(n,a,i){var o,u=a[0].getContext("2d"),s=!1,h=!1,d=!1,l=null;for(var f in i)"chartLegend"===f?s=!0:"chart"===f?d=!0:"autoLegend"===f&&(h=!0);n.$on("$destroy",function(){o&&"function"==typeof o.destroy&&o.destroy()}),n.click&&(a[0].onclick=function(t){var e={chartEvent:t,element:o.getElementAtEvent(t),elements:o.getElementsAtEvent(t),dataset:o.getDatasetAtEvent(t)};n.click({event:e})}),n.$watch("data",function(i){if(i){o&&"function"==typeof o.destroy&&o.destroy();var f=r||n.type;if(!f)throw"Error creating chart: Chart type required.";f=c(f),o=new e(u,{type:f,data:t.copy(n.data),options:n.options}),s&&(n.legend=o.generateLegend(),console.log(n.legend)),h&&(l&&l.remove(),t.element(a[0]).after(o.generateLegend()),l=t.element(a[0]).next()),d&&(n.chart=o),o.resize()}},!0)}function c(t){var e=t.toLowerCase();switch(e){case"polararea":return"polarArea";default:return t}}return{restrict:"A",scope:{data:"=chartData",options:"=chartOptions",type:"@chartType",legend:"=?chartLegend",chart:"=?chart",click:"&chartClick"},link:n}}}function d(){function t(t,e){t.$watch("legend",function(t){t&&e.html(t)},!0)}return{restrict:"A",scope:{legend:"=?chartLegend"},link:t}}return r.$inject=["TcChartjsFactory"],n.$inject=["TcChartjsFactory"],c.$inject=["TcChartjsFactory"],a.$inject=["TcChartjsFactory"],i.$inject=["TcChartjsFactory"],o.$inject=["TcChartjsFactory"],u.$inject=["TcChartjsFactory"],s.$inject=["TcChartjsFactory"],t.module("tc.chartjs",[]).directive("tcChartjs",r).directive("tcChartjsLine",n).directive("tcChartjsBar",c).directive("tcChartjsRadar",a).directive("tcChartjsPolararea",i).directive("tcChartjsPie",o).directive("tcChartjsDoughnut",u).directive("tcChartjsBubble",s).directive("tcChartjsLegend",d).factory("TcChartjsFactory",h),h});
!function(t,e){"function"==typeof define&&define.amd?define(["angular","chart.js"],e):"object"==typeof exports?module.exports=e(require("angular"),require("chart.js")):t.tcAngularChartjs=e(t.angular,t.Chart)}(this,function(t,e){function r(t){return new t}function n(t){return new t("line")}function c(t){return new t("bar")}function a(t){return new t("radar")}function i(t){return new t("polararea")}function o(t){return new t("pie")}function u(t){return new t("doughnut")}function s(t){return new t("bubble")}function h(){return function(r){function n(n,a,i){var o,u=a[0].getContext("2d"),s=!1,h=!1,d=!1,f=null;for(var l in i)"chartLegend"===l?s=!0:"chart"===l?d=!0:"autoLegend"===l&&(h=!0);n.$on("$destroy",function(){o&&"function"==typeof o.destroy&&o.destroy()}),n.click&&(a[0].onclick=function(t){var e={chartEvent:t,element:o.getElementAtEvent(t),elements:o.getElementsAtEvent(t),dataset:o.getDatasetAtEvent(t)};n.click({event:e})}),n.$watch("[data, options]",function(i){if(i&&n.data){o&&"function"==typeof o.destroy&&o.destroy();var l=r||n.type;if(!l)throw"Error creating chart: Chart type required.";l=c(l),o=new e(u,{type:l,data:t.copy(n.data),options:n.options}),s&&(n.legend=o.generateLegend()),h&&(f&&f.remove(),t.element(a[0]).after(o.generateLegend()),f=t.element(a[0]).next()),d&&(n.chart=o),o.resize()}},!0)}function c(t){var e=t.toLowerCase();switch(e){case"polararea":return"polarArea";default:return t}}return{restrict:"A",scope:{data:"=chartData",options:"=chartOptions",type:"@chartType",legend:"=?chartLegend",chart:"=?chart",click:"&chartClick"},link:n}}}function d(){function t(t,e){t.$watch("legend",function(t){t&&e.html(t)},!0)}return{restrict:"A",scope:{legend:"=?chartLegend"},link:t}}return r.$inject=["TcChartjsFactory"],n.$inject=["TcChartjsFactory"],c.$inject=["TcChartjsFactory"],a.$inject=["TcChartjsFactory"],i.$inject=["TcChartjsFactory"],o.$inject=["TcChartjsFactory"],u.$inject=["TcChartjsFactory"],s.$inject=["TcChartjsFactory"],t.module("tc.chartjs",[]).directive("tcChartjs",r).directive("tcChartjsLine",n).directive("tcChartjsBar",c).directive("tcChartjsRadar",a).directive("tcChartjsPolararea",i).directive("tcChartjsPie",o).directive("tcChartjsDoughnut",u).directive("tcChartjsBubble",s).directive("tcChartjsLegend",d).factory("TcChartjsFactory",h),h});
{
"name": "tc-angular-chartjs",
"version": "2.1.0",
"version": "2.1.1",
"description": "AngularJS directives for Chart.js",

@@ -5,0 +5,0 @@ "homepage": "http://carlcraig.github.io/tc-angular-chartjs/",

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.