BarLineOptions.js
1.29 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
54
55
56
57
58
59
60
61
import * as echarts from 'echarts'
// import utils from '../../utils/util'
function getBarLineOptions(obj) {
const { tooltipFormatter, seriesData } = obj
var barLineOption = {
tooltip: {
trigger: 'axis',
borderWidth: 0,
padding: 0,
backgroundColor: '#051526',
formatter: tooltipFormatter || ''
},
xAxis: {
data: []
},
yAxis: [
{
// 纵轴标尺固定
type: 'value',
scale: true,
// max: 200,
min: 0,
splitNumber: 4,
boundaryGap: [0.1, 0.1],
splitLine: {
lineStyle: {
color: '#ffffff1a'
}
}
}
],
grid: {
left: '3%',
right: '2%',
top: '25%',
bottom: '6%',
containLabel: true
},
series: [
{
name: 'line',
type: 'line',
data: [],
showSymbol: true, // 是否默认展示圆点
symbol: 'circle', // 设定为实心点
symbolSize: 6, // 设定实心点的大小
itemStyle: {
normal: {
color: '#FFC200', // 改变折线点的颜色
lineStyle: {
color: '#FFC200' // 改变折线颜色
}
}
}
}
]
}
return barLineOption
}
export default getBarLineOptions