Skip to content

Commit

Permalink
[5.x] Add secs to y-axis ticks' for clarity (#903)
Browse files Browse the repository at this point in the history
Since the line chart's y-axis shows ticks without units, this could help clarify that it's in seconds.
  • Loading branch information
mazedlx authored Oct 1, 2020
1 parent ed1e571 commit 89afd51
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion resources/js/components/LineChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
yAxes: [
{
ticks: {
beginAtZero: true
beginAtZero: true,
callback: (value, index, values) => {
return this.data.datasets[0].label === "Seconds"
? `${value} secs`
: value;
},
},
gridLines: {
display: true
Expand Down

0 comments on commit 89afd51

Please sign in to comment.