Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:defect echart map name error #2332

Open
wants to merge 1 commit into
base: dev-0.3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions webapp/app/containers/Widget/render/chart/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,29 @@ export default function (chartProps: IChartProps) {
break
}

if (serieObj.data.length && serieObj.mapType ==='china'){
let item =serieObj.data.find(i=>i.name ==='宁夏回族')
if (item){
serieObj.data.push({
...item,
name:'宁夏'
})
}
item =serieObj.data.find(i=>i.name ==='广西壮族')
if (item){
serieObj.data.push({
...item,
name:'广西'
})
}
item =serieObj.data.find(i=>i.name ==='新疆维吾尔')
if (item){
serieObj.data.push({
...item,
name:'新疆'
})
}
}
metricArr.push(serieObj)
metricOptions = {
series: metricArr
Expand Down