说明:ECharts 配置极多,下面是开发高频枚举清单 ,按组件分类;
boolean统一只有true/false,不再重复写;left/top/right/bottom位置枚举统一:left / center / right(横向)、top / middle / bottom(纵向),也支持百分比、像素数字。
一、xAxis / yAxis 坐标轴
- type
category类目轴|value数值轴|time时间轴|log对数轴 - axisPointer.type (坐标轴指示器)
line直线|shadow阴影|cross十字准星|none无 - axisLabel.align
left|right|center - axisTick.alignWithLabel:true/false
- nameLocation (坐标轴名称位置)
start|middle|end
二、tooltip 提示框
- trigger
item图形触发(饼/散点)|axis坐标轴触发(柱状/折线)|none不触发 - triggerOn
mousemove|click|mousemove|click|none - axisPointer.type 和上面坐标轴一致:
line/shadow/cross/none - order (多系列提示排序)
seriesAsc|seriesDesc|valueAsc|valueDesc
三、legend 图例
- orient 排布方向
horizontal横向|vertical纵向 - align
left|right - selectedMode
true单选|false关闭|'single'单选|'multiple'多选
四、visualMap 视觉映射(你前面问的 calculable 在这)
- type
continuous连续滑块|piecewise分段离散 - orient
horizontal|vertical - calculable:true/false 👉 开启拖拽手柄(仅 continuous 常用)
- hoverLink:true/false
- inRange/outOfRange 映射维度key
color/symbolSize/opacity/colorAlpha/colorLightness/colorSaturation/colorHue
五、dataZoom 数据缩放
- type
slider显示滑块|inside内置(鼠标滚轮/拖拽,无UI) - orient
horizontal|vertical - zoomLock:true/false,锁定缩放,只能平移
- filterMode
filter|weakFilter|empty|none
六、toolbox 工具箱
- feature 内置可用key:
saveAsImage/dataView/restore/dataZoom/magicType/brush - magicType.type (图表切换)
line|bar|stack|tiled
七、series【最重要:type 全集】
arduino
bar 柱状图
line 折线图
pie 饼图
scatter 散点图
effectScatter 涟漪特效散点
candlestick K线图
radar 雷达图
heatmap 热力图
map 地图
lines 轨迹线图
graph 关系图
tree 树图
treemap 矩形树图
sunburst 旭日图
boxplot 箱线图
parallel 平行坐标
gauge 仪表盘
funnel 漏斗图
sankey 桑基图
themeRiver 主题河流图
pictorialBar 象形柱图
custom 自定义系列(renderItem)
series 公共子枚举
- symbol (点标记)
circle圆|rect矩形|roundRect圆角矩形|triangle三角|diamond菱形|pin水滴|arrow箭头|none不显示 - label.position (标签位置,不同图略有差异,通用)
top|bottom|left|right|inside|center> 饼图额外:outer|inner - stack :字符串,相同字符串堆叠;
null不堆叠 - sampling (折线降采样)
lttb|average|max|min|sum - areaStyle.origin (面积图起点)
auto|start|end - barLayout :
horizontal|vertical(条形图)
饼图专属枚举
- roseType:
false/'radius'/'area'(南丁格尔玫瑰)
仪表盘 gauge
- anchorPoint:
auto/ x,y - pointer.type:
'auto'
八、brush 刷选组件
- brushMode
single|multiple - brushType
rect矩形|polygon多边形|lineX横向|lineY纵向|circle圆形
九、timeline 时间轴
- orient :
horizontal/vertical - axisType :
category/value/time
十、polar / radiusAxis / angleAxis 极坐标
- radiusAxis / angleAxis 的
type:category / value / time / log - axisPointer 和 grid 坐标轴一致
十一、全局&动画相关
- animationEasing (缓动,高频)
linear/cubicIn/cubicOut/cubicInOut/elasticOut/bounceOut - stateAnimation.easing 同上
- blendMode (图形叠加,series.itemStyle)
source-over|lighter|multiply|screen
十二、文本样式通用枚举(所有 textStyle / label)
- fontStyle
normal|italic|oblique - fontWeight
normal|bold|bolder|lighter|数字(100~900) - align 水平对齐:
left/center/right - verticalAlign 垂直对齐:
top/middle/bottom
十三、markPoint / markLine / markArea
- symbol 和 series.symbol 一致
- markLine.symbol 两端标记:数组
['circle','arrow']