colorSeries表示组件的配置项类型为颜色系列

配置项说明

字段名 含义 类型 是否必选 备注
name 显示名 string
type 类型 string
fixedComponents 默认color组件组合类型 array 未开启映射功能下,
显示的颜色组件类型
default 默认值 object 属性说明见值说明
mapping 是否默认开启映射 boolean
fixed 非映射的默认颜色 string
object
scale 开启映射时的颜色配置 object
type 颜色映射类型 string ordinal:名词分类
linear:数值连续
threshold:数值分区
scheme 颜色映射模板 string 内置类型,待补充
custom 是否自定义映射 boolean
range 颜色区间集合 array
domain 颜色映射的对应值 array
excepted 其他值对应的颜色 string
abnormal 异常值对应的颜色 string

值说明

条件 数据类型 示例 默认值
object {
“type”: “ordinal”,
“scheme”: “cat-1”,
“custom”: false,
“range”: [],
“domain”: [],
“excepted”: “yellow”,
“abnormal”: “red”
}
{
“type”: “ordinal”,
“scheme”: “cat-1”,
“custom”: false,
“range”: [],
“domain”: [],
“excepted”: “yellow”,
“abnormal”: “ transparent”
}

配置示例

image.png
image.png
image.png

  1. "colorSeries": {
  2. "name": "系列色",
  3. "type": "colorSeries",
  4. "fixedComponents": ["flat","linearGradient"],
  5. "default": {
  6. "mapping": true,
  7. "fixed": { "type": "flat", "value": "#2483ff" },
  8. "scale": {
  9. "type": "ordinal",
  10. "scheme": "cat-1",
  11. "custom": false,
  12. "range": ["#2782e7","#2dc0ee","#34fff5"],
  13. "domain": [],
  14. "excepted": "yellow",
  15. "abnormal": "transparent"
  16. }
  17. }
  18. }