| 1 |
{ |
| 2 |
"$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 |
"apiVersion": 3, |
| 4 |
"name": "blockenberg/box-plot", |
| 5 |
"title": "Box Plot", |
| 6 |
"category": "bkbg-charts", |
| 7 |
"icon": "chart-bar", |
| 8 |
"description": "Box-and-whisker statistical chart showing min, Q1, median, Q3, max, mean, and outliers for multiple data series.", |
| 9 |
"attributes": { |
| 10 |
"title": { |
| 11 |
"type": "string", |
| 12 |
"default": "Score Distribution by Group" |
| 13 |
}, |
| 14 |
"showTitle": { |
| 15 |
"type": "boolean", |
| 16 |
"default": true |
| 17 |
}, |
| 18 |
"svgWidth": { |
| 19 |
"type": "integer", |
| 20 |
"default": 700 |
| 21 |
}, |
| 22 |
"svgHeight": { |
| 23 |
"type": "integer", |
| 24 |
"default": 380 |
| 25 |
}, |
| 26 |
"padTop": { |
| 27 |
"type": "integer", |
| 28 |
"default": 40 |
| 29 |
}, |
| 30 |
"padLeft": { |
| 31 |
"type": "integer", |
| 32 |
"default": 60 |
| 33 |
}, |
| 34 |
"padRight": { |
| 35 |
"type": "integer", |
| 36 |
"default": 30 |
| 37 |
}, |
| 38 |
"padBottom": { |
| 39 |
"type": "integer", |
| 40 |
"default": 50 |
| 41 |
}, |
| 42 |
"boxWidth": { |
| 43 |
"type": "integer", |
| 44 |
"default": 48 |
| 45 |
}, |
| 46 |
"whiskerWidth": { |
| 47 |
"type": "integer", |
| 48 |
"default": 24 |
| 49 |
}, |
| 50 |
"showGridLines": { |
| 51 |
"type": "boolean", |
| 52 |
"default": true |
| 53 |
}, |
| 54 |
"showMean": { |
| 55 |
"type": "boolean", |
| 56 |
"default": true |
| 57 |
}, |
| 58 |
"showOutliers": { |
| 59 |
"type": "boolean", |
| 60 |
"default": true |
| 61 |
}, |
| 62 |
"showLegend": { |
| 63 |
"type": "boolean", |
| 64 |
"default": true |
| 65 |
}, |
| 66 |
"labelFontSize": { |
| 67 |
"type": "integer", |
| 68 |
"default": 13 |
| 69 |
}, |
| 70 |
"valueFontSize": { |
| 71 |
"type": "integer", |
| 72 |
"default": 10 |
| 73 |
}, |
| 74 |
"bgColor": { |
| 75 |
"type": "string", |
| 76 |
"default": "#ffffff" |
| 77 |
}, |
| 78 |
"gridColor": { |
| 79 |
"type": "string", |
| 80 |
"default": "#f3f4f6" |
| 81 |
}, |
| 82 |
"titleColor": { |
| 83 |
"type": "string", |
| 84 |
"default": "#111827" |
| 85 |
}, |
| 86 |
"textColor": { |
| 87 |
"type": "string", |
| 88 |
"default": "#374151" |
| 89 |
}, |
| 90 |
"series": { |
| 91 |
"type": "array", |
| 92 |
"default": [ |
| 93 |
{ |
| 94 |
"label": "Group A", |
| 95 |
"color": "#6366f1", |
| 96 |
"min": 42, |
| 97 |
"q1": 55, |
| 98 |
"median": 68, |
| 99 |
"mean": 67, |
| 100 |
"q3": 78, |
| 101 |
"max": 95, |
| 102 |
"outliers": [ |
| 103 |
22, |
| 104 |
98 |
| 105 |
] |
| 106 |
}, |
| 107 |
{ |
| 108 |
"label": "Group B", |
| 109 |
"color": "#10b981", |
| 110 |
"min": 38, |
| 111 |
"q1": 60, |
| 112 |
"median": 72, |
| 113 |
"mean": 70, |
| 114 |
"q3": 82, |
| 115 |
"max": 91, |
| 116 |
"outliers": [ |
| 117 |
15 |
| 118 |
] |
| 119 |
}, |
| 120 |
{ |
| 121 |
"label": "Group C", |
| 122 |
"color": "#f59e0b", |
| 123 |
"min": 50, |
| 124 |
"q1": 58, |
| 125 |
"median": 65, |
| 126 |
"mean": 64, |
| 127 |
"q3": 74, |
| 128 |
"max": 88, |
| 129 |
"outliers": [ |
| 130 |
100 |
| 131 |
] |
| 132 |
}, |
| 133 |
{ |
| 134 |
"label": "Group D", |
| 135 |
"color": "#ef4444", |
| 136 |
"min": 30, |
| 137 |
"q1": 45, |
| 138 |
"median": 58, |
| 139 |
"mean": 60, |
| 140 |
"q3": 72, |
| 141 |
"max": 90, |
| 142 |
"outliers": [ |
| 143 |
10, |
| 144 |
105 |
| 145 |
] |
| 146 |
} |
| 147 |
] |
| 148 |
}, |
| 149 |
"typoTitle": { |
| 150 |
"type": "object", |
| 151 |
"default": {} |
| 152 |
} |
| 153 |
}, |
| 154 |
"supports": { |
| 155 |
"align": [ |
| 156 |
"wide", |
| 157 |
"full" |
| 158 |
] |
| 159 |
}, |
| 160 |
"editorScript": "bkbg-box-plot-editor", |
| 161 |
"style": "bkbg-box-plot-style" |
| 162 |
} |
| 163 |
|