Merge pull request #666 from dataease/pr@dev@refactor_chart

refactor: 坐标轴强制显示最大值,scatter横轴优化
This commit is contained in:
XiaJunjie2020 2021-08-19 10:46:49 +08:00 committed by GitHub
commit b6c03d1ebe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -656,7 +656,8 @@ export const BASE_SCATTER = {
data: []
},
xAxis: {
data: []
data: [],
boundaryGap: false
},
yAxis: {
type: 'value'

View File

@ -58,6 +58,9 @@ export function componentStyle(chart_option, chart) {
chart_option.xAxis.axisLabel = customStyle.xAxis.axisLabel
chart_option.xAxis.splitLine = customStyle.xAxis.splitLine
chart_option.xAxis.nameTextStyle = customStyle.xAxis.nameTextStyle
chart_option.xAxis.axisLabel.showMaxLabel = true
chart_option.xAxis.axisLabel.showMinLabel = true
}
if (customStyle.yAxis && (chart.type.includes('bar') || chart.type.includes('line') || chart.type.includes('scatter'))) {
chart_option.yAxis.show = customStyle.yAxis.show
@ -66,6 +69,9 @@ export function componentStyle(chart_option, chart) {
chart_option.yAxis.axisLabel = customStyle.yAxis.axisLabel
chart_option.yAxis.splitLine = customStyle.yAxis.splitLine
chart_option.yAxis.nameTextStyle = customStyle.yAxis.nameTextStyle
chart_option.xAxis.axisLabel.showMaxLabel = true
chart_option.xAxis.axisLabel.showMinLabel = true
}
if (customStyle.split && chart.type.includes('radar')) {
chart_option.radar.name = customStyle.split.name