Skip to content

Commit 591f0ff

Browse files
Merge pull request #143 from devgateway/defaults-removal
refactor: clean up code formatting and reset default map block attrib…
2 parents b8d9409 + c3cc963 commit 591f0ff

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

plugins/wp-react-blocks-plugin/blocks/map/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A Gutenberg block that renders an interactive choropleth/symbol map by embedding
1313
| `csv` | `String` | `""` | Inline CSV data used when `app` is `"csv"`. |
1414
| `dimension1` | `String` | `"zone"` | Primary geographic dimension field. |
1515
| `dimension2` | `String` | `"gender"` | Secondary dimension field (e.g. for disaggregation). |
16-
| `measures` | `Array` | `["prevalenceSmokeAny"]` | Measure fields to visualise on the map. |
16+
| `measures` | `Array` | `[]` | Measure fields to visualise on the map. Must be configured; no measure is pre-selected by default. |
1717
| `filters` | `Array` | `[]` | Active filter values passed as query params to the data API. |
1818
| `mapFile` | `String` | `""` | Path (relative to the UI app) to the TopoJSON map file. |
1919
| `mapCenter` | `String` | `"NGA"` | Country/region key that determines the initial map centre and zoom scale (e.g. `"NGA"`, `"KEN"`, `"Africa"`). |

plugins/wp-react-blocks-plugin/blocks/map/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ registerBlockType(BLOCKS_NS + '/map',
4141
},
4242
measures: {
4343
type: "Array",
44-
default: ["prevalenceSmokeAny"]
44+
default: []
4545
},
4646
filters: {
4747
type: "Array",
@@ -54,11 +54,11 @@ registerBlockType(BLOCKS_NS + '/map',
5454
},
5555
nationalAverageLabel: {
5656
type: "String",
57-
default: "National Prevalence Avg"
57+
default: "National Avg"
5858
},
5959
legendTitle: {
6060
type: "String",
61-
default: "Tobacco Prevalence Rate"
61+
default: "Rate"
6262
},
6363
types: {
6464
type: "Array",

0 commit comments

Comments
 (0)