mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-12 21:07:27 +08:00
[+] Helper to register chartjs
This commit is contained in:
27
AquaNet/src/libs/ui.ts
Normal file
27
AquaNet/src/libs/ui.ts
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import {
|
||||||
|
Chart as ChartJS,
|
||||||
|
Title,
|
||||||
|
Tooltip,
|
||||||
|
Legend,
|
||||||
|
LineElement,
|
||||||
|
LinearScale,
|
||||||
|
PointElement,
|
||||||
|
CategoryScale, TimeScale,
|
||||||
|
} from 'chart.js';
|
||||||
|
|
||||||
|
export function title(t: string) {
|
||||||
|
document.title = `AquaNet - ${t}`
|
||||||
|
}
|
||||||
|
|
||||||
|
export function registerChart() {
|
||||||
|
ChartJS.register(
|
||||||
|
Title,
|
||||||
|
Tooltip,
|
||||||
|
Legend,
|
||||||
|
LineElement,
|
||||||
|
LinearScale,
|
||||||
|
PointElement,
|
||||||
|
CategoryScale,
|
||||||
|
TimeScale
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user