add charts.

This commit is contained in:
2023-01-24 20:51:07 +08:00
parent 7def5a4d83
commit f557135075
16 changed files with 381 additions and 24 deletions

View File

@@ -8,7 +8,19 @@ import { routes } from "./routes"
import App from "./App.vue"
import { toggleLogin } from "./shared/composables/modal"
import { init } from "./shared/composables/monaco"
import { init as monacoInit } from "./shared/composables/monaco"
import {
Chart as ChartJS,
Title,
Colors,
Tooltip,
Legend,
BarElement,
ArcElement,
CategoryScale,
LinearScale,
} from "chart.js"
const router = createRouter({
history: createWebHistory(),
@@ -26,7 +38,19 @@ router.beforeEach((to, from, next) => {
next()
}
})
init()
monacoInit()
ChartJS.register(
CategoryScale,
LinearScale,
BarElement,
ArcElement,
Colors,
Title,
Tooltip,
Legend
)
const pinia = createPinia()
const app = createApp(App)
app.use(router)