diff --git a/frontend/src/views/chart/chart/common/common_antv.js b/frontend/src/views/chart/chart/common/common_antv.js
index 4175a70bf1..331a3e45dc 100644
--- a/frontend/src/views/chart/chart/common/common_antv.js
+++ b/frontend/src/views/chart/chart/common/common_antv.js
@@ -112,7 +112,13 @@ export function getLabel(chart) {
if (l.show) {
if (chart.type === 'pie') {
label = {
- type: l.position
+ type: l.position,
+ autoRotate: false
+ }
+ } else if (chart.type.includes('line')) {
+ label = {
+ position: l.position,
+ offsetY: -8
}
} else {
label = {
diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue
index 5b59684eff..84f8c778c6 100644
--- a/frontend/src/views/chart/view/ChartEdit.vue
+++ b/frontend/src/views/chart/view/ChartEdit.vue
@@ -13,6 +13,9 @@
+
+ {{ $t('chart.close') }}
+
{{ $t('chart.recover') }}
@@ -1246,7 +1249,8 @@ export default {
this.table = response.data
this.initTableField(id)
}).catch(err => {
- this.resetView()
+ this.table = null
+ this.resetDatasetField()
this.httpRequest.status = err.response.data.success
this.httpRequest.msg = err.response.data.message
return true
@@ -1525,6 +1529,14 @@ export default {
this.$success(this.$t('commons.save_success'))
})
},
+ close() {
+ this.closeChangeChart()
+ // 从仪表板入口关闭
+ if (this.$route.path.indexOf('panel') > -1) {
+ this.$store.commit('recordSnapshot')
+ bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
+ }
+ },
getData(id) {
this.hasEdit = false
if (id) {