Skip to content

Commit

Permalink
ui: status: Label patch processing graph axes
Browse files Browse the repository at this point in the history
This commit labels the axes with units, so it's more obvious what the
graph is trying to depict.

Also move the legend inside the graph to conserve valuable vertical
screen space.
  • Loading branch information
danobi authored and kuba-moo committed May 6, 2024
1 parent b45cb28 commit 432d3bc
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions status.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,46 @@ function load_times(data, canva_id)
datasets: [{
backgroundColor: "rgba(0, 0, 0, 0)",
pointBorderColor: "rgba(0, 64, 255, 0.7)",
label: 'Processing time by patch post time',
label: 'By patch post time',
data: e1.map(function(e){return e.v;})
}, {
backgroundColor: "rgba(0, 0, 0, 0)",
pointBorderColor: "rgba(255, 64, 0, 0.7)",
label: 'Processing time by check delivery time',
label: 'By check delivery time',
data: e2.map(function(e){return e.v;})
}]
},
options: {
plugins: {
title: {
display: true,
text: 'Patch processing times over last 7 days',
padding: 0
},
legend: {
position: 'chartArea',
},
},
scales: {
y: {
type: 'linear',
title: {
display: true,
text: 'Hours',
padding: 0
},
ticks: {
stepSize: 3
},
beginAtZero: true
},
x: {
type: 'linear',
title: {
display: true,
text: 'Hours ago',
padding: 0
},
ticks: {
stepSize: 24
},
Expand Down

0 comments on commit 432d3bc

Please sign in to comment.