summaryrefslogtreecommitdiff
path: root/src/misc/chart.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc/chart.ts')
-rw-r--r--src/misc/chart.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/misc/chart.ts b/src/misc/chart.ts
index 167caa7..234cabb 100644
--- a/src/misc/chart.ts
+++ b/src/misc/chart.ts
@@ -1,6 +1,8 @@
+import type { TooltipItem } from 'chart.js';
import { createAsset } from 'use-asset';
import prettyBytes from './pretty-bytes';
+
export const chartJSResource = createAsset(() => {
return import('~/misc/chart-lib');
});
@@ -69,7 +71,7 @@ export const commonChartOptions: any = {
borderColor: 'rgba(255, 255, 255, 0.1)',
borderWidth: 1,
callbacks: {
- label(context) {
+ label(context: TooltipItem<'line'>) {
let label = context.dataset.label || '';
if (label) {
label += ': ';