forked from github/dataease
feat(视图): 指标卡、文本卡支持调整位置
This commit is contained in:
parent
8233e3203b
commit
6508673054
@ -1509,7 +1509,14 @@ export default {
|
||||
Line (area) chart, Column (Bar) chart, Dashboard: {a} is series name, {b} is category value, {c} is value<br>
|
||||
Pie chart, Funnel chart: {a} is series name, {b} is data item name, {c} is value, {d} is percentage<br>
|
||||
Map : {a} (series name), {b} is area name, {c} is merged values, {d} is none<br>
|
||||
Scatter (Bubble) plot: {a} is series name, {b} is data name, {c} is numeric array, {d} is none`
|
||||
Scatter (Bubble) plot: {a} is series name, {b} is data name, {c} is numeric array, {d} is none`,
|
||||
h_position: 'Horizontal Position',
|
||||
v_position: 'Vertical Position',
|
||||
p_left: 'Left',
|
||||
p_right: 'Right',
|
||||
p_top: 'Top',
|
||||
p_bottom: 'Bottom',
|
||||
p_center: 'Center'
|
||||
},
|
||||
dataset: {
|
||||
spend_time: 'Spend',
|
||||
|
@ -1503,7 +1503,14 @@ export default {
|
||||
折線(區域)圖、柱狀(條形)圖、儀表盤 : {a}(系列名稱),{b}(類目值),{c}(數值)<br>
|
||||
餅圖、漏鬥圖: {a}(系列名稱),{b}(數據項名稱),{c}(數值), {d}(百分比)<br>
|
||||
地圖 : {a}(系列名稱),{b}(區域名稱),{c}(合並數值), {d}(無)<br>
|
||||
散點圖(氣泡)圖 : {a}(系列名稱),{b}(數據名稱),{c}(數值數組), {d}(無)`
|
||||
散點圖(氣泡)圖 : {a}(系列名稱),{b}(數據名稱),{c}(數值數組), {d}(無)`,
|
||||
h_position: '水平位置',
|
||||
v_position: '垂直位置',
|
||||
p_left: '左對齊',
|
||||
p_right: '右對齊',
|
||||
p_top: '上對齊',
|
||||
p_bottom: '下對齊',
|
||||
p_center: '居中'
|
||||
},
|
||||
dataset: {
|
||||
spend_time: '耗時',
|
||||
|
@ -1502,7 +1502,14 @@ export default {
|
||||
折线(区域)图、柱状(条形)图、仪表盘 : {a}(系列名称),{b}(类目值),{c}(数值)<br>
|
||||
饼图、漏斗图: {a}(系列名称),{b}(数据项名称),{c}(数值), {d}(百分比)<br>
|
||||
地图 : {a}(系列名称),{b}(区域名称),{c}(合并数值), {d}(无)<br>
|
||||
散点图(气泡)图 : {a}(系列名称),{b}(数据名称),{c}(数值数组), {d}(无)`
|
||||
散点图(气泡)图 : {a}(系列名称),{b}(数据名称),{c}(数值数组), {d}(无)`,
|
||||
h_position: '水平位置',
|
||||
v_position: '垂直位置',
|
||||
p_left: '左对齐',
|
||||
p_right: '右对齐',
|
||||
p_top: '上对齐',
|
||||
p_bottom: '下对齐',
|
||||
p_center: '居中'
|
||||
},
|
||||
dataset: {
|
||||
spend_time: '耗时',
|
||||
|
@ -127,7 +127,9 @@ export const DEFAULT_SIZE = {
|
||||
symbolOpacity: 0.7,
|
||||
symbolStrokeWidth: 2,
|
||||
showIndex: false,
|
||||
indexLabel: '序号'
|
||||
indexLabel: '序号',
|
||||
hPosition: 'center',
|
||||
vPosition: 'center'
|
||||
}
|
||||
export const DEFAULT_SUSPENSION = {
|
||||
show: true
|
||||
|
@ -206,7 +206,9 @@ export const TYPE_CONFIGS = [
|
||||
'dimensionFontStyle',
|
||||
'dimensionLetterSpace',
|
||||
'dimensionFontShadow',
|
||||
'spaceSplit'
|
||||
'spaceSplit',
|
||||
'hPosition',
|
||||
'vPosition'
|
||||
],
|
||||
'title-selector-ant-v': [
|
||||
'show',
|
||||
@ -251,7 +253,9 @@ export const TYPE_CONFIGS = [
|
||||
'dimensionFontStyle',
|
||||
'dimensionLetterSpace',
|
||||
'dimensionFontShadow',
|
||||
'spaceSplit'
|
||||
'spaceSplit',
|
||||
'hPosition',
|
||||
'vPosition'
|
||||
],
|
||||
'title-selector-ant-v': [
|
||||
'show',
|
||||
@ -1939,7 +1943,9 @@ export const TYPE_CONFIGS = [
|
||||
'dimensionFontStyle',
|
||||
'dimensionLetterSpace',
|
||||
'dimensionFontShadow',
|
||||
'spaceSplit'
|
||||
'spaceSplit',
|
||||
'hPosition',
|
||||
'vPosition'
|
||||
],
|
||||
'title-selector': [
|
||||
'show',
|
||||
@ -1984,7 +1990,9 @@ export const TYPE_CONFIGS = [
|
||||
'dimensionFontStyle',
|
||||
'dimensionLetterSpace',
|
||||
'dimensionFontShadow',
|
||||
'spaceSplit'
|
||||
'spaceSplit',
|
||||
'hPosition',
|
||||
'vPosition'
|
||||
],
|
||||
'title-selector': [
|
||||
'show',
|
||||
|
@ -189,6 +189,9 @@ export default {
|
||||
this.label_content_class.letterSpacing = (customAttr.size.quotaLetterSpace ? customAttr.size.quotaLetterSpace : DEFAULT_SIZE.quotaLetterSpace) + 'px'
|
||||
this.label_content_class.textShadow = customAttr.size.quotaFontShadow ? '2px 2px 4px' : 'none'
|
||||
|
||||
this.content_class.alignItems = customAttr.size.hPosition ? customAttr.size.hPosition : DEFAULT_SIZE.hPosition
|
||||
this.content_class.justifyContent = customAttr.size.vPosition ? customAttr.size.vPosition : DEFAULT_SIZE.vPosition
|
||||
|
||||
if (!this.dimensionShow) {
|
||||
this.label_space.marginTop = '0px'
|
||||
} else {
|
||||
|
@ -216,6 +216,9 @@ export default {
|
||||
this.label_content_class.letterSpacing = (customAttr.size.quotaLetterSpace ? customAttr.size.quotaLetterSpace : DEFAULT_SIZE.quotaLetterSpace) + 'px'
|
||||
this.label_content_class.textShadow = customAttr.size.quotaFontShadow ? '2px 2px 4px' : 'none'
|
||||
|
||||
this.content_class.alignItems = customAttr.size.hPosition ? customAttr.size.hPosition : DEFAULT_SIZE.hPosition
|
||||
this.content_class.justifyContent = customAttr.size.vPosition ? customAttr.size.vPosition : DEFAULT_SIZE.vPosition
|
||||
|
||||
if (!this.dimensionShow) {
|
||||
this.label_space.marginTop = '0px'
|
||||
} else {
|
||||
|
@ -634,6 +634,54 @@
|
||||
@change="changeBarSizeCase('spaceSplit')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-show="showProperty('hPosition')"
|
||||
:label="$t('chart.h_position')"
|
||||
class="form-item"
|
||||
>
|
||||
<el-select
|
||||
v-model="sizeForm.hPosition"
|
||||
:placeholder="$t('chart.h_position')"
|
||||
@change="changeBarSizeCase('hPosition')"
|
||||
>
|
||||
<el-option
|
||||
value="start"
|
||||
:label="$t('chart.p_left')"
|
||||
>{{ $t('chart.p_left') }}</el-option>
|
||||
<el-option
|
||||
value="center"
|
||||
:label="$t('chart.p_center')"
|
||||
>{{ $t('chart.p_center') }}</el-option>
|
||||
<el-option
|
||||
value="end"
|
||||
:label="$t('chart.p_right')"
|
||||
>{{ $t('chart.p_right') }}</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-show="showProperty('vPosition')"
|
||||
:label="$t('chart.v_position')"
|
||||
class="form-item"
|
||||
>
|
||||
<el-select
|
||||
v-model="sizeForm.vPosition"
|
||||
:placeholder="$t('chart.v_position')"
|
||||
@change="changeBarSizeCase('vPosition')"
|
||||
>
|
||||
<el-option
|
||||
value="start"
|
||||
:label="$t('chart.p_top')"
|
||||
>{{ $t('chart.p_top') }}</el-option>
|
||||
<el-option
|
||||
value="center"
|
||||
:label="$t('chart.p_center')"
|
||||
>{{ $t('chart.p_center') }}</el-option>
|
||||
<el-option
|
||||
value="end"
|
||||
:label="$t('chart.p_bottom')"
|
||||
>{{ $t('chart.p_bottom') }}</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<!--text&label-end-->
|
||||
<!--scatter-begin-->
|
||||
@ -1076,6 +1124,9 @@ export default {
|
||||
this.sizeForm.dimensionFontIsItalic = this.sizeForm.dimensionFontIsItalic ? this.sizeForm.dimensionFontIsItalic : DEFAULT_SIZE.dimensionFontIsItalic
|
||||
this.sizeForm.dimensionLetterSpace = this.sizeForm.dimensionLetterSpace ? this.sizeForm.dimensionLetterSpace : DEFAULT_SIZE.dimensionLetterSpace
|
||||
this.sizeForm.dimensionFontShadow = this.sizeForm.dimensionFontShadow ? this.sizeForm.dimensionFontShadow : DEFAULT_SIZE.dimensionFontShadow
|
||||
|
||||
this.sizeForm.hPosition = this.sizeForm.hPosition ? this.sizeForm.hPosition : DEFAULT_SIZE.hPosition
|
||||
this.sizeForm.vPosition = this.sizeForm.vPosition ? this.sizeForm.vPosition : DEFAULT_SIZE.vPosition
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -984,6 +984,54 @@
|
||||
@change="changeBarSizeCase('spaceSplit')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-show="showProperty('hPosition')"
|
||||
:label="$t('chart.h_position')"
|
||||
class="form-item"
|
||||
>
|
||||
<el-select
|
||||
v-model="sizeForm.hPosition"
|
||||
:placeholder="$t('chart.h_position')"
|
||||
@change="changeBarSizeCase('hPosition')"
|
||||
>
|
||||
<el-option
|
||||
value="start"
|
||||
:label="$t('chart.p_left')"
|
||||
>{{ $t('chart.p_left') }}</el-option>
|
||||
<el-option
|
||||
value="center"
|
||||
:label="$t('chart.p_center')"
|
||||
>{{ $t('chart.p_center') }}</el-option>
|
||||
<el-option
|
||||
value="end"
|
||||
:label="$t('chart.p_right')"
|
||||
>{{ $t('chart.p_right') }}</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-show="showProperty('vPosition')"
|
||||
:label="$t('chart.v_position')"
|
||||
class="form-item"
|
||||
>
|
||||
<el-select
|
||||
v-model="sizeForm.vPosition"
|
||||
:placeholder="$t('chart.v_position')"
|
||||
@change="changeBarSizeCase('vPosition')"
|
||||
>
|
||||
<el-option
|
||||
value="start"
|
||||
:label="$t('chart.p_top')"
|
||||
>{{ $t('chart.p_top') }}</el-option>
|
||||
<el-option
|
||||
value="center"
|
||||
:label="$t('chart.p_center')"
|
||||
>{{ $t('chart.p_center') }}</el-option>
|
||||
<el-option
|
||||
value="end"
|
||||
:label="$t('chart.p_bottom')"
|
||||
>{{ $t('chart.p_bottom') }}</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<!--text&label-end-->
|
||||
<!--scatter-begin-->
|
||||
@ -1384,6 +1432,9 @@ export default {
|
||||
this.sizeForm.dimensionFontIsItalic = this.sizeForm.dimensionFontIsItalic ? this.sizeForm.dimensionFontIsItalic : DEFAULT_SIZE.dimensionFontIsItalic
|
||||
this.sizeForm.dimensionLetterSpace = this.sizeForm.dimensionLetterSpace ? this.sizeForm.dimensionLetterSpace : DEFAULT_SIZE.dimensionLetterSpace
|
||||
this.sizeForm.dimensionFontShadow = this.sizeForm.dimensionFontShadow ? this.sizeForm.dimensionFontShadow : DEFAULT_SIZE.dimensionFontShadow
|
||||
|
||||
this.sizeForm.hPosition = this.sizeForm.hPosition ? this.sizeForm.hPosition : DEFAULT_SIZE.hPosition
|
||||
this.sizeForm.vPosition = this.sizeForm.vPosition ? this.sizeForm.vPosition : DEFAULT_SIZE.vPosition
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user