和series配置同级设置dataRange
splitList根据数值设置颜色
dataRange: {
show: false,
x: "right",
backgroundColor: 'rgba(0,0,0,0)',
padding: 5, // 值域内边距,单位px,默认各方向内边距为5,
// 接受数组分别设定上右下左边距,同css
itemGap: 10, // 各个item之间的间隔,单位px,默认为10,
// 横向布局时为水平间隔,纵向布局时为纵向间隔
itemWidth: 20, // 值域图形宽度,线性渐变水平布局宽度为该值 * 10
itemHeight: 14, // 值域图形高度,线性渐变垂直布局高度为该值 * 10
splitNumber: 5, // 分割段数,默认为5,为0时为线性渐变
color: ['#1e90ff', '#f0ffff'],//颜色
borderColor: '#ccc', // 值域边框颜色
borderWidth: 10, // 值域边框线宽,单位px,默认为0(无边框)
textStyle: {
color: '#fff'
},
y: "bottom",
splitList: [
{ start: 50, end: 100, color: "rgba(12, 222, 255, 0.2)" },
{ start: 0, end: 49, color: "rgba(255, 129, 19, 0.25)" },
],
},