feat: 增加仪表盘刻度样式配置参数

This commit is contained in:
junjun 2022-04-07 13:54:16 +08:00
parent c17e0b0a15
commit 7b18c4c77e
2 changed files with 30 additions and 3 deletions

View File

@ -87,17 +87,24 @@ export function baseGaugeOption(chart_option, chart) {
show: false
}
chart_option.series[0].axisTick = {
splitNumber: 5, // TODO 刻度间隔数
length: 10, // TODO 子刻度线长度
lineStyle: {
color: 'auto'
color: 'auto',
width: 2// TODO 子刻度线宽度
}
}
chart_option.series[0].splitLine = {
length: 18, // TODO 刻度线长度
lineStyle: {
color: 'auto'
color: 'auto',
width: 2// TODO 刻度线宽度
}
}
chart_option.series[0].axisLabel = {
color: 'auto'
color: 'auto',
distance: 20, // TODO 刻度值文字里刻度线距离
fontSize: 20// TODO 刻度值字体大小
}
}
}

View File

@ -72,6 +72,26 @@ export function baseGaugeOptionAntV(plot, container, chart, action) {
// indicator: null,
statistic: {
content: labelContent
},
axis: {
label: {
style: {
fontSize: 14// TODO 刻度值字体大小
}
},
tickLine: {
length: -12, // TODO 刻度线长度
style: {
lineWidth: 1// TODO 刻度线宽度
}
},
subTickLine: {
count: 4, // TODO 子刻度数
length: -6, // TODO 子刻度线长度
style: {
lineWidth: 1// TODO 子刻度线宽度
}
}
}
// range: {
// width: 12