feat--折线图提示语/数值设定优化
This commit is contained in:
@@ -592,6 +592,32 @@ export const widgetLinechart = {
|
||||
placeholder: '',
|
||||
value: false
|
||||
},
|
||||
{
|
||||
type: 'el-select',
|
||||
label: '位置',
|
||||
name: 'fontPosition',
|
||||
required: false,
|
||||
placeholder: '',
|
||||
selectOptions: [
|
||||
{ code: 'top', name: '上' },
|
||||
{ code: 'left', name: '左' },
|
||||
{ code: 'right', name: '右' },
|
||||
{ code: 'inside', name: '里' },
|
||||
{ code: 'insideTop', name: '里顶' },
|
||||
{ code: 'insideLeft', name: '里左' },
|
||||
{ code: 'insideRight', name: '里右' },
|
||||
{ code: 'insideBottom', name: '里底' },
|
||||
],
|
||||
value: 'top'
|
||||
},
|
||||
{
|
||||
type: 'el-input-number',
|
||||
label: '距离',
|
||||
name: 'fontDistance',
|
||||
required: false,
|
||||
placeholder: '',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
type: 'el-input-number',
|
||||
label: '字体字号',
|
||||
@@ -627,6 +653,40 @@ export const widgetLinechart = {
|
||||
{
|
||||
name: '提示语设置',
|
||||
list: [
|
||||
{
|
||||
type: 'el-switch',
|
||||
label: '显示',
|
||||
name: 'isShowTooltip',
|
||||
required: false,
|
||||
placeholder: '',
|
||||
value: true
|
||||
},
|
||||
{
|
||||
type: 'el-select',
|
||||
label: '触发类型',
|
||||
name: 'tooltipTrigger',
|
||||
required: false,
|
||||
placeholder: '',
|
||||
selectOptions: [
|
||||
{ code: 'item', name: '数据项' },
|
||||
{ code: 'axis', name: '坐标轴' },
|
||||
],
|
||||
value: 'axis'
|
||||
},
|
||||
{
|
||||
type: 'el-select',
|
||||
label: '指示器类型',
|
||||
name: 'tooltipAxisPointerType',
|
||||
required: false,
|
||||
placeholder: '',
|
||||
selectOptions: [
|
||||
{ code: 'none', name: '无' },
|
||||
{ code: 'line', name: '直线' },
|
||||
{ code: 'shadow', name: '阴影' },
|
||||
{ code: 'cross', name: '十字准星' },
|
||||
],
|
||||
value: 'shadow'
|
||||
},
|
||||
{
|
||||
type: 'el-input-number',
|
||||
label: '字体字号',
|
||||
|
||||
@@ -236,8 +236,11 @@ export default {
|
||||
setOptionsTooltip() {
|
||||
const optionsSetup = this.optionsSetup;
|
||||
const tooltip = {
|
||||
trigger: "item",
|
||||
show: true,
|
||||
show: optionsSetup.isShowTooltip,
|
||||
trigger: optionsSetup.tooltipTrigger,
|
||||
axisPointer: {
|
||||
type: optionsSetup.tooltipAxisPointerType,
|
||||
},
|
||||
textStyle: {
|
||||
color: optionsSetup.tipsColor,
|
||||
fontSize: optionsSetup.tipsFontSize,
|
||||
@@ -359,8 +362,8 @@ export default {
|
||||
};
|
||||
series[i].label = {
|
||||
show: optionsSetup.isShow,
|
||||
position: "top",
|
||||
distance: 10,
|
||||
position: optionsSetup.fontPosition,
|
||||
distance: optionsSetup.fontDistance,
|
||||
fontSize: optionsSetup.fontSize,
|
||||
color: optionsSetup.dataColor,
|
||||
fontWeight: optionsSetup.fontWeight,
|
||||
@@ -456,8 +459,8 @@ export default {
|
||||
};
|
||||
obj.label = {
|
||||
show: optionsSetup.isShow,
|
||||
position: "top",
|
||||
distance: 10,
|
||||
position: optionsSetup.fontPosition,
|
||||
distance: optionsSetup.fontDistance,
|
||||
fontSize: optionsSetup.fontSize,
|
||||
color: optionsSetup.dataColor,
|
||||
fontWeight: optionsSetup.fontWeight,
|
||||
|
||||
Reference in New Issue
Block a user