mirror of
https://github.com/StefBuwalda/dashboard_test.git
synced 2025-10-30 11:19:58 +00:00
Did some chart stuff (ugly)
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="en" data-bs-theme="dark">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" charset=" UTF-8">
|
||||
<title>Simple Line Chart</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
|
||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns"></script>
|
||||
<script src="https://www.chartjs.org/docs/latest/samples/utils.js"></script>
|
||||
@@ -43,14 +45,18 @@
|
||||
x: {
|
||||
type: 'time', // Important for datetime axis
|
||||
time: {
|
||||
unit: 'hour',
|
||||
unit: 'minute',
|
||||
tooltipFormat: 'HH:mm:ss',
|
||||
displayFormats: {
|
||||
hour: 'HH:mm'
|
||||
}
|
||||
displayFormats: { hour: 'HH:mm' }
|
||||
},
|
||||
min: min,
|
||||
max: max
|
||||
max: max,
|
||||
ticks: { color: '#ffffff' }, // X-axis labels
|
||||
grid: { color: 'rgba(255, 255, 255, 0.1)' } // X-axis grid lines
|
||||
},
|
||||
y: {
|
||||
ticks: { color: '#ffffff' }, // Y-axis labels
|
||||
grid: { color: 'rgba(255, 255, 255, 0.1)' } // Y-axis grid lines
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user