| 1 |
{ |
| 2 |
"$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 |
"apiVersion": 3, |
| 4 |
"name": "blockenberg/bullet-chart", |
| 5 |
"title": "Bullet Chart", |
| 6 |
"category": "bkbg-charts", |
| 7 |
"icon": "chart-bar", |
| 8 |
"description": "Stephen Few's bullet chart — shows actual performance against a target, with background bands for Poor / Satisfactory / Good ranges.", |
| 9 |
"attributes": { |
| 10 |
"title": { |
| 11 |
"type": "string", |
| 12 |
"default": "2024 KPI Dashboard" |
| 13 |
}, |
| 14 |
"showTitle": { |
| 15 |
"type": "boolean", |
| 16 |
"default": true |
| 17 |
}, |
| 18 |
"svgWidth": { |
| 19 |
"type": "integer", |
| 20 |
"default": 680 |
| 21 |
}, |
| 22 |
"padTop": { |
| 23 |
"type": "integer", |
| 24 |
"default": 16 |
| 25 |
}, |
| 26 |
"padLeft": { |
| 27 |
"type": "integer", |
| 28 |
"default": 160 |
| 29 |
}, |
| 30 |
"padRight": { |
| 31 |
"type": "integer", |
| 32 |
"default": 60 |
| 33 |
}, |
| 34 |
"rowHeight": { |
| 35 |
"type": "integer", |
| 36 |
"default": 52 |
| 37 |
}, |
| 38 |
"barThickness": { |
| 39 |
"type": "integer", |
| 40 |
"default": 16 |
| 41 |
}, |
| 42 |
"targetWidth": { |
| 43 |
"type": "integer", |
| 44 |
"default": 4 |
| 45 |
}, |
| 46 |
"showValues": { |
| 47 |
"type": "boolean", |
| 48 |
"default": true |
| 49 |
}, |
| 50 |
"showGridLines": { |
| 51 |
"type": "boolean", |
| 52 |
"default": true |
| 53 |
}, |
| 54 |
"labelFontSize": { |
| 55 |
"type": "integer", |
| 56 |
"default": 13 |
| 57 |
}, |
| 58 |
"valueFontSize": { |
| 59 |
"type": "integer", |
| 60 |
"default": 10 |
| 61 |
}, |
| 62 |
"bandColorPoor": { |
| 63 |
"type": "string", |
| 64 |
"default": "#f3f4f6" |
| 65 |
}, |
| 66 |
"bandColorSat": { |
| 67 |
"type": "string", |
| 68 |
"default": "#e5e7eb" |
| 69 |
}, |
| 70 |
"bandColorGood": { |
| 71 |
"type": "string", |
| 72 |
"default": "#d1d5db" |
| 73 |
}, |
| 74 |
"targetColor": { |
| 75 |
"type": "string", |
| 76 |
"default": "#111827" |
| 77 |
}, |
| 78 |
"bgColor": { |
| 79 |
"type": "string", |
| 80 |
"default": "#ffffff" |
| 81 |
}, |
| 82 |
"gridColor": { |
| 83 |
"type": "string", |
| 84 |
"default": "#f3f4f6" |
| 85 |
}, |
| 86 |
"titleColor": { |
| 87 |
"type": "string", |
| 88 |
"default": "#111827" |
| 89 |
}, |
| 90 |
"labelColor": { |
| 91 |
"type": "string", |
| 92 |
"default": "#374151" |
| 93 |
}, |
| 94 |
"series": { |
| 95 |
"type": "array", |
| 96 |
"default": [ |
| 97 |
{ |
| 98 |
"label": "Revenue ($k)", |
| 99 |
"color": "#6366f1", |
| 100 |
"actual": 270, |
| 101 |
"target": 300, |
| 102 |
"poor": 100, |
| 103 |
"sat": 200, |
| 104 |
"good": 300, |
| 105 |
"max": 350 |
| 106 |
}, |
| 107 |
{ |
| 108 |
"label": "Users (k)", |
| 109 |
"color": "#10b981", |
| 110 |
"actual": 42, |
| 111 |
"target": 50, |
| 112 |
"poor": 20, |
| 113 |
"sat": 35, |
| 114 |
"good": 50, |
| 115 |
"max": 60 |
| 116 |
}, |
| 117 |
{ |
| 118 |
"label": "Conversion %", |
| 119 |
"color": "#f59e0b", |
| 120 |
"actual": 3.8, |
| 121 |
"target": 5.0, |
| 122 |
"poor": 1, |
| 123 |
"sat": 3, |
| 124 |
"good": 5, |
| 125 |
"max": 7 |
| 126 |
}, |
| 127 |
{ |
| 128 |
"label": "NPS Score", |
| 129 |
"color": "#ef4444", |
| 130 |
"actual": 42, |
| 131 |
"target": 60, |
| 132 |
"poor": 0, |
| 133 |
"sat": 30, |
| 134 |
"good": 60, |
| 135 |
"max": 80 |
| 136 |
} |
| 137 |
] |
| 138 |
}, |
| 139 |
"typoTitle": { |
| 140 |
"type": "object", |
| 141 |
"default": {} |
| 142 |
} |
| 143 |
}, |
| 144 |
"supports": { |
| 145 |
"align": [ |
| 146 |
"wide", |
| 147 |
"full" |
| 148 |
] |
| 149 |
}, |
| 150 |
"editorScript": "bkbg-bullet-chart-editor", |
| 151 |
"style": "bkbg-bullet-chart-style" |
| 152 |
} |
| 153 |
|