index.config.ts
1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import type { EChartsOption } from 'echarts'
import { isLightboxMode } from '@/utils/env'
export const defaultOption = (): EChartsOption => {
return {
tooltip: {
},
calculable: true,
xAxis:
{
type: 'category',
// prettier-ignore
data: isLightboxMode() ? [] : ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
},
legend: {
top: '8%',
left: 'center',
data: [''],
},
grid: {
top: '25%',
left: '6%',
right: '10%',
bottom: '8%',
containLabel: true,
},
yAxis:
{
type: 'value',
},
series: [
{
name: 'Rainfall',
type: isLightboxMode() ? 'line' : 'bar',
data: isLightboxMode()
? []
: [
25.6, 76.7, 42.0, 27.0, 23.2,
],
},
{
name: 'Evaporation',
type: 'bar',
data: isLightboxMode()
? []
: [
28.7, 32.6, 70.7, 29.0, 26.4,
],
},
],
}
}