📄 原始资料 (已截断) | 展开查看原始 JSON(pie-chart.json)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "bricks://elements/pie-chart",
"schemaVersion": "2.3",
"type": "object",
"title": "Pie Chart",
"description": "Schema for Bricks Pie Chart element",
"metadata": {
"name": "pie-chart",
"category": "general",
"tag": "div",
"nestable": false
},
"settings": {
"percent": {
"label": "Percentage",
"default": "60",
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Value with unit (e.g., \"10px\", \"50%\")",
"descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
},
{
"type": "number"
}
]
},
"controlType": "number",
"labelZh": "百分比"
},
"size": {
"label": "Chart size in px",
"css": [
{
"property": "height"
}
],
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Value with unit (e.g., \"10px\", \"50%\")",
"descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
},
{
"type": "number"
}
]
},
"controlType": "number",
"labelZh": "图表尺寸(像素)"
},
"lineWidth": {
"label": "Line width in px",
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Value with unit (e.g., \"10px\", \"50%\")",
"descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
},
{
"type": "number"
}
]
},
"controlType": "number",
"labelZh": "线条宽度(像素)"
},
"lineCap": {
"label": "Line cap",
"options": {
"butt": "Butt",
"round": "Round",
"square": "Square",
"buttZh": "平头",
"roundZh": "圆形",
"squareZh": "方形"
},
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Single selection",
"descriptionZh": "单选。"
},
{
"type": "array",
"items": {
"type": "string"
},
"description": "Multiple selection",
"descriptionZh": "多选。"
}
]
},
"controlType": "select",
"labelZh": "线条端点"
},
"content": {
"label": "Content",
"default": "percent",
"options": {
"percent": "Percent",
"icon": "Icon",
"text": "Text",
"percentZh": "百分比",
"iconZh": "图标",
"textZh": "文本"
},
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Single selection",
"descriptionZh": "单选。"
},
{
"type": "array",
"items": {
"type": "string"
},
"description": "Multiple selection",
"descriptionZh": "多选。"
}
]
},
"controlType": "select",
"labelZh": "内容"
},
"icon": {
"label": "Icon",
"hasRequired": true,
"valueSchema": {
"type": "object",
"description": "Icon settings",
"properties": {
"library": {
"type": "string"
},
"icon": {
"type": "string"
},
"svg": {
"type": "object"
}
},
"descriptionZh": "图标设置。"
},
"controlType": "icon",
"labelZh": "图标"
},
"text": {
"label": "Text",
"hasRequired": true,
"valueSchema": {
"type": "string"
},
"controlType": "text",
"labelZh": "文本"
},
"barColor": {
"label": "Bar color",
"valueSchema": {
"description": "Color value in various formats",
"oneOf": [
{
"type": "object",
"properties": {
"hex": {
"type": "string",
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
}
},
"required": [
"hex"
]
},
{
"type": "object",
"properties": {
"rgb": {
"type": "string",
"pattern": "^rgba?\\("
}
},
"required": [
"rgb"
]
},
{
"type": "object",
"properties": {
"hsl": {
"type": "string",
"pattern": "^hsla?\\("
}
},
"required": [
"hsl"
]
},
{
"type": "object",
"properties": {
"raw": {
"type": "string",
"description": "Raw color value or CSS variable",
"descriptionZh": "原始颜色值或 CSS 变量。"
}
},
"required": [
"raw"
]
}
],
"descriptionZh": "各种格式的颜色值。"
},
"controlType": "color",
"labelZh": "条颜色"
},
"trackColor": {
"label": "Track color",
"valueSchema": {
"description": "Color value in various formats",
"oneOf": [
{
"type": "object",
"properties": {
"hex": {
"type": "string",
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
}
},
"required": [
"hex"
]
},
{
"type": "object",
"properties": {
"rgb": {
"type": "string",
"pattern": "^rgba?\\("
}
},
"required": [
"rgb"
]
},
{
"type": "object",
"properties": {
"hsl": {
"type": "string",
"pattern": "^hsla?\\("
}
},
"required": [
"hsl"
]
},
{
"type": "object",
"properties": {
"raw": {
"type": "string",
"description": "Raw color value or CSS variable",
"descriptionZh": "原始颜色值或 CSS 变量。"
}
},
"required": [
"raw"
]
}
],
"descriptionZh": "各种格式的颜色值。"
},
"controlType": "color",
"labelZh": "轨道颜色"
},
"scaleLength": {
"label": "Scale length in px",
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Value with unit (e.g., \"10px\", \"50%\")",
"descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
},
{
"type": "number"
}
]
},
"controlType": "number",
"labelZh": "刻度长度(像素)"
},
"scaleColor": {
"label": "Scale color",
"hasRequired": true,
"valueSchema": {
"description": "Color value in various formats",
"oneOf": [
{
"type": "object",
"properties": {
"hex": {
"type": "string",
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
}
},
"required": [
"hex"
]
},
{
"type": "object",
"properties": {
"rgb": {
"type": "string",
"pattern": "^rgba?\\("
}
},
"required": [
"rgb"
]
},
{
"type": "object",
"properties": {
"hsl": {
"type": "string",
"pattern": "^hsla?\\("
}
... (内容过长已截断,完整 JSON 见原始文件)