mirror of
https://github.com/pockethost/pockethost.git
synced 2025-05-28 09:46:46 +00:00
chore: type fixes on dashboard
This commit is contained in:
parent
3a3b13504d
commit
4d9463194c
@ -1,20 +1,20 @@
|
||||
<script lang="ts">
|
||||
import { format, subMonths } from 'date-fns'
|
||||
import { Line } from 'svelte-chartjs'
|
||||
import { subMonths, format } from 'date-fns'
|
||||
import { instance } from './store'
|
||||
|
||||
import Card from '$components/cards/Card.svelte'
|
||||
import CardHeader from '$components/cards/CardHeader.svelte'
|
||||
import {
|
||||
CategoryScale,
|
||||
Chart as ChartJS,
|
||||
Title,
|
||||
Tooltip,
|
||||
Legend,
|
||||
LineElement,
|
||||
LinearScale,
|
||||
PointElement,
|
||||
CategoryScale,
|
||||
Title,
|
||||
Tooltip,
|
||||
} from 'chart.js'
|
||||
import Card from '$components/cards/Card.svelte'
|
||||
import CardHeader from '$components/cards/CardHeader.svelte'
|
||||
|
||||
ChartJS.register(
|
||||
Title,
|
||||
@ -41,7 +41,7 @@
|
||||
}
|
||||
|
||||
// Set the default data object for the chart
|
||||
let data = {}
|
||||
let data: any = {}
|
||||
|
||||
// This will watch for changes in the `secondsThisMonth` variable and update the chart data
|
||||
$: {
|
||||
@ -73,7 +73,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
let options = {
|
||||
const options: any = {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
|
@ -1,17 +1,17 @@
|
||||
<script lang="ts">
|
||||
import { Line } from 'svelte-chartjs'
|
||||
import { subMonths, format } from 'date-fns'
|
||||
import { globalInstancesStore } from '$util/stores'
|
||||
import { format, subMonths } from 'date-fns'
|
||||
import { Line } from 'svelte-chartjs'
|
||||
|
||||
import {
|
||||
CategoryScale,
|
||||
Chart as ChartJS,
|
||||
Title,
|
||||
Tooltip,
|
||||
Legend,
|
||||
LineElement,
|
||||
LinearScale,
|
||||
PointElement,
|
||||
CategoryScale,
|
||||
Title,
|
||||
Tooltip,
|
||||
} from 'chart.js'
|
||||
|
||||
ChartJS.register(
|
||||
@ -109,7 +109,7 @@
|
||||
)
|
||||
|
||||
// Add up the individual instance usages and the total usage
|
||||
const allChartData = [
|
||||
const allChartData: any = [
|
||||
...individualInstanceUsageData,
|
||||
{
|
||||
label: 'All Instances',
|
||||
@ -142,12 +142,12 @@
|
||||
]
|
||||
|
||||
// Set the default data object for the chart
|
||||
let data = {
|
||||
const data: any = {
|
||||
labels: getLastSixMonths(),
|
||||
datasets: allChartData,
|
||||
}
|
||||
|
||||
let options = {
|
||||
const options: any = {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user