Fixed: #6395 - Adjusted graph size (#6518)

* Fixed missing oauth tables during setup.

* Merge remote-tracking branch 'snipe-it-upstream/develop' into develop

* Merge remote-tracking branch 'snipe-it-upstream/develop' into develop



Merge remote-tracking branch 'origin/develop' into develop

* Fixed Pie Graph sizing on dashboard

Updated chart.js to 2.7.3
Added height to canvas
This commit is contained in:
Wes Hulette 2019-01-15 17:02:49 -05:00 committed by snipe
parent 125938762b
commit 3e19509a49
7 changed files with 348 additions and 304 deletions

591
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load diff

View file

@ -30,7 +30,7 @@
"bootstrap-datepicker": "^1.6.4", "bootstrap-datepicker": "^1.6.4",
"bootstrap-less": "^3.3.8", "bootstrap-less": "^3.3.8",
"bootstrap-table": "^1.12.1", "bootstrap-table": "^1.12.1",
"chart.js": "^2.7.2", "chart.js": "^2.7.3",
"ekko-lightbox": "^5.1.1", "ekko-lightbox": "^5.1.1",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"icheck": "^1.0.2", "icheck": "^1.0.2",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,5 +1,5 @@
{ {
"/js/app.js": "/js/app.js?id=d7280b4d128284323dea", "/js/app.js": "/js/app.js?id=501713412e127c954d13",
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=f7a5d783fef321018f4c", "/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=f7a5d783fef321018f4c",
"/css/build/app.css": "/css/build/app.css?id=0dfc05b0fe1dcc9b6e3d", "/css/build/app.css": "/css/build/app.css?id=0dfc05b0fe1dcc9b6e3d",
"/css/all.css": "/css/all.css?id=9399418f7ce5805e3571", "/css/all.css": "/css/all.css?id=9399418f7ce5805e3571",
@ -8,8 +8,8 @@
"/css/skins/skin-red-dark.min.css": "/css/skins/skin-red-dark.min.css?id=99f90bbd653d7db10795", "/css/skins/skin-red-dark.min.css": "/css/skins/skin-red-dark.min.css?id=99f90bbd653d7db10795",
"/css/signature-pad.css": "/css/signature-pad.css?id=6a89d3cd901305e66ced", "/css/signature-pad.css": "/css/signature-pad.css?id=6a89d3cd901305e66ced",
"/css/signature-pad.min.css": "/css/signature-pad.min.css?id=6a89d3cd901305e66ced", "/css/signature-pad.min.css": "/css/signature-pad.min.css?id=6a89d3cd901305e66ced",
"/js/vendor.js": "/js/vendor.js?id=c856c3b90be192ac37c4", "/js/vendor.js": "/js/vendor.js?id=563f1d35e136d5ebd849",
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=6804bda467f56a251e32", "/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=7223478ba9bf2c6dfb4f",
"/js/dist/bootstrap-table-simple-view.js": "/js/dist/bootstrap-table-simple-view.js?id=3926b8f4aaad6ca20d31", "/js/dist/bootstrap-table-simple-view.js": "/js/dist/bootstrap-table-simple-view.js?id=3926b8f4aaad6ca20d31",
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=8340c60bfbc12c34d2e6" "/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=8340c60bfbc12c34d2e6"
} }

View file

@ -219,11 +219,11 @@
</div> </div>
</div> </div>
<!-- /.box-header --> <!-- /.box-header -->
<div class="box-body" style="min-height: 400px;"> <div class="box-body">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="chart-responsive"> <div class="chart-responsive">
<canvas id="statusPieChart" height="120"></canvas> <canvas id="statusPieChart" width="400" height="300"></canvas>
</div> <!-- ./chart-responsive --> </div> <!-- ./chart-responsive -->
</div> <!-- /.col --> </div> <!-- /.col -->
</div> <!-- /.row --> </div> <!-- /.row -->
@ -298,6 +298,13 @@
var pieChartCanvas = $("#statusPieChart").get(0).getContext("2d"); var pieChartCanvas = $("#statusPieChart").get(0).getContext("2d");
var pieChart = new Chart(pieChartCanvas); var pieChart = new Chart(pieChartCanvas);
var ctx = document.getElementById("statusPieChart"); var ctx = document.getElementById("statusPieChart");
var pieOptions = {
legend: {
position: 'top',
responsive: true,
maintainAspectRatio: true,
}
};
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
@ -306,12 +313,48 @@
"X-Requested-With": 'XMLHttpRequest', "X-Requested-With": 'XMLHttpRequest',
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content') "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
}, },
dataType: 'json', dataType: 'json',
success: function (data) { success: function (data) {
var myPieChart = new Chart(ctx,{ var myPieChart = new Chart(ctx,{
type : 'doughnut', type : 'doughnut',
data : data, data : {
"labels": [
"Ready to Deploy (1,273)",
"Pending (50)",
"Archived (50)"
],
"datasets": [
{
"data": [
1273,
50,
50,
],
"backgroundColor": [
"#f56954",
"#00a65a",
"#f39c12",
"#00c0ef",
"#3c8dbc",
"#d2d6de",
"#3c8dbc",
"#3c8dbc",
"#3c8dbc"
],
"hoverBackgroundColor": [
"#f56954",
"#00a65a",
"#f39c12",
"#00c0ef",
"#3c8dbc",
"#d2d6de",
"#3c8dbc",
"#3c8dbc",
"#3c8dbc"
]
}
]
},
options: pieOptions options: pieOptions
}); });
}, },