Skip to content

Commit 0d6a8fb

Browse files
lhawkman27lhawkinsclaude
authored
Fix up wiki docs within GitHub (#348)
* Fix broken wiki links, update screenshots, and fix defaultLegendName bug - Fix 9 broken internal wiki links across Home, Getting-Started, GeoSet-Map-Layer, and GeoSet-Multi-Map pages (removed "Chart" suffix and corrected "Sample Data and Demo Dashboards" to "Sample Dashboards") - Update wiki screenshots with current UI images - Fix defaultLegendName/defaultLegendNames mismatch: frontend was reading plural "defaultLegendNames" but schema uses singular "defaultLegendName", causing the feature to silently not work - Update GeoSet-Map-Layer.md: move pointSize out of globalColoring (V4), add dynamic pointSize docs, update range to 1-200, list all pointType values - Clarify PR #319 TODO note in JSON-Config-Spec.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: update wiki JSON Config Spec and fix wiki page titles Add a complete example section to the JSON Config Spec wiki page showing all configuration fields together. Also fix H1 titles in three wiki pages to match their filenames and cross-link targets. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: lhawkins <lhawkins@teamraft.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c49f1f8 commit 0d6a8fb

8 files changed

Lines changed: 140 additions & 68 deletions

File tree

superset-frontend/plugins/geoset-map-chart/src/layers/GeoSetLayer/GeoSetLayer.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -806,13 +806,13 @@ const DeckGLGeoJson = (props: DeckGLGeoJsonProps) => {
806806
propVisualConfig?.fillColor || formData.fillColorPicker,
807807
);
808808

809-
// Extract defaultLegendNames from geojsonConfig for null category substitution
809+
// Extract defaultLegendName from geojsonConfig for null category substitution
810810
const getDefaultLegendNames = (config: any): string[] => {
811811
try {
812812
const parsed =
813813
typeof config === 'string' ? JSON.parse(config) : (config ?? {});
814-
return Array.isArray(parsed?.colorByCategory?.defaultLegendNames)
815-
? parsed.colorByCategory.defaultLegendNames
814+
return Array.isArray(parsed?.colorByCategory?.defaultLegendName)
815+
? parsed.colorByCategory.defaultLegendName
816816
: ['Other'];
817817
} catch {
818818
return ['Other'];
@@ -867,11 +867,11 @@ const DeckGLGeoJson = (props: DeckGLGeoJsonProps) => {
867867
console.warn('🚨 Failed to parse categoryColorMapping', err);
868868
}
869869

870-
// Extract defaultLegendNames from parsed config
870+
// Extract defaultLegendName from parsed config
871871
const defaultLegendNames = Array.isArray(
872-
(parsedGeojsonConfig as any)?.colorByCategory?.defaultLegendNames,
872+
(parsedGeojsonConfig as any)?.colorByCategory?.defaultLegendName,
873873
)
874-
? (parsedGeojsonConfig as any).colorByCategory.defaultLegendNames
874+
? (parsedGeojsonConfig as any).colorByCategory.defaultLegendName
875875
: ['Other'];
876876

877877
setCategories(

superset-frontend/plugins/geoset-map-chart/src/transformProps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ export default function transformProps(chartProps: ChartProps) {
324324
: categoryColorMapping || {};
325325

326326
// Extract default legend names, fallback to ['Other']
327-
const defaultLegendNames = Array.isArray(colorByCategory?.defaultLegendNames)
328-
? colorByCategory.defaultLegendNames
327+
const defaultLegendNames = Array.isArray(colorByCategory?.defaultLegendName)
328+
? colorByCategory.defaultLegendName
329329
: ['Other'];
330330

331331
// For Line/LineString geometries, use strokeColor as the fallback for category coloring

wiki/GeoSet-Map-Layer.md

Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
# GeoSet Map Layer Chart
1+
# GeoSet Map Layer
22

3-
The **GeoSet Map Layer** (`deck_geoset_map_layer`) is the core chart type for rendering geospatial data. It renders a single layer of geographic features on an interactive map and is the building block for [[GeoSet Multi Map Chart|multi-layer maps]].
3+
The **GeoSet Map Layer** (`deck_geoset_map_layer`) is the core chart type for rendering geospatial data. It renders a single layer of geographic features on an interactive map and is the building block for [[GeoSet Multi Map|multi-layer maps]].
44

5-
<img width="1615" height="450" alt="Screenshot 2026-02-23 at 4 07 24 PM" src="https://github.com/user-attachments/assets/f30a0684-cac2-4106-bd96-6bd614e1d24e" />
5+
<img width="1615" height="500" alt="Screenshot 2026-02-23 at 4 07 24 PM" src="https://github.com/user-attachments/assets/f30a0684-cac2-4106-bd96-6bd614e1d24e" />
66

77
## Creating a Chart
88
1. In Superset, go to **Charts → + Chart**
99
2. Select your dataset and choose **GeoSet Map Layer** as the chart type
1010
3. In the **Map Configuration** panel, configure your layer
1111

12-
<p>
13-
<img width="49%" height="400" alt="geoset-chart-selection" src="https://github.com/user-attachments/assets/7285be19-92e5-43ea-beec-4cd6e17b9243" />
14-
<img width="49%" height="400" alt="geojson-config-control-chart-builder" src="https://github.com/user-attachments/assets/6d4aceef-c572-4e87-8898-cec13b70bafc" />
15-
</p>
12+
<img width="1912" height="500" alt="geoset-chart-selection" src="https://github.com/user-attachments/assets/25878fcd-a972-47e0-9ae6-da94f7fa1c8d" />
13+
<img width="1912" height="535" alt="geoset-layer-chart-builder" src="https://github.com/user-attachments/assets/cf825d8b-ff2f-4d95-8a5c-b9f4da347066" />
1614

1715
## Map Configuration Controls
1816

@@ -90,21 +88,53 @@ Applies a single style to all features. Used when you don't need per-category or
9088
"strokeWidth": 2,
9189
"lineStyle": "solid",
9290
"fillPattern": "solid",
93-
"pointType": "circle",
94-
"pointSize": 10
91+
"pointType": "circle"
9592
}
9693
}
9794
```
9895

99-
| Field | Type | Description |
100-
| ------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------- |
101-
| `fillColor` | `[R, G, B, A]` | Fill color as RGBA (0–255) |
102-
| `strokeColor` | `[R, G, B, A]` | Stroke/outline color as RGBA |
103-
| `strokeWidth` | number | Stroke width in pixels |
104-
| `lineStyle` | string | Line rendering style: `"solid"`, `"dashed"`, or `"dotted"`. Optional, defaults to `null`. |
105-
| `fillPattern` | string | `"solid"` (required) |
106-
| `pointType` | string | Icon name for point layers (e.g., `"circle"`, `"point"`, or any registered SVG icon). Optional, defaults to `null` (circle). |
107-
| `pointSize` | integer | Static size of point icons in pixels (1–50). Optional, defaults to `null`. |
96+
| Field | Type | Description |
97+
| ------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
98+
| `fillColor` | `[R, G, B, A]` | Fill color as RGBA (0–255) |
99+
| `strokeColor` | `[R, G, B, A]` | Stroke/outline color as RGBA |
100+
| `strokeWidth` | number | Stroke width in pixels |
101+
| `lineStyle` | string | Line rendering style: `"solid"`, `"dashed"`, or `"dotted"`. Optional, defaults to `null`. |
102+
| `fillPattern` | string | `"solid"` (required) |
103+
| `pointType` | string | Icon name for point layers: `"circle"`, `"point"`, `"marker"`, `"square"`, or `"triangle"`. Optional, defaults to `null` (circle). |
104+
105+
### `pointSize`
106+
107+
Controls the size of point icons. This is a **top-level** key (not inside `globalColoring`). It accepts either a static number or a dynamic data-driven configuration object.
108+
109+
**Static** — a single pixel size applied to all points (1–200):
110+
111+
```json
112+
{
113+
"pointSize": 10
114+
}
115+
```
116+
117+
**Dynamic** — sizes points based on a numeric column value:
118+
119+
```json
120+
{
121+
"pointSize": {
122+
"valueColumn": "incident_size",
123+
"startSize": 4,
124+
"endSize": 30,
125+
"lowerBound": null,
126+
"upperBound": null
127+
}
128+
}
129+
```
130+
131+
| Field | Type | Description |
132+
| ------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
133+
| `valueColumn` | string | The numeric column to map to point size |
134+
| `startSize` | number | Pixel size at the lower bound (1–200) |
135+
| `endSize` | number | Pixel size at the upper bound (1–200, must be greater than `startSize`) |
136+
| `lowerBound` | number, string, or `null` | Value that maps to `startSize`. A number sets an absolute value, a string like `"25%"` uses the 25th percentile of the data, and `null` uses the data minimum. |
137+
| `upperBound` | number, string, or `null` | Value that maps to `endSize`. A number sets an absolute value, a string like `"75%"` uses the 75th percentile of the data, and `null` uses the data maximum. |
108138

109139
### `colorByCategory`
110140

wiki/GeoSet-Multi-Map.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# GeoSet Multi Map Chart
1+
# GeoSet Multi Map
22

3-
The **GeoSet Multi Map** (`deck_geoset_multi_map`) chart type composes multiple [[GeoSet Map Layer Chart|GeoSet Map Layer]] charts into a single interactive map. Each sub-layer retains its own styling, data source, and legend configuration.
3+
The **GeoSet Multi Map** (`deck_geoset_multi_map`) chart type composes multiple [[GeoSet Map Layer|GeoSet Map Layer]] charts into a single interactive map. Each sub-layer retains its own styling, data source, and legend configuration.
44

5-
<img width="1617" height="450" alt="Screenshot 2026-02-23 at 4 08 10 PM" src="https://github.com/user-attachments/assets/1004e75e-5050-4455-8c72-66d5d5ca3e50" />
5+
<img width="1617" height="525" alt="Screenshot 2026-02-23 at 4 08 10 PM" src="https://github.com/user-attachments/assets/1004e75e-5050-4455-8c72-66d5d5ca3e50" />
66

77
## Creating a Multi Map Chart
88

@@ -11,10 +11,8 @@ The **GeoSet Multi Map** (`deck_geoset_multi_map`) chart type composes multiple
1111
3. Select your dataset (used only for dashboard filters) and choose **GeoSet Multi Map** as the chart type
1212
4. In the **Map** panel, add your layer charts via **GeoSet Layer Charts**
1313

14-
<p>
15-
<img width="49%" height="350" alt="geoset-chart-selection" src="https://github.com/user-attachments/assets/7285be19-92e5-43ea-beec-4cd6e17b9243" />
16-
<img width="49%" height="350" alt="geoset-multi-chart-builder" src="https://github.com/user-attachments/assets/add345f5-fc9a-456f-95cd-fae80c29cdcf" />
17-
</p>
14+
<img width="1912" height="500" alt="geoset-chart-selection" src="https://github.com/user-attachments/assets/25878fcd-a972-47e0-9ae6-da94f7fa1c8d" />
15+
<img width="1912" height="530" alt="geoset-mult-chart-builder" src="https://github.com/user-attachments/assets/b681929a-5bed-4942-94e6-e7ea88d27b6d" />
1816

1917
## Map Controls
2018

@@ -28,11 +26,11 @@ When checked, shows the **Viewport** control for setting a fixed map position. T
2826

2927
### Viewport
3028

31-
Sets the map center, zoom, pitch, and bearing for the static viewport. See [[GeoSet Map Layer Chart#Viewport|Viewport]] for details on how the controls work.
29+
Sets the map center, zoom, pitch, and bearing for the static viewport. See [[GeoSet Map Layer#Viewport|Viewport]] for details on how the controls work.
3230

3331
### GeoSet Layer Charts
3432

35-
Select the [[GeoSet Map Layer Chart|GeoSet Map Layer]] charts to include. Only charts of type `deck_geoset_map_layer` appear in the list.
33+
Select the [[GeoSet Map Layer|GeoSet Map Layer]] charts to include. Only charts of type `deck_geoset_map_layer` appear in the list.
3634

3735
Each layer has a **settings popover** (gear icon) with per-layer options:
3836

@@ -57,7 +55,7 @@ If no layers have Auto Zoom enabled, the map canvas renders immediately after fe
5755

5856
## Multi-Layer Legend
5957

60-
When a Multi Map chart is rendered on a dashboard, a unified legend is shown covering all active layers. Each layer's legend entries come from the `legend` field in its [[GeoSet Map Layer Chart#legend|GeoJSON Config]].
58+
When a Multi Map chart is rendered on a dashboard, a unified legend is shown covering all active layers. Each layer's legend entries come from the `legend` field in its [[GeoSet Map Layer#legend|GeoJSON Config]].
6159

6260
### Legend Features
6361

wiki/Getting-Started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,6 @@ docker compose down -v
7777

7878
## Next Steps
7979

80-
- Load the [[Sample Data and Demo Dashboards]] to see GeoSet in action
81-
- Create your first map chart: [[GeoSet Map Layer Chart]]
82-
- Combine multiple layers: [[GeoSet Multi Map Chart]]
80+
- Load the [[Sample Dashboards]] to see GeoSet in action
81+
- Create your first map chart: [[GeoSet Map Layer]]
82+
- Combine multiple layers: [[GeoSet Multi Map]]

wiki/Home.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
GeoSet is a geospatial data monitoring and visualization platform built on [Apache Superset](https://github.com/apache/superset). It extends Superset with custom deck.gl-based map visualization plugins purpose-built for exploring geographic data at scale.
44

5-
<img width="1912" height="450" alt="Screenshot 2026-02-23 at 4 46 31 PM" src="https://github.com/user-attachments/assets/17b9b7a2-4507-40a8-94c2-ba142bcd2c60" />
5+
<img width="1912" height="525" alt="geoset-example-dashboard" src="https://github.com/user-attachments/assets/7dc2e194-f4e7-495c-b4b5-33828752063f" />
66

77
## What GeoSet Adds
88

@@ -19,9 +19,9 @@ GeoSet is a geospatial data monitoring and visualization platform built on [Apac
1919
## Pages
2020

2121
- [[Getting Started]] — Install and run GeoSet with Docker
22-
- [[GeoSet Map Layer Chart]] — Creating and configuring individual map layer charts
23-
- [[GeoSet Multi Map Chart]] — Composing multiple layers into a single map
24-
- [[Sample Data and Demo Dashboards]] — Loading the example Hurricane and Wildfire dashboards
22+
- [[GeoSet Map Layer]] — Creating and configuring individual map layer charts
23+
- [[GeoSet Multi Map]] — Composing multiple layers into a single map
24+
- [[Sample Dashboards]] — Loading the example Hurricane and Wildfire dashboards
2525
- [[Development Guide]] — Local dev setup, plugin architecture, contributing
2626
- [[JSON Config Spec]] — Reference for the GeoSet Map Layer JSON configuration schema
2727

wiki/JSON-Config-Spec.md

Lines changed: 61 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,59 @@
22

33
Reference for the GeoSet Map Layer JSON configuration object. This is the schema that controls how geographic features are styled, colored, and labeled.
44

5-
- [Overview of Schema Fields](#overview-of-schema-fields)
6-
- [Constraints](#constraints)
7-
- [Field Specifications](#field-specifications)
8-
- [globalColoring](#globalcoloring)
9-
- [colorByCategory](#colorbycategory)
10-
- [colorByValue](#colorbyvalue)
11-
- [pointSize](#pointsize)
12-
- [textOverlayStyle](#textoverlaystyle)
13-
- [legend](#legend)
5+
- [JSON Config Spec](#json-config-spec)
6+
- [Complete Example](#complete-example)
7+
- [Overview of Schema Fields](#overview-of-schema-fields)
8+
- [Constraints](#constraints)
9+
- [Field Specifications](#field-specifications)
10+
- [globalColoring](#globalcoloring)
11+
- [colorByCategory](#colorbycategory)
12+
- [colorByValue](#colorbyvalue)
13+
- [Constraints](#constraints-1)
14+
- [pointSize](#pointsize)
15+
- [Static](#static)
16+
- [Dynamic (data-driven)](#dynamic-data-driven)
17+
- [Constraints](#constraints-2)
18+
- [textOverlayStyle](#textoverlaystyle)
19+
- [legend](#legend)
20+
21+
## Complete Example
22+
23+
A full configuration showing all fields together. This example renders wind station points colored by `max_wind_speed` on a yellow-to-red gradient (using percentile bounds), with data-driven point sizing on the same column:
24+
25+
```json
26+
{
27+
"globalColoring": {
28+
"fillColor": [40, 147, 179, 255],
29+
"strokeColor": [0, 0, 0, 255],
30+
"strokeWidth": 2,
31+
"lineStyle": "solid",
32+
"fillPattern": "solid",
33+
"pointType": "circle"
34+
},
35+
"colorByValue": {
36+
"valueColumn": "max_wind_speed",
37+
"startColor": [255, 255, 0, 255],
38+
"endColor": [255, 0, 0, 255],
39+
"lowerBound": "10%",
40+
"upperBound": "90%",
41+
"breakpoints": ["25%", "50%", "75%"]
42+
},
43+
"pointSize": {
44+
"valueColumn": "max_wind_speed",
45+
"startSize": 4,
46+
"endSize": 30,
47+
"lowerBound": null,
48+
"upperBound": null
49+
},
50+
"legend": {
51+
"title": "Wind Stations",
52+
"name": null
53+
}
54+
}
55+
```
56+
57+
> **Note:** `colorByCategory` and `colorByValue` are mutually exclusive — use one or the other, not both. When either is present, `legend.name` must be `null`.
1458
1559
## Overview of Schema Fields
1660

@@ -122,14 +166,14 @@ Given a hurricane dataset with a `max_wind_speed` column (in mph), this config c
122166
}
123167
```
124168

125-
| Field | Type | Required | Description |
126-
| ------------- | ----------------------------------------------- | -------- | ----------------------------------------------------------- |
127-
| `valueColumn` | string | **yes** | Numeric column to map to color. |
128-
| `startColor` | `[R, G, B, A]` | **yes** | Color at the low end of the gradient. |
129-
| `endColor` | `[R, G, B, A]` | **yes** | Color at the high end of the gradient. |
130-
| `lowerBound` | number, percentage string, or `null` | no | Value mapped to `startColor`. `null` uses the data minimum. |
131-
| `upperBound` | number, percentage string, or `null` | no | Value mapped to `endColor`. `null` uses the data maximum. |
132-
| `breakpoints` | array of numbers or percentage strings | **yes** | Intermediate stops for the gradient. Can be empty (`[]`). |
169+
| Field | Type | Required | Description |
170+
| ------------- | -------------------------------------- | -------- | ----------------------------------------------------------- |
171+
| `valueColumn` | string | **yes** | Numeric column to map to color. |
172+
| `startColor` | `[R, G, B, A]` | **yes** | Color at the low end of the gradient. |
173+
| `endColor` | `[R, G, B, A]` | **yes** | Color at the high end of the gradient. |
174+
| `lowerBound` | number, percentage string, or `null` | no | Value mapped to `startColor`. `null` uses the data minimum. |
175+
| `upperBound` | number, percentage string, or `null` | no | Value mapped to `endColor`. `null` uses the data maximum. |
176+
| `breakpoints` | array of numbers or percentage strings | **yes** | Intermediate stops for the gradient. Can be empty (`[]`). |
133177

134178
**Percentage bounds:** You can use strings like `"10%"` or `"90%"` for bounds and breakpoints. These are resolved against the actual data distribution on the frontend (e.g. `"10%"` means the 10th percentile of the data). This is useful when the data is skewed or contains outliers.
135179

0 commit comments

Comments
 (0)