|
|
@@ -91,29 +91,16 @@
|
|
|
const idx = context[0].dataIndex;
|
|
|
const raw = data[idx];
|
|
|
const dt = new Date(raw.createdAt);
|
|
|
- return dt.toLocaleString('en-GB', {
|
|
|
- day: '2-digit',
|
|
|
- month: '2-digit',
|
|
|
- year: 'numeric',
|
|
|
- hour: '2-digit',
|
|
|
- minute: '2-digit',
|
|
|
- second: '2-digit',
|
|
|
- hour12: false
|
|
|
- });
|
|
|
+ const dd = String(dt.getDate()).padStart(2, '0');
|
|
|
+ const mm = String(dt.getMonth() + 1).padStart(2, '0');
|
|
|
+ const yyyy = dt.getFullYear();
|
|
|
+ return `${dd}/${mm}/${yyyy}`;
|
|
|
},
|
|
|
- label: (context) => {
|
|
|
- return `Price: ${context.parsed.y.toFixed(2)}`;
|
|
|
- }
|
|
|
+ label: (context) => context.parsed.y.toFixed(2)
|
|
|
}
|
|
|
},
|
|
|
datalabels: {
|
|
|
- color: '#fff',
|
|
|
- anchor: 'end',
|
|
|
- align: 'top',
|
|
|
- font: {
|
|
|
- weight: 'bold'
|
|
|
- },
|
|
|
- formatter: (value) => value.toFixed(2)
|
|
|
+ display: false
|
|
|
}
|
|
|
}
|
|
|
}
|