Initial
This commit is contained in:
176
blocks/bar-graph/build/block.json
Normal file
176
blocks/bar-graph/build/block.json
Normal file
@ -0,0 +1,176 @@
|
||||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "lcp/bar-graph",
|
||||
"version": "1.0.0",
|
||||
"title": "Bar Graph",
|
||||
"category": "widgets",
|
||||
"icon": "chart-bar",
|
||||
"description": "Display data as a bar graph using D3.js",
|
||||
"supports": {
|
||||
"html": false
|
||||
},
|
||||
"attributes": {
|
||||
"columnTypes": {
|
||||
"type": "object",
|
||||
"default": {
|
||||
"ID": "lcpText",
|
||||
"Label": "lcpText",
|
||||
"Value": "lcpNumber",
|
||||
"Color": "lcpColor",
|
||||
"Content": "lcpText",
|
||||
"Parent": "lcpText"
|
||||
}
|
||||
},
|
||||
"enableStacked": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"enableHierachical": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"chartData": {
|
||||
"type": "array",
|
||||
"default": [
|
||||
{
|
||||
"ID": "lcpDatapoint-1",
|
||||
"Label": "Sample 1",
|
||||
"Value": 100,
|
||||
"Color": "#007cba",
|
||||
"Content": "<p>First item</p>",
|
||||
"Parent": ""
|
||||
},
|
||||
{
|
||||
"ID": "lcpDatapoint-2",
|
||||
"Label": "Sample 2",
|
||||
"Value": 50,
|
||||
"Color": "#ff0000",
|
||||
"Content": "<p>Second item</p>",
|
||||
"Parent": "lcpDatapoint-1"
|
||||
},
|
||||
{
|
||||
"ID": "lcpDatapoint-3",
|
||||
"Label": "Sample 3",
|
||||
"Value": 30,
|
||||
"Color": "#00ff00",
|
||||
"Content": "<p>Third item</p>",
|
||||
"Parent": ""
|
||||
},
|
||||
{
|
||||
"ID": "lcpDatapoint-4",
|
||||
"Label": "Sample 4",
|
||||
"Value": 20,
|
||||
"Color": "#0000ff",
|
||||
"Content": "<p>Fourth item</p>",
|
||||
"Parent": ""
|
||||
},
|
||||
{
|
||||
"ID": "lcpDatapoint-5",
|
||||
"Label": "Sample 5",
|
||||
"Value": 80,
|
||||
"Color": "#800080",
|
||||
"Content": "<p>Fifth item</p>",
|
||||
"Parent": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"chartHeight": {
|
||||
"type": "string",
|
||||
"default": "400px"
|
||||
},
|
||||
"chartWidth": {
|
||||
"type": "string",
|
||||
"default": "100%"
|
||||
},
|
||||
"idColumn": {
|
||||
"type": "string",
|
||||
"default": "ID"
|
||||
},
|
||||
"barColor": {
|
||||
"type": "string",
|
||||
"default": "#007cba"
|
||||
},
|
||||
"valueColumn": {
|
||||
"type": "string",
|
||||
"default": "Value"
|
||||
},
|
||||
"labelsColumn": {
|
||||
"type": "string",
|
||||
"default": "Label"
|
||||
},
|
||||
"colorColumn": {
|
||||
"type": "string",
|
||||
"default": "Color"
|
||||
},
|
||||
"popoverColumn": {
|
||||
"type": "string",
|
||||
"default": "Content"
|
||||
},
|
||||
"renderLegend": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"legendLocation": {
|
||||
"type": "string",
|
||||
"default": "top"
|
||||
},
|
||||
"legendAlignment": {
|
||||
"type": "string",
|
||||
"default": "left"
|
||||
},
|
||||
"allowDownloadImage": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"downloadImageMaxWidth": {
|
||||
"type": "string",
|
||||
"default": "2000px"
|
||||
},
|
||||
"allowDownloadCsv": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"allowDownloadJson": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"allowFilter": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"allowSorting": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"renderFooter": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"footerContent": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"chartTitle": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"chartSubtitle": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"toolbarLocation": {
|
||||
"type": "string",
|
||||
"default": "bottom"
|
||||
},
|
||||
"toolbarAlignment": {
|
||||
"type": "string",
|
||||
"default": "left"
|
||||
}
|
||||
},
|
||||
"textdomain": "lcp-visualize",
|
||||
"editorScript": "file:./index.js",
|
||||
"editorStyle": "file:./index.css",
|
||||
"style": "file:./style-index.css",
|
||||
"render": "render_block_lcp_bar_graph"
|
||||
}
|
||||
1
blocks/bar-graph/build/index.asset.php
Normal file
1
blocks/bar-graph/build/index.asset.php
Normal file
@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '32e6baadcfdb2c5e9a4b');
|
||||
5
blocks/bar-graph/build/index.css
Normal file
5
blocks/bar-graph/build/index.css
Normal file
File diff suppressed because one or more lines are too long
1
blocks/bar-graph/build/index.js
Normal file
1
blocks/bar-graph/build/index.js
Normal file
File diff suppressed because one or more lines are too long
1
blocks/bar-graph/build/style-index.css
Normal file
1
blocks/bar-graph/build/style-index.css
Normal file
@ -0,0 +1 @@
|
||||
.wp-block-lcp-bar-graph .lcp-bar-graph-container svg{overflow:visible}.wp-block-lcp-bar-graph .lcp-bar-graph-container text{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}
|
||||
Reference in New Issue
Block a user