forked from cerc-io/cosmos-explorer
feat: chart show
This commit is contained in:
parent
eff43c87b1
commit
d960db4840
@ -9,22 +9,22 @@ const props = defineProps(['series', 'labels']);
|
|||||||
const baseStore = useBaseStore();
|
const baseStore = useBaseStore();
|
||||||
|
|
||||||
const expenseRationChartConfig = computed(() => {
|
const expenseRationChartConfig = computed(() => {
|
||||||
const theme = baseStore.theme;
|
const theme = baseStore.theme;
|
||||||
getDonutChartConfig(theme, props?.labels);
|
return getDonutChartConfig(theme, props?.labels);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ApexCharts
|
<ApexCharts
|
||||||
type="donut"
|
type="donut"
|
||||||
height="410"
|
height="410"
|
||||||
:options="expenseRationChartConfig"
|
:options="expenseRationChartConfig"
|
||||||
:series="series"
|
:series="series"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export default {
|
export default {
|
||||||
name: 'DonetChart',
|
name: 'DonetChart',
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -166,7 +166,7 @@ const themeColors = (theme: string) => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
// 👉 Colors variables
|
// 👉 Colors variables
|
||||||
const colorVariables = (theme: string) => {
|
export const colorVariables = (theme: string) => {
|
||||||
if (theme === 'light') {
|
if (theme === 'light') {
|
||||||
return {
|
return {
|
||||||
themeSecondaryTextColor: 'rgba(76,78,100,0.6)',
|
themeSecondaryTextColor: 'rgba(76,78,100,0.6)',
|
||||||
|
Loading…
Reference in New Issue
Block a user