Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions scripts/demo/chart-gallery.json
Original file line number Diff line number Diff line change
Expand Up @@ -573,17 +573,17 @@
"settings": {
"title": "",
"chartOptions": {
"content": "## Sankey diagram\n\nFlow visualization between two (or more) categorical dimensions. Query must return `source`, `target`, `value` columns.\n\n**Options shown:** `orient: horizontal`, `showLabels: true`."
"content": "## Sankey diagram\n\nMulti-hop flow visualization across N categorical dimensions. Query returns `source`, `target`, `value` rows — the chart wires them into a graph automatically, so any chain (continent → region → category → status, etc.) just works.\n\n**Options shown:** `orient: horizontal`, `showLabels: true`."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the example flow to match the actual query.

The markdown example mentions "continent → region → category → status" but the actual query (line 584) and widget title (line 586) use "continent → country → category → status". Per the PR objectives, country was chosen over region to avoid name collisions. Update the example to match the implementation for consistency.

📝 Suggested fix
-                "content": "## Sankey diagram\n\nMulti-hop flow visualization across N categorical dimensions. Query returns `source`, `target`, `value` rows — the chart wires them into a graph automatically, so any chain (continent → region → category → status, etc.) just works.\n\n**Options shown:** `orient: horizontal`, `showLabels: true`."
+                "content": "## Sankey diagram\n\nMulti-hop flow visualization across N categorical dimensions. Query returns `source`, `target`, `value` rows — the chart wires them into a graph automatically, so any chain (continent → country → category → status, etc.) just works.\n\n**Options shown:** `orient: horizontal`, `showLabels: true`."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/demo/chart-gallery.json` at line 576, The markdown in the "## Sankey
diagram" example text currently says "continent → region → category → status"
but the implemented query and widget title use "continent → country → category →
status"; update the example string (the "content" value under the Sankey diagram
entry) to replace "region" with "country" so the example flow matches the query
and widget naming (refer to the "## Sankey diagram" block and the widget/query
that use continent → country → category → status).

}
}
},
{
"id": "sankey-chart",
"chartType": "sankey",
"connectionId": "conn_postgres_read",
"query": "SELECT r.name AS source, o.status AS target, COUNT(*)::float AS value FROM neoboard_demo_public.orders o JOIN neoboard_demo_public.customers c ON c.id = o.customer_id JOIN neoboard_demo_public.regions r ON r.id = c.region_id GROUP BY r.name, o.status",
"query": "SELECT r.continent AS source, r.country AS target, COUNT(*)::float AS value FROM neoboard_demo_public.regions r JOIN neoboard_demo_public.customers c ON c.region_id = r.id JOIN neoboard_demo_public.orders o ON o.customer_id = c.id GROUP BY r.continent, r.country UNION ALL SELECT r.country AS source, cat.name AS target, COUNT(*)::float AS value FROM neoboard_demo_public.regions r JOIN neoboard_demo_public.customers c ON c.region_id = r.id JOIN neoboard_demo_public.orders o ON o.customer_id = c.id JOIN neoboard_demo_public.order_items oi ON oi.order_id = o.id JOIN neoboard_demo_public.products p ON p.id = oi.product_id JOIN neoboard_demo_public.categories cat ON cat.id = p.category_id GROUP BY r.country, cat.name UNION ALL SELECT cat.name AS source, o.status AS target, COUNT(*)::float AS value FROM neoboard_demo_public.categories cat JOIN neoboard_demo_public.products p ON p.category_id = cat.id JOIN neoboard_demo_public.order_items oi ON oi.product_id = p.id JOIN neoboard_demo_public.orders o ON o.id = oi.order_id GROUP BY cat.name, o.status",
"settings": {
"title": "Regionorder status flow",
"title": "ContinentCountry → Category → Status flow",
"chartOptions": {
"orient": "horizontal",
"showLabels": true,
Expand Down Expand Up @@ -757,17 +757,17 @@
"settings": {
"title": "",
"chartOptions": {
"content": "## Circle Packing\n\nNested circles showing hierarchical data — similar to treemap but uses area of circles instead of rectangles. Best for **proportional comparisons** across a hierarchy.\n\n**Data shape:** query returns `name` and `value` columns. Hierarchy is built from the data structure.\n\n**Options shown:** `showLabels: true`, `padding: 3`."
"content": "## Circle Packing\n\nNested circles showing hierarchical data — similar to treemap but uses area of circles instead of rectangles. Best for **proportional comparisons** across a hierarchy.\n\n**Data shape:** query returns `name`, `value`, and `parent` columns. Rows with empty `parent` become outer circles; rows with a matching parent name nest inside.\n\n**Options shown:** `showLabels: true`, `padding: 3`."
}
}
},
{
"id": "circle-packing-chart",
"chartType": "circle-packing",
"connectionId": "conn_postgres_read",
"query": "SELECT p.name AS name, SUM(oi.qty * oi.price)::float AS value FROM neoboard_demo_public.order_items oi JOIN neoboard_demo_public.products p ON p.id = oi.product_id GROUP BY p.id, p.name ORDER BY value DESC LIMIT 25",
"query": "SELECT cat.name AS name, SUM(oi.qty * oi.price)::float AS value, '' AS parent FROM neoboard_demo_public.categories cat JOIN neoboard_demo_public.products p ON p.category_id = cat.id JOIN neoboard_demo_public.order_items oi ON oi.product_id = p.id GROUP BY cat.name UNION ALL SELECT p.name AS name, SUM(oi.qty * oi.price)::float AS value, cat.name AS parent FROM neoboard_demo_public.products p JOIN neoboard_demo_public.categories cat ON cat.id = p.category_id JOIN neoboard_demo_public.order_items oi ON oi.product_id = p.id GROUP BY p.name, cat.name",
"settings": {
"title": "Top 25 products by revenue",
"title": "Revenue by category → product",
"chartOptions": {
"showLabels": true,
"padding": 3,
Expand Down