parent
4521e61ae2
commit
e7a15b5604
@ -15,7 +15,7 @@
|
||||
As this is part of Chart.js's API it makes sense to disable the check here.
|
||||
*/
|
||||
import { onMounted, ref, shallowRef, watch, PropType } from 'vue';
|
||||
import { Chart, type ChartDataset } from 'chart.js';
|
||||
import { Chart } from 'chart.js';
|
||||
import gradient from 'chartjs-plugin-gradient';
|
||||
import * as os from '@/os';
|
||||
import { defaultStore } from '@/store';
|
||||
@ -165,7 +165,7 @@ const render = () => {
|
||||
fill: x.type === 'area',
|
||||
clip: 8,
|
||||
hidden: !!x.hidden,
|
||||
} satisfies ChartDataset)),
|
||||
})),
|
||||
},
|
||||
options: {
|
||||
aspectRatio: props.aspectRatio || 2.5,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { Chart, type ChartDataset } from 'chart.js';
|
||||
import { Chart } from 'chart.js';
|
||||
import gradient from 'chartjs-plugin-gradient';
|
||||
import * as os from '@/os';
|
||||
import { defaultStore } from '@/store';
|
||||
@ -83,7 +83,7 @@ async function renderChart() {
|
||||
barPercentage: 0.7,
|
||||
categoryPercentage: 0.5,
|
||||
fill: true,
|
||||
}] satisfies ChartDataset[],
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
aspectRatio: 2.5,
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { Chart, type ChartDataset } from 'chart.js';
|
||||
import { Chart } from 'chart.js';
|
||||
import gradient from 'chartjs-plugin-gradient';
|
||||
import * as os from '@/os';
|
||||
import { useChartTooltip } from '@/scripts/use-chart-tooltip';
|
||||
@ -190,7 +190,7 @@ onMounted(async () => {
|
||||
categoryPercentage: 0.9,
|
||||
fill: true,
|
||||
clip: 8,
|
||||
}] satisfies ChartDataset[],
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
aspectRatio: 5,
|
||||
|
@ -77,7 +77,7 @@ async function renderChart() {
|
||||
barPercentage: 0.7,
|
||||
categoryPercentage: 0.7,
|
||||
fill: true,
|
||||
} satisfies ChartDataset, extra);
|
||||
}, extra);
|
||||
}
|
||||
|
||||
chartInstance = new Chart(chartEl, {
|
||||
|
@ -76,7 +76,7 @@ async function renderChart() {
|
||||
borderRadius: 4,
|
||||
barPercentage: 0.9,
|
||||
fill: true,
|
||||
} satisfies ChartDataset, extra);
|
||||
}, extra);
|
||||
}
|
||||
|
||||
chartInstance = new Chart(chartEl, {
|
||||
|
@ -77,7 +77,7 @@ async function renderChart() {
|
||||
barPercentage: 0.7,
|
||||
categoryPercentage: 0.7,
|
||||
fill: true,
|
||||
} satisfies ChartDataset, extra);
|
||||
}, extra);
|
||||
}
|
||||
|
||||
chartInstance = new Chart(chartEl, {
|
||||
|
@ -443,11 +443,13 @@ export const ACHIEVEMENT_BADGES = {
|
||||
bg: 'linear-gradient(0deg, rgb(144, 224, 255), rgb(255, 168, 252))',
|
||||
frame: 'bronze',
|
||||
},
|
||||
/*
|
||||
} as const satisfies Record<typeof ACHIEVEMENT_TYPES[number], {
|
||||
img: string;
|
||||
bg: string | null;
|
||||
frame: 'bronze' | 'silver' | 'gold' | 'platinum';
|
||||
}>;
|
||||
*/ } as const;
|
||||
|
||||
export const claimedAchievements: typeof ACHIEVEMENT_TYPES[number][] = ($i && $i.achievements) ? $i.achievements.map(x => x.name) : [];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user