Skip to content

雷达图

image

介绍

雷达图也被称为极坐标图或蜘蛛网图,主要用于表现多变量的数据,例如员工的多维属性分析。

API

Props

参数名描述类型默认值
status默认状态,支持变量绑定'default' | 'hide''default'
data数据源,支持变量绑定Array<Record<string, any>>-
dimensionField维度,维度的数据字段编码string'indicator'
dimensionMax维度最大值,配置所有维度的最大值,支持变量绑定Array[2000,2000,2000,2000,2000,2000]
dimensionMin维度最小值,配置所有维度的最小值,支持变量绑定Array[0,0,0,0,0,0]
dataField数值,数值系列的数据字段编码Array[{name:value1},{name:value2}]
width宽,图表画布宽度string'500px'
height高,图表画布高度string'300px'
series数值系列,图表数值系列配置数值系列-
标题标题,图表标题配置标题-
雷达图形雷达图形,雷达图形配置雷达图形-
图例图例,图表图例配置图例-
提示框提示框,图表提示框配置提示框-
key唯一标识,组件唯一标识string组件 key 值

Props 数值系列

参数名描述类型默认值
name字段编码,数据字段编码string'value'
title系列名,系列名称string'数值'
color颜色,系列颜色,对雷达图填充、边框、标记等生效string-
lineStyle线条样式,雷达图边框线条样式'solid'| 'dashed' | 'dotted''solid'
lineWidth线宽,雷达图边框线宽string2
areaOpacity填充透明度,雷达图内部填充透明度string0.7
showMark显示标记,雷达图系列是否显示标记booleanfalse
markSize标记大小,标记图形大小string8
markType标记类型,标记图形类型'circle' | 'emptyCircle' | 'rect' | 'roundRect' | 'triangle' | 'diamond' | 'pin' | 'arrow''circle'
showLabel显示标签,雷达图系列是否显示标签,前提需要显示标记booleanfalse
labelFontSize字号,雷达图标签字号string12
labelColor颜色,雷达图标签颜色string'#FFF'

Props 标题

参数名描述类型默认值
showTitle显示标题,图表标题是否显示booleanfalse
title主标题,图表主标题string'主标题'
subTitle副标题,图表副标题string'副标题'
customTtile自定义参数(title),code

Props 雷达图形

参数名描述类型默认值
centerLeft圆心左边距,雷达图圆心距离画布左侧边距string'50%'
centerTop圆心上边距,雷达图圆心距离画布上侧边距string'50%'
showAxisLine显示轴线,是否显示轴线booleantrue
axisLineStyle轴线样式,轴线样式'solid'| 'dashed' | 'dotted''solid'
axisLineWidth轴线线宽,轴线线宽string1
axisLineColor轴线颜色,轴线颜色string'#333333'
showSplitLine显示分隔线,是否显示分隔线booleantrue
splitLineStyle分隔线样式,分隔线样式'solid'| 'dashed' | 'dotted''solid'
splitLineWidth分隔线线宽,分隔线线宽string1
splitLineColor分隔线颜色,分隔线颜色string'#CCCCCC'
showSplitArea显示分隔区域,是否显示分隔区域booleantrue
splitAreaColor1区域填充色 1,分隔区域填充色string'rgba(250,250,250,0.3)'
splitAreaColor2区域填充色 2,分隔区域填充色string'rgba(200,200,200,0.3)'
customRadar自定义参数(radar),code

Props 图例

参数名描述类型默认值
showLegend显示图例,图表图例是否显示booleantrue
legendPosition图例位置,图例显示位置'auto' | 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right''auto'
legendOrient布局方向,图例排列方向'horizontal' | 'vertical''horizontal'
legendWidth宽,图例区域宽度string'auto'
legendHeight高,图例区域高度string'auto'
legendScroll支持滚动,图例超出宽高后是否支持滚动booleanfalse
customLegend自定义参数(legend),code

Props 提示框

参数名描述类型默认值
showTooltip显示提示框,图表提示框是否显示booleantrue
tooltipTrigger触发类型,提示框触发类型'item' | 'axis''item'
tooltipBackgroundColor背景颜色,提示框背景颜色string'rgba(50,50,50,0.7)'
tooltipBorderColor边框颜色,提示框边框颜色string'#333333'
tooltipColor文字颜色,提示框文字颜色string'#FFFFFF'
tooltipFontSize字号,提示框文字字号string14
customTooltip自定义参数(tooltip),code