修改看板

master
夜笙歌 3 weeks ago
parent 918e263f5b
commit 87a4c6ba10

@ -103,7 +103,9 @@ const defaultOption = {
xAxis: [ xAxis: [
{ {
name: props.data?.options?.xName || '', name: props.data?.options?.xName || '',
nameLocation: props.data?.options?.xNameLocation || 'end',
type: 'category', type: 'category',
boundaryGap: props.data?.options?.boundaryGap || false,
axisLine: { axisLine: {
show: props.data?.options?.xAxisLineShow || false, show: props.data?.options?.xAxisLineShow || false,
lineStyle: { lineStyle: {
@ -119,35 +121,55 @@ const defaultOption = {
axisLabel: { axisLabel: {
show: props.data?.options?.xAxisLabelShow || false, show: props.data?.options?.xAxisLabelShow || false,
interval: props.data?.options?.xAxisLabelInterval ? 0 : 'auto', interval: props.data?.options?.xAxisLabelInterval ? 0 : 'auto',
inside: props.data?.options?.xAxisLabelInside || false,
formatter: props.data?.options?.xAxisLabelFormatter || null, formatter: props.data?.options?.xAxisLabelFormatter || null,
rotate: props.data?.options?.xAxisLabelRotate || 0,
color: props.data?.options?.xAxisLabelColor || '#fff', color: props.data?.options?.xAxisLabelColor || '#fff',
fontSize: props.data?.options?.xAxisLabelFontSize || 12, fontSize: props.data?.options?.xAxisLabelFontSize || 12,
margin: props.data?.options?.xAxisLabelMargin || 3 margin: props.data?.options?.xAxisLabelMargin || 3
}, },
boundaryGap: props.data?.options?.boundaryGap || false splitLine: {
show: props.data?.options?.xAxisSplitLineShow || false,
lineStyle: {
color: props.data?.options?.xAxisSplitLineColor || '#DCE2E8',
type: props.data?.options?.xAxisSplitLineType || 'solid'
}
}
} }
], ],
yAxis: [ yAxis: [
{ {
name: props.data?.options?.yName || '', name: props.data?.options?.yName || '',
type: 'value', type: 'value',
axisTick: {
show: false
},
axisLine: { axisLine: {
show: true, show: props.data?.options?.yAxisLineShow || false,
lineStyle: { lineStyle: {
color: '#fff' color: props.data?.options?.yAxisLineColor || '#DCE2E8'
}
},
axisTick: {
show: props.data?.options?.yAxisTickShow || false,
lineStyle: {
color: props.data?.options?.yAxisTickColor || '#DCE2E8'
} }
}, },
axisLabel: { axisLabel: {
textStyle: { show: props.data?.options?.yAxisLabelShow || false,
color: '#fff' interval: props.data?.options?.yAxisLabelInterval ? 0 : 'auto',
} inside: props.data?.options?.yAxisLabelInside || false,
formatter: props.data?.options?.yAxisLabelFormatter || null,
rotate: props.data?.options?.yAxisLabelRotate || 0,
color: props.data?.options?.yAxisLabelColor || '#fff',
fontSize: props.data?.options?.yAxisLabelFontSize || 12,
margin: props.data?.options?.yAxisLabelMargin || 3
}, },
splitLine: { splitLine: {
show: false show: props.data?.options?.yAxisSplitLineShow || false,
} lineStyle: {
color: props.data?.options?.yAxisSplitLineColor || '#DCE2E8',
type: props.data?.options?.yAxisSplitLineType || 'solid'
}
},
} }
], ],
series: [ series: [

@ -18,27 +18,67 @@ const getOption = (e) => {
gridBottom: 10, gridBottom: 10,
gridRight: 10, gridRight: 10,
xName: '', xName: '',
xNameLocation: 'end',
xAxisLineShow: true, xAxisLineShow: true,
boundaryGap: true,
xAxisLineColor: '#DCE2E8', xAxisLineColor: '#DCE2E8',
xAxisTickShow: true, xAxisTickShow: true,
xAxisTickColor: '#DCE2E8', xAxisTickColor: '#DCE2E8',
xAxisLabelShow: true, xAxisLabelShow: true,
xAxisLabelInterval: false, xAxisLabelInterval: false,
xAxisLabelInside: false,
xAxisLabelRotate: 0,
xAxisLabelFormatter: '', xAxisLabelFormatter: '',
xAxisLabelColor: '#fff', xAxisLabelColor: '#fff',
xAxisLabelFontSize: 12, xAxisLabelFontSize: 12,
xAxisLabelMargin: 3, xAxisLabelMargin: 3,
boundaryGap: true, xAxisSplitLineShow: false,
xAxisSplitLineColor: '#DCE2E8',
xAxisSplitLineType: 'solid',
yName: '', yName: '',
tooltip: true, tooltip: true,
legend: true legend: true
}; };
} else if (e === 'bar' || e === 'multiBars') { } else if (e === 'bar' || e === 'multiBars') {
return { title: '', yNames: [], gridTop: 30, gridLeft: 5, gridBottom: 10, gridRight: 10, xName: '', yName: '', tooltip:true, legend:true }; return {
title: '',
yNames: [],
gridTop: 30,
gridLeft: 5,
gridBottom: 10,
gridRight: 10,
xName: '',
yName: '',
tooltip: true,
legend: true
};
} else if (e === 'backgroundBar') { } else if (e === 'backgroundBar') {
return { title: '', yNames: [], gridTop: 30, gridLeft: 5, gridBottom: 10, gridRight: 10, xName: '', yName: '', tooltip:true, legend:true,backgroundColor:'rgba(180, 180, 180, 0.2)' }; return {
title: '',
yNames: [],
gridTop: 30,
gridLeft: 5,
gridBottom: 10,
gridRight: 10,
xName: '',
yName: '',
tooltip: true,
legend: true,
backgroundColor: 'rgba(180, 180, 180, 0.2)'
};
} else if (e === 'curve' || e === 'multiCurves') { } else if (e === 'curve' || e === 'multiCurves') {
return { title: '', yNames: [], gridTop: 30, gridLeft: 5, gridBottom: 10, gridRight: 10, xName: '', yName: '', tooltip:true, legend:true }; return {
title: '',
yNames: [],
gridTop: 30,
gridLeft: 5,
gridBottom: 10,
gridRight: 10,
xName: '',
yName: '',
tooltip: true,
legend: true
};
} else if (e === 'lineBar') { } else if (e === 'lineBar') {
return { return {
title: '', title: '',
@ -83,7 +123,7 @@ const getOption = (e) => {
} else if (e === 'video') { } else if (e === 'video') {
return { videoSrc: '' }; return { videoSrc: '' };
} else if (e === 'timeline') { } else if (e === 'timeline') {
return { color: '#fff',timestampColor: '#fff', field: 'content', timestampField: 'timestamp', isTimestamp: true }; return { color: '#fff', timestampColor: '#fff', field: 'content', timestampField: 'timestamp', isTimestamp: true };
} else if (e === 'scrollTable' || e === 'table') { } else if (e === 'scrollTable' || e === 'table') {
return { return {
tableOptions: [], tableOptions: [],
@ -94,7 +134,7 @@ const getOption = (e) => {
tdColor: ['#fff'], tdColor: ['#fff'],
thBgColor: '#fff', thBgColor: '#fff',
tdBgColor: ['#000'] tdBgColor: ['#000']
} };
} else if (e === 'carousel') { } else if (e === 'carousel') {
return { swiperOptions: {}, imageFit: 'contain', carouselImages: [] }; return { swiperOptions: {}, imageFit: 'contain', carouselImages: [] };
} else if (e === 'background') { } else if (e === 'background') {
@ -204,5 +244,5 @@ export const options = {
} }
} }
return false; return false;
},getId }, getId
}; };

Loading…
Cancel
Save