add tree shaking
This commit is contained in:
parent
b88fad3f86
commit
85e7a7b4aa
@ -12,9 +12,18 @@
|
|||||||
import { abbreviateNumber, formatDate } from '$lib/utils';
|
import { abbreviateNumber, formatDate } from '$lib/utils';
|
||||||
|
|
||||||
import { numberOfUnreadNotification, screenWidth} from '$lib/store';
|
import { numberOfUnreadNotification, screenWidth} from '$lib/store';
|
||||||
import { Chart } from 'svelte-echarts';
|
|
||||||
import Lazy from 'svelte-lazy';
|
import Lazy from 'svelte-lazy';
|
||||||
|
|
||||||
|
import { Chart } from 'svelte-echarts'
|
||||||
|
|
||||||
|
import { init, use } from 'echarts/core'
|
||||||
|
import { BarChart } from 'echarts/charts'
|
||||||
|
import { GridComponent } from 'echarts/components'
|
||||||
|
|
||||||
|
// now with tree-shaking
|
||||||
|
use([BarChart, GridComponent])
|
||||||
|
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
|
|
||||||
const quickInfo = data?.getDashboard?.quickInfo;
|
const quickInfo = data?.getDashboard?.quickInfo;
|
||||||
@ -305,7 +314,7 @@ onMount( async() => {
|
|||||||
|
|
||||||
<Lazy height={300} fadeOption={{delay: 100, duration: 500}} keep={true}>
|
<Lazy height={300} fadeOption={{delay: 100, duration: 500}} keep={true}>
|
||||||
<div class="app w-full h-[300px] mt-5">
|
<div class="app w-full h-[300px] mt-5">
|
||||||
<Chart options={optionsGraph} class="chart" />
|
<Chart {init} options={optionsGraph} class="chart" />
|
||||||
</div>
|
</div>
|
||||||
</Lazy>
|
</Lazy>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user