mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-01 10:01:12 +01:00
acp chart fix for mobile
This commit is contained in:
@@ -266,32 +266,25 @@ function setupGraphs(callback) {
|
||||
data.datasets[2].yAxisID = 'left-y-axis';
|
||||
data.datasets[3].yAxisID = 'left-y-axis';
|
||||
data.datasets[4].yAxisID = 'left-y-axis';
|
||||
data.datasets[5].yAxisID = 'right-y-axis';
|
||||
data.datasets[5].yAxisID = 'left-y-axis';
|
||||
|
||||
graphs.traffic = new Chart(trafficCtx, {
|
||||
type: 'line',
|
||||
data: data,
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
'left-y-axis': {
|
||||
position: 'left',
|
||||
type: 'linear',
|
||||
title: {
|
||||
display: true,
|
||||
display: false,
|
||||
text: graphLabels['graphs.page-views'],
|
||||
},
|
||||
beginAtZero: true,
|
||||
},
|
||||
'right-y-axis': {
|
||||
position: 'right',
|
||||
type: 'linear',
|
||||
title: {
|
||||
display: true,
|
||||
text: graphLabels['graphs.unique-visitors'],
|
||||
},
|
||||
beginAtZero: true,
|
||||
},
|
||||
|
||||
},
|
||||
plugins: {
|
||||
legend: {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="graph-container position-relative" id="analytics-traffic-container" style="aspect-ratio: 2;">
|
||||
<div class="graph-container position-relative" id="analytics-traffic-container" style="height: 40vh; min-height: 300px; ">
|
||||
<canvas id="analytics-traffic" ></canvas>
|
||||
</div>
|
||||
<hr/>
|
||||
|
||||
Reference in New Issue
Block a user