Merge pull request #476 from dataease/pr@dev@fix_雷达图tooltip

fix: 雷达图tooltip
This commit is contained in:
XiaJunjie2020 2021-08-03 11:02:36 +08:00 committed by GitHub
commit 0d6bb1484a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 6 deletions

View File

@ -508,11 +508,7 @@ export const BASE_RADAR = {
},
indicator: []
},
series: [{
type: 'radar',
// areaStyle: {normal: {}},
data: []
}]
series: []
}
export const BASE_GAUGE = {

View File

@ -36,8 +36,19 @@ export function baseRadarOption(chart_option, chart) {
y.label = customAttr.label
}
chart_option.legend.data.push(y.name)
const d = {
name: y.name,
type: 'radar',
data: [
{
value: y.data,
name: y.name
}
]
}
y.value = JSON.parse(JSON.stringify(y.data))
chart_option.series[0].data.push(y)
chart_option.series.push(d)
maxValues.push(Math.max.apply(null, y.value))
}