此段代码中的pieces我想设置0-10,10-100,分级显示,但是代码中只能填写一个数,应该怎么设置才能分范围显示呢。
visualMap: {
type: 'piecewise',
inverse: true,
top: 10,
left: 10,
pieces: [
{value:0 ,color: COLORS[5]}
],
borderColor: '#ccc',
borderWidth: 2,
backgroundColor: '#eee',
dimension: 2,
inRange: {
color: COLORS,
opacity: 0.7
}
},
visualMap: {
// 左下角的颜色区域
type: "piecewise", // 定义为分段型 visualMap
min: 0,
max: 1000,
itemWidth: 40,
bottom: 60,
left: 20,
pieces: [
// 自定义『分段式视觉映射组件(visualMapPiecewise)』的每一段的范围,以及每一段的文字,以及每一段的特别的样式
{ gt: 100000, lte: 1000000000, label: "100000~1000000000", color: "#6ad86e" }, // (900, 1000]
{ gt: 10000, lte: 100000, label: "10000~100000", color: "#9adcfa" }, // (500, 900]
{ gt: 1000, lte: 10000, label: "1000~10000", color: "#ffeb3b" }, // (310, 500]
{ gt: 10, lte: 1000, label: "10~1000", color: "#ff9800" }, // (200, 300]
{ gt: 0, lte: 10, label: "0~10人", color: "orangered" }, // (10, 200]
{ value:0, label: "无数据", color: "#999" } // [0]
]
},