diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts index 20edffc4b9..511d4e20b3 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -362,8 +362,15 @@ export const dvMainStore = defineStore('dataVisualization', { } //如果当前的组件是UserView 图表,则想canvasView中增加一项 UserView ID 和componentID保持一致 if (component.component === 'UserView') { + const defaultConfig = JSON.parse(JSON.stringify(BASE_VIEW_CONFIG)) + if (component.innerType === 'bar-range') { + defaultConfig.customStyle.xAxis.axisLine.show = false + defaultConfig.customStyle.xAxis.splitLine.show = true + defaultConfig.customStyle.yAxis.axisLine.show = true + defaultConfig.customStyle.yAxis.splitLine.show = false + } let newView = { - ...JSON.parse(JSON.stringify(BASE_VIEW_CONFIG)), + ...defaultConfig, id: component.id, type: component.innerType, render: component.render diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/XAxisSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/XAxisSelector.vue index 968fbc6ab4..b681691c36 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/XAxisSelector.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/XAxisSelector.vue @@ -52,6 +52,12 @@ const fontSizeList = computed(() => { return arr }) +const splitLineStyle = [ + { label: t('chart.line_type_solid'), value: 'solid' }, + { label: t('chart.line_type_dashed'), value: 'dashed' }, + { label: t('chart.line_type_dotted'), value: 'dotted' } +] + const isBarRangeTime = computed(() => { if (props.chart.type === 'bar-range') { const tempYAxis = props.chart.yAxis[0] @@ -326,6 +332,22 @@ onMounted(() => { /> + + + + + { return arr }) +const splitLineStyle = [ + { label: t('chart.line_type_solid'), value: 'solid' }, + { label: t('chart.line_type_dashed'), value: 'dashed' }, + { label: t('chart.line_type_dotted'), value: 'dotted' } +] + const changeAxisStyle = prop => { if ( state.axisForm.axisValue.splitCount && @@ -303,6 +309,22 @@ onMounted(() => { /> + + + + +