cartodb/lib/formats/legends/definitions/custom.json

38 lines
742 B
JSON
Raw Normal View History

2020-06-15 10:58:47 +08:00
{
"type": "object",
"additionalProperties": false,
"anyOf": [
{ "required": ["categories"] },
{ "required": ["html"] }
],
"properties": {
"categories": {
"type": "array",
"required": [
"title"
],
"additionalProperties": false,
"items": {
"type": "object",
"required": [
"title"
],
"additionalProperties": false,
"properties": {
"title": {
"type": "string"
},
"color": {
"type": "string",
"pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$"
},
"icon": {
"type": "string"
}
}
}
},
"html": { "type": "string" }
}
}