Pre Merge pull request !271 from jiangkai/dev

This commit is contained in:
jiangkai 2025-07-31 04:51:47 +00:00 committed by Gitee
commit f4ab982b8b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -116,19 +116,32 @@ const vEchartsSetOption = () => {
// //
const dataSetHandle = async (dataset: any) => { const dataSetHandle = async (dataset: any) => {
props.chartConfig.option.series.forEach((item: any) => { props.chartConfig.option.series.forEach((item: any) => {
if (item.type === 'effectScatter' && dataset.point) item.data = dataset.point if (item.type === 'effectScatter') {
else if (item.type === 'lines' && dataset.line) { item.data = dataset.point || []
item.data = dataset.line.map((it: any) => { } else if (item.type === 'lines') {
return { if (dataset.line) {
...it, item.data = dataset.line.map((it: any) => {
lineStyle: { return {
color: props.chartConfig.option.series[2].lineStyle.normal.color ...it,
lineStyle: {
color: props.chartConfig.option.series[2].lineStyle.normal.color
}
} }
} })
}) } else {
} else if (item.type === 'map' && dataset.map) item.data = dataset.map item.data = []
}
} else if (item.type === 'map') {
item.data = dataset.map || []
}
}) })
if (dataset.pieces) props.chartConfig.option.visualMap.pieces = dataset.pieces if (dataset.pieces){
props.chartConfig.option.visualMap.show = true
props.chartConfig.option.visualMap.pieces = dataset.pieces
}else {
props.chartConfig.option.visualMap.show = false
props.chartConfig.option.visualMap.pieces = []
}
isPreview() && vEchartsSetOption() isPreview() && vEchartsSetOption()
} }