How to display bar and line chart in a single chart in angularjs
Bar chart has one set of data and line chart has another set of data. x-axis is same for both the charts. y-axis is not same for both the charts.
I have done bar chart, but I wanted to add the line chart in the bar chart itself in angularjs.
<canvas id="bar" class="chart chart-bar" chart-data="driveDataJson.data" chart-labels="driveDataJson.labels" width="281%" chart-colours="driveDataJson.colours" chart-options="driveDataJson.options"></canvas>
$scope.months = null;
$http.get(apiUrl + "/api/Warehouse/GetMonthDetails")
.then(function (response) {
$scope.months = JSON.parse(response.data);
$scope.driveDataJson = {
"data": [$scope.months[0].Qty, $scope.months[1].Qty, $scope.months[2].Qty, $scope.months[3].Qty, $scope.months[4].Qty, $scope.months[5].Qty, $scope.months[6].Qty],
"labels": [$scope.months[0].MonthName, $scope.months[1].MonthName, $scope.months[2].MonthName, $scope.months[3].MonthName, $scope.months[4].MonthName, $scope.months[5].MonthName, $scope.months[6].MonthName],
"options": {
title: {
display: true,
text: 'Based on Quantity(Nos.)',
fontSize: 18,
position: 'bottom'
}
}
};
})