-
-
{!! trans('general.checkouts_checkins') !!}
-
-
-
+
{!! trans('general.checkouts_checkins') !!}
+
+
-
-
{!! trans('general.new_accessories_created') !!}
-
-
-
+
{!! trans('general.new_accessories_created') !!}
+
+
@@ -341,16 +313,26 @@
// Chart instances keyed by canvas ID for clean destroy/recreate
var charts = {};
+var lastParams = { days: 30 };
-var lineOptions = {
- responsive: true,
- maintainAspectRatio: false,
- legend: { position: 'bottom', labels: { boxWidth: 12 } },
- scales: {
- xAxes: [{ gridLines: { display: false }, ticks: { maxTicksLimit: 10 } }],
- yAxes: [{ ticks: { beginAtZero: true, precision: 0 } }]
- }
-};
+function isDark() {
+ return window.matchMedia('(prefers-color-scheme: dark)').matches;
+}
+
+function getLineOptions() {
+ var dark = isDark();
+ var fontColor = dark ? '#bbb' : '#666';
+ var gridColor = dark ? 'rgba(255,255,255,0.08)' : 'rgba(0,0,0,0.1)';
+ return {
+ responsive: true,
+ maintainAspectRatio: false,
+ legend: { position: 'bottom', labels: { boxWidth: 12, fontColor: fontColor } },
+ scales: {
+ xAxes: [{ gridLines: { display: false }, ticks: { maxTicksLimit: 10, fontColor: fontColor } }],
+ yAxes: [{ gridLines: { color: gridColor }, ticks: { beginAtZero: true, precision: 0, fontColor: fontColor } }]
+ }
+ };
+}
function ds(label, data, color, isPrev) {
return {