| 1 |
{ |
| 2 |
"$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 |
"apiVersion": 3, |
| 4 |
"name": "blockenberg/waffle-chart", |
| 5 |
"version": "1.0.0", |
| 6 |
"title": "Waffle Chart", |
| 7 |
"category": "bkbg-charts", |
| 8 |
"icon": "grid-view", |
| 9 |
"description": "Proportional 10×10 grid where each cell represents 1%. An intuitive and visually engaging alternative to pie charts for showing progress and part-to-whole relationships.", |
| 10 |
"keywords": [ |
| 11 |
"waffle", |
| 12 |
"chart", |
| 13 |
"grid", |
| 14 |
"proportion", |
| 15 |
"percent", |
| 16 |
"unit chart", |
| 17 |
"progress" |
| 18 |
], |
| 19 |
"textdomain": "blockenberg", |
| 20 |
"editorScript": "bkbg-waffle-chart-editor", |
| 21 |
"style": "bkbg-waffle-chart-style", |
| 22 |
"supports": { |
| 23 |
"html": false, |
| 24 |
"align": [ |
| 25 |
"wide", |
| 26 |
"full" |
| 27 |
] |
| 28 |
}, |
| 29 |
"attributes": { |
| 30 |
"title": { |
| 31 |
"type": "string", |
| 32 |
"default": "Budget Allocation" |
| 33 |
}, |
| 34 |
"showTitle": { |
| 35 |
"type": "boolean", |
| 36 |
"default": true |
| 37 |
}, |
| 38 |
"cellSize": { |
| 39 |
"type": "number", |
| 40 |
"default": 28 |
| 41 |
}, |
| 42 |
"cellGap": { |
| 43 |
"type": "number", |
| 44 |
"default": 3 |
| 45 |
}, |
| 46 |
"cellRadius": { |
| 47 |
"type": "number", |
| 48 |
"default": 4 |
| 49 |
}, |
| 50 |
"showLegend": { |
| 51 |
"type": "boolean", |
| 52 |
"default": true |
| 53 |
}, |
| 54 |
"showPercent": { |
| 55 |
"type": "boolean", |
| 56 |
"default": true |
| 57 |
}, |
| 58 |
"showValues": { |
| 59 |
"type": "boolean", |
| 60 |
"default": false |
| 61 |
}, |
| 62 |
"legendFontSize": { |
| 63 |
"type": "number", |
| 64 |
"default": 13 |
| 65 |
}, |
| 66 |
"titleTypo": { |
| 67 |
"type": "object", |
| 68 |
"default": {} |
| 69 |
}, |
| 70 |
"legendTypo": { |
| 71 |
"type": "object", |
| 72 |
"default": {} |
| 73 |
}, |
| 74 |
"emptyColor": { |
| 75 |
"type": "string", |
| 76 |
"default": "#f3f4f6" |
| 77 |
}, |
| 78 |
"bgColor": { |
| 79 |
"type": "string", |
| 80 |
"default": "#ffffff" |
| 81 |
}, |
| 82 |
"titleColor": { |
| 83 |
"type": "string", |
| 84 |
"default": "#111827" |
| 85 |
}, |
| 86 |
"textColor": { |
| 87 |
"type": "string", |
| 88 |
"default": "#374151" |
| 89 |
}, |
| 90 |
"segments": { |
| 91 |
"type": "array", |
| 92 |
"default": [ |
| 93 |
{ |
| 94 |
"label": "Engineering", |
| 95 |
"value": 38, |
| 96 |
"color": "#4f46e5" |
| 97 |
}, |
| 98 |
{ |
| 99 |
"label": "Marketing", |
| 100 |
"value": 22, |
| 101 |
"color": "#0891b2" |
| 102 |
}, |
| 103 |
{ |
| 104 |
"label": "Operations", |
| 105 |
"value": 18, |
| 106 |
"color": "#059669" |
| 107 |
}, |
| 108 |
{ |
| 109 |
"label": "Sales", |
| 110 |
"value": 12, |
| 111 |
"color": "#d97706" |
| 112 |
}, |
| 113 |
{ |
| 114 |
"label": "HR & Admin", |
| 115 |
"value": 10, |
| 116 |
"color": "#dc2626" |
| 117 |
} |
| 118 |
] |
| 119 |
} |
| 120 |
} |
| 121 |
} |
| 122 |
|