feat--折线图提示语/数值设定优化

This commit is contained in:
qianming
2023-11-29 14:21:13 +08:00
parent 72561da9fa
commit b850f9888b
4 changed files with 87 additions and 6 deletions

View File

@@ -411,6 +411,14 @@ export const widgetLineCompare = {
placeholder: '',
value: true,
},
{
type: 'el-input-text',
label: '最大值',
name: 'maxYTop',
required: false,
placeholder: '',
value: '',
},
{
type: 'el-input-text',
label: '坐标名',
@@ -528,6 +536,14 @@ export const widgetLineCompare = {
placeholder: '',
value: true,
},
{
type: 'el-input-text',
label: '最大值',
name: 'maxYBottom',
required: false,
placeholder: '',
value: '',
},
{
type: 'el-input-text',
label: '坐标名',

View File

@@ -600,6 +600,32 @@ export const widgetLineStack = {
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: '字体字号',
@@ -635,6 +661,40 @@ export const widgetLineStack = {
{
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: '字体字号',

View File

@@ -384,6 +384,7 @@ export default {
setOptionsYTop() {
const optionsSetup = this.optionsSetup;
const yAxis = {
max: optionsSetup.maxYTop !== "" ? optionsSetup.maxYTop : null,
gridIndex: 0,
splitNumber: optionsSetup.splitNumberYTop,
show: optionsSetup.isShowYTop,
@@ -428,6 +429,7 @@ export default {
setOptionsYBottom() {
const optionsSetup = this.optionsSetup;
const yAxis = {
max: optionsSetup.maxYBottom !== "" ? optionsSetup.maxYBottom : null,
gridIndex: 1,
splitNumber: optionsSetup.splitNumberYBottom,
show: optionsSetup.isShowYBottom,

View File

@@ -237,8 +237,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,
@@ -395,8 +398,8 @@ export default {
//数值设定
label: {
show: optionsSetup.isShow,
position: "top",
distance: 10,
position: optionsSetup.fontPosition,
distance: optionsSetup.fontDistance,
fontSize: optionsSetup.fontSize,
color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight,
@@ -510,8 +513,8 @@ export default {
// 数值设定
label: {
show: optionsSetup.isShow,
position: "top",
distance: 10,
position: optionsSetup.fontPosition,
distance: optionsSetup.fontDistance,
fontSize: optionsSetup.fontSize,
color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight,