折线-点配置优化

qianming 2 years ago
parent 31a9b860a8
commit a06ed3fc37

@ -68,6 +68,18 @@ export const widgetBarLineStack = {
placeholder: '', placeholder: '',
value: 3, value: 3,
}, },
{
type: 'el-select',
label: '点样式',
name: 'symbol',
required: false,
placeholder: '',
selectOptions: [
{code: 'circle', name: '实心点'},
{code: 'emptyCircle', name: '空心点'},
],
value: 'circle'
},
{ {
type: 'el-switch', type: 'el-switch',
label: '平滑曲线', label: '平滑曲线',

@ -49,7 +49,19 @@ export const widgetLineCompare = {
name: 'pointSize', name: 'pointSize',
required: false, required: false,
placeholder: '', placeholder: '',
value: 5, value: 10,
},
{
type: 'el-select',
label: '点样式',
name: 'symbol',
required: false,
placeholder: '',
selectOptions: [
{code: 'circle', name: '实心点'},
{code: 'emptyCircle', name: '空心点'},
],
value: 'circle'
}, },
{ {
type: 'el-switch', type: 'el-switch',

@ -59,6 +59,18 @@ export const widgetLineStack = {
placeholder: '', placeholder: '',
value: 5, value: 5,
}, },
{
type: 'el-select',
label: '点样式',
name: 'symbol',
required: false,
placeholder: '',
selectOptions: [
{code: 'circle', name: '实心点'},
{code: 'emptyCircle', name: '空心点'},
],
value: 'circle'
},
{ {
type: 'el-switch', type: 'el-switch',
label: '平滑曲线', label: '平滑曲线',

@ -51,6 +51,18 @@ export const widgetLinechart = {
placeholder: '', placeholder: '',
value: 10, value: 10,
}, },
{
type: 'el-select',
label: '点样式',
name: 'symbol',
required: false,
placeholder: '',
selectOptions: [
{code: 'circle', name: '实心点'},
{code: 'emptyCircle', name: '空心点'},
],
value: 'circle'
},
{ {
type: 'el-switch', type: 'el-switch',
label: '平滑曲线', label: '平滑曲线',

@ -435,9 +435,15 @@ export default {
type: 'line', type: 'line',
data: line, data: line,
yAxisIndex: 1, yAxisIndex: 1,
symbol: optionsSetup.symbol,
showSymbol: optionsSetup.markPoint, showSymbol: optionsSetup.markPoint,
symbolSize: optionsSetup.pointSize, symbolSize: optionsSetup.pointSize,
smooth: optionsSetup.smoothCurve, smooth: optionsSetup.smoothCurve,
itemStyle: {
normal: {
color: arrColor[i],
}
},
// 线 // 线
lineStyle: { lineStyle: {
color: arrColor[i], color: arrColor[i],
@ -528,9 +534,15 @@ export default {
type: "line", type: "line",
data: line, data: line,
yAxisIndex: 1, yAxisIndex: 1,
symbol: optionsSetup.symbol,
showSymbol: optionsSetup.markPoint, showSymbol: optionsSetup.markPoint,
symbolSize: optionsSetup.pointSize, symbolSize: optionsSetup.pointSize,
smooth: optionsSetup.smoothCurve, smooth: optionsSetup.smoothCurve,
itemStyle: {
normal: {
color: arrColor[i],
}
},
// 线 // 线
lineStyle: { lineStyle: {
color: arrColor[i], color: arrColor[i],

@ -447,6 +447,7 @@ export default {
const series = this.options.series const series = this.options.series
// 线 // 线
for (const key in series) { for (const key in series) {
series[key].symbol = optionsSetup.symbol
series[key].showSymbol = optionsSetup.markPoint series[key].showSymbol = optionsSetup.markPoint
series[key].symbolSize = optionsSetup.pointSize series[key].symbolSize = optionsSetup.pointSize
series[key].smooth = optionsSetup.smoothCurve series[key].smooth = optionsSetup.smoothCurve

@ -356,7 +356,7 @@ export default {
type: "line", type: "line",
data: data, data: data,
width: optionsSetup.lineWidth, width: optionsSetup.lineWidth,
symbol: 'circle', symbol: optionsSetup.symbol,
showSymbol: optionsSetup.markPoint, showSymbol: optionsSetup.markPoint,
symbolSize: optionsSetup.pointSize, symbolSize: optionsSetup.pointSize,
smooth: optionsSetup.smoothCurve, smooth: optionsSetup.smoothCurve,
@ -443,7 +443,7 @@ export default {
type: "line", type: "line",
data: val.series[i].data, data: val.series[i].data,
width: optionsSetup.lineWidth, width: optionsSetup.lineWidth,
symbol: 'circle', symbol: optionsSetup.symbol,
showSymbol: optionsSetup.markPoint, showSymbol: optionsSetup.markPoint,
symbolSize: optionsSetup.pointSize, symbolSize: optionsSetup.pointSize,
symbolColor: arrColor[i], symbolColor: arrColor[i],

@ -224,6 +224,7 @@ export default {
const series = this.options.series; const series = this.options.series;
for (const key in series) { for (const key in series) {
if (series[key].type == "line") { if (series[key].type == "line") {
series[key].symbol = optionsSetup.symbol;
series[key].showSymbol = optionsSetup.markPoint; series[key].showSymbol = optionsSetup.markPoint;
series[key].symbolSize = optionsSetup.pointSize; series[key].symbolSize = optionsSetup.pointSize;
series[key].smooth = optionsSetup.smoothCurve; series[key].smooth = optionsSetup.smoothCurve;
@ -236,7 +237,6 @@ export default {
opacity: 0 opacity: 0
}; };
} }
series[key].lineStyle = { series[key].lineStyle = {
width: optionsSetup.lineWidth width: optionsSetup.lineWidth
}; };

Loading…
Cancel
Save