
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
tc-angular-chartjs
Advanced tools
tc-angular-chartjs provides you with directives for all chartjs chart types.
You can see all the Chart.js Documentation on their website.
Grab the latest version of Chart.js
and tc-angular-chartjs
.
Load Chart.js
and tc-angular-chartjs
as you would with normal scripts.
<script type="text/javascript" src="js/Chart.js"></script>
<script type="text/javascript" src="js/angular.js"></script>
<script type="text/javascript" src="js/tc-angular-chartjs.js"></script>
Make sure you use dist/tc-angular-chartjs.js
or dist/tc-angular-chartjs.min.js
Require tc.chartjs
in your application modules where you require Chart.js
.
angular.module( 'app', ['tc.chartjs']);
There are 6 different directives.
Just place one of these directives on a canvas
element to create a Chart.js chart.
<canvas tc-chartjs-doughnut width="350" height="350"></canvas>
You will also want to give the chart some data
and options
. These can be provided
by assigning $scope variables to chart-options
and chart-data
attributes on the same canvas element.
<canvas tc-chartjs-doughnut chart-data="myData" chart-options="myOptions" chart-click="onChartClick(data, event)" width="350" height="350"></canvas>
$scope.myData = [
{ value : 50, color : "#F7464A" },
{ value : 90, color : "#E2EAE9" },
{ value : 75, color : "#D4CCC5" },
{ value : 30, color : "#949FB1"}
];
$scope.myOptions = {
// Chart.js options can go here.
};
$scope.onChartClick = function (data, event) {
console.log(data, event);
};
tc-chartjs
directiveWhen using the tc-chartjs
directive you will need to add an additional attribute to
say which type of chart should be created.
Just attach a chart-type=""
attribute to the canvas element.
<canvas tc-chartjs chart-type="doughnut" chart-data="data" chart-options="options" width="350" height="350"></canvas>
Available Types:
Passing another value to chart-type than the above will try to create a chart of that type, which is useful if you have extended Chart.js with custom chart types, e.g. through plugins.
tc-angular-chartjs is dual licensed with the Apache-2.0 or MIT license.
See LICENSE-APACHE-2.0 and LICENSE-MIT for more details.
FAQs
AngularJS directives for Chart.js
The npm package tc-angular-chartjs receives a total of 1,091 weekly downloads. As such, tc-angular-chartjs popularity was classified as popular.
We found that tc-angular-chartjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.