<!DOCTYPE html>
<html ng-app="chartApp">
<head>
<meta charset="utf-8" />
<title>angularjs charts</title>
<style>
.chartCSS {
width: 500px;
height: 300px;
}
</style>
<script data-require="angular.js@1.2.2" src="http://code.angularjs.org/1.2.2/angular.js" data-semver="1.2.2"></script>
<script data-require="d3@*" data-semver="3.3.11" src="//cdnjs.cloudflare.com/ajax/libs/d3/3.3.11/d3.js"></script>
<script type="text/javascript" src="https://rawgit.com/chinmaymk/angular-charts/bower/dist/angular-charts.min.js"></script>
<script>
angular.module('chartApp', ['angularCharts']);
function mainController($scope) {
$scope.config = {
title: 'Total cast of www.code-sample.com',
tooltips: true,
labels: false,
mouseover: function () { },
mouseout: function () { },
click: function () { },
legend: {
display: true,
position: 'left'
}
};
$scope.dataSorce = {
series: ['MyIncome', 'MyExpense'],
data: [{
x: "2014",
y: [1000, 500, 90],
tooltip: "Years : 2014"
}, {
x: "2015",
y: [300, 100, 100],
tooltip: "Years : 2015"
}, {
x: "2016",
y: [351],
tooltip: "Years : 2016"
}, {
x: "2017",
y: [54, 70, 879],
tooltip: "Years : 2017"
}]
};
}
</script>
</head>
<body ng-controller="mainController">
<div data-ac-chart="'bar'" data-ac-data="dataSorce" data-ac-config="config" class="chartCSS">
</div>
</body>
For more detail, below link might help you