111 lines
2.3 KiB
JSON
111 lines
2.3 KiB
JSON
{
|
|
"order": 4,
|
|
"key": "pie-chart",
|
|
"type": "pie-chart",
|
|
"name": "饼图",
|
|
"description": "展示各部分占整体的比例,适合类目不多的占比数据",
|
|
"tags": [
|
|
"charts",
|
|
"饼图",
|
|
"pie-chart"
|
|
],
|
|
"renderer": "echarts",
|
|
"group": "charts",
|
|
"icon": "solar:pie-chart-2-bold",
|
|
"usage_notes": [
|
|
"默认图表数据仅用于演示,不是真实业务数据",
|
|
"通过顶层 dataId 关联已有数据源,当前后端尚未实现绑定操作"
|
|
],
|
|
"field_groups": [
|
|
"node-base",
|
|
"chart-title",
|
|
"chart-legend",
|
|
"chart-palette",
|
|
"chart-item-series",
|
|
"chart-dataset",
|
|
"chart-encode-item"
|
|
],
|
|
"event_groups": [
|
|
"dom-events",
|
|
"chart-events"
|
|
],
|
|
"rows_path": "props.option.dataset.source",
|
|
"data_source": true,
|
|
"schema": {
|
|
"type": "pie-chart",
|
|
"name": "饼图",
|
|
"layout": {
|
|
"x": 0,
|
|
"y": 0,
|
|
"width": 400,
|
|
"height": 260
|
|
},
|
|
"props": {
|
|
"option": {
|
|
"color": [
|
|
"#409eff",
|
|
"#67c23a",
|
|
"#e6a23c",
|
|
"#f56c6c",
|
|
"#909399"
|
|
],
|
|
"legend": {
|
|
"top": 38,
|
|
"left": "center",
|
|
"itemWidth": 12,
|
|
"itemHeight": 8,
|
|
"show": true
|
|
},
|
|
"title": {
|
|
"text": "访问来源占比",
|
|
"top": 8,
|
|
"left": "center",
|
|
"textStyle": {
|
|
"fontSize": 16
|
|
}
|
|
},
|
|
"tooltip": {
|
|
"trigger": "item"
|
|
},
|
|
"dataset": {
|
|
"source": [
|
|
{
|
|
"channel": "搜索引擎",
|
|
"value": 1048
|
|
},
|
|
{
|
|
"channel": "直接访问",
|
|
"value": 735
|
|
},
|
|
{
|
|
"channel": "社交媒体",
|
|
"value": 484
|
|
},
|
|
{
|
|
"channel": "广告投放",
|
|
"value": 300
|
|
}
|
|
]
|
|
},
|
|
"series": [
|
|
{
|
|
"name": "访问来源",
|
|
"type": "pie",
|
|
"center": [
|
|
"50%",
|
|
"62%"
|
|
],
|
|
"avoidLabelOverlap": true,
|
|
"encode": {
|
|
"itemName": "channel",
|
|
"value": "value"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"style": null,
|
|
"events": []
|
|
}
|
|
}
|