| 1 |
{ |
| 2 |
"apiVersion": 3, |
| 3 |
"$schema": "https://schemas.wp.org/trunk/block.json", |
| 4 |
"name": "blockenberg/mixed-chart", |
| 5 |
"title": "Mixed Chart", |
| 6 |
"category": "bkbg-charts", |
| 7 |
"icon": "chart-bar", |
| 8 |
"description": "Combination bar + line chart with an optional dual Y-axis. Perfect for overlaying revenue (bar) with growth rate (line) or any two related metrics in the same canvas. Powered by Chart.js CDN.", |
| 9 |
"keywords": [ |
| 10 |
"chart", |
| 11 |
"mixed", |
| 12 |
"combo", |
| 13 |
"bar", |
| 14 |
"line", |
| 15 |
"dual axis", |
| 16 |
"overlay", |
| 17 |
"analytics" |
| 18 |
], |
| 19 |
"textdomain": "blockenberg", |
| 20 |
"editorScript": "bkbg-mixed-chart-editor", |
| 21 |
"editorStyle": "bkbg-mixed-chart-style", |
| 22 |
"style": "bkbg-mixed-chart-style", |
| 23 |
"viewScript": "bkbg-mixed-chart-frontend", |
| 24 |
"supports": { |
| 25 |
"html": false, |
| 26 |
"anchor": true, |
| 27 |
"className": true, |
| 28 |
"align": [ |
| 29 |
"wide", |
| 30 |
"full" |
| 31 |
] |
| 32 |
}, |
| 33 |
"attributes": { |
| 34 |
"chartTitle": { |
| 35 |
"type": "string", |
| 36 |
"default": "Revenue & Growth" |
| 37 |
}, |
| 38 |
"chartSubtitle": { |
| 39 |
"type": "string", |
| 40 |
"default": "Monthly performance overview" |
| 41 |
}, |
| 42 |
"showTitle": { |
| 43 |
"type": "boolean", |
| 44 |
"default": true |
| 45 |
}, |
| 46 |
"showSubtitle": { |
| 47 |
"type": "boolean", |
| 48 |
"default": true |
| 49 |
}, |
| 50 |
"labels": { |
| 51 |
"type": "string", |
| 52 |
"default": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec" |
| 53 |
}, |
| 54 |
"datasetsJson": { |
| 55 |
"type": "string", |
| 56 |
"default": "[{\"id\":\"d1\",\"label\":\"Revenue ($K)\",\"type\":\"bar\",\"color\":\"#6c3fb5\",\"yAxis\":\"y\",\"data\":\"42\\n48\\n55\\n61\\n58\\n72\\n79\\n84\\n88\\n95\\n103\\n118\"},{\"id\":\"d2\",\"label\":\"Growth (%)\",\"type\":\"line\",\"color\":\"#10b981\",\"yAxis\":\"y1\",\"data\":\"5.2\\n6.1\\n7.4\\n9.2\\n8.8\\n11.5\\n12.1\\n13.4\\n14.2\\n15.6\\n16.8\\n18.3\"}]" |
| 57 |
}, |
| 58 |
"dualAxis": { |
| 59 |
"type": "boolean", |
| 60 |
"default": true |
| 61 |
}, |
| 62 |
"yLabel": { |
| 63 |
"type": "string", |
| 64 |
"default": "Revenue ($K)" |
| 65 |
}, |
| 66 |
"y1Label": { |
| 67 |
"type": "string", |
| 68 |
"default": "Growth (%)" |
| 69 |
}, |
| 70 |
"showGrid": { |
| 71 |
"type": "boolean", |
| 72 |
"default": true |
| 73 |
}, |
| 74 |
"showLegend": { |
| 75 |
"type": "boolean", |
| 76 |
"default": true |
| 77 |
}, |
| 78 |
"legendPos": { |
| 79 |
"type": "string", |
| 80 |
"default": "bottom" |
| 81 |
}, |
| 82 |
"barRadius": { |
| 83 |
"type": "number", |
| 84 |
"default": 4 |
| 85 |
}, |
| 86 |
"lineWidth": { |
| 87 |
"type": "number", |
| 88 |
"default": 2 |
| 89 |
}, |
| 90 |
"dotSize": { |
| 91 |
"type": "number", |
| 92 |
"default": 4 |
| 93 |
}, |
| 94 |
"fillAlpha": { |
| 95 |
"type": "number", |
| 96 |
"default": 85 |
| 97 |
}, |
| 98 |
"animate": { |
| 99 |
"type": "boolean", |
| 100 |
"default": true |
| 101 |
}, |
| 102 |
"chartHeight": { |
| 103 |
"type": "number", |
| 104 |
"default": 400 |
| 105 |
}, |
| 106 |
"bgColor": { |
| 107 |
"type": "string", |
| 108 |
"default": "#ffffff" |
| 109 |
}, |
| 110 |
"borderRadius": { |
| 111 |
"type": "number", |
| 112 |
"default": 14 |
| 113 |
}, |
| 114 |
"paddingTop": { |
| 115 |
"type": "number", |
| 116 |
"default": 0 |
| 117 |
}, |
| 118 |
"paddingBottom": { |
| 119 |
"type": "number", |
| 120 |
"default": 0 |
| 121 |
}, |
| 122 |
"titleFontSize": { |
| 123 |
"type": "number", |
| 124 |
"default": 20 |
| 125 |
}, |
| 126 |
"titleFontWeight": { |
| 127 |
"type": "number", |
| 128 |
"default": 700 |
| 129 |
}, |
| 130 |
"titleLineHeight": { |
| 131 |
"type": "number", |
| 132 |
"default": 1.3 |
| 133 |
}, |
| 134 |
"subtitleFontSize": { |
| 135 |
"type": "number", |
| 136 |
"default": 14 |
| 137 |
}, |
| 138 |
"titleTypo": { |
| 139 |
"type": "object", |
| 140 |
"default": {} |
| 141 |
}, |
| 142 |
"subtitleTypo": { |
| 143 |
"type": "object", |
| 144 |
"default": {} |
| 145 |
} |
| 146 |
} |
| 147 |
} |
| 148 |
|