diff --git a/libs/shared/lib/vis/visualizations/mapvis/layers/choropleth-layer/ChoroplethOptions.tsx b/libs/shared/lib/vis/visualizations/mapvis/layers/choropleth-layer/ChoroplethOptions.tsx index 9d040077d82a883ff5f72015afbae3fb911d0bc7..af7deba698290f5d71aafc29ac68c391d370c36b 100644 --- a/libs/shared/lib/vis/visualizations/mapvis/layers/choropleth-layer/ChoroplethOptions.tsx +++ b/libs/shared/lib/vis/visualizations/mapvis/layers/choropleth-layer/ChoroplethOptions.tsx @@ -28,7 +28,9 @@ export default function ChoroplethOptions({ settings, graphMetadata, updateSetti const spatialAttributes: { [id: string]: string[] } = {}; graphMetadata.nodes.labels.forEach((node) => { - spatialAttributes[node] = Object.entries(graphMetadata.nodes.types[node].attributes).map((kv) => kv[0]); + spatialAttributes[node] = Object.entries(graphMetadata.nodes.types[node].attributes) + .filter(([, value]) => value.dimension === 'numerical') + .map(([key]) => key); }); const handleCollapseToggle = (nodeType: string) => { diff --git a/libs/shared/lib/vis/visualizations/mapvis/layers/heatmap-layer/HeatLayerOptions.tsx b/libs/shared/lib/vis/visualizations/mapvis/layers/heatmap-layer/HeatLayerOptions.tsx index e3eb70ebb6eee2f14e7c3c757c8c541fc55812cd..37487054729e54a587db6b0ad8aa3b820e767b2d 100644 --- a/libs/shared/lib/vis/visualizations/mapvis/layers/heatmap-layer/HeatLayerOptions.tsx +++ b/libs/shared/lib/vis/visualizations/mapvis/layers/heatmap-layer/HeatLayerOptions.tsx @@ -28,7 +28,9 @@ export default function HeatLayerOptions({ settings, graphMetadata, updateSettin const spatialAttributes: { [id: string]: string[] } = {}; graphMetadata.nodes.labels.forEach((node) => { - spatialAttributes[node] = Object.entries(graphMetadata.nodes.types[node].attributes).map((kv) => kv[0]); + spatialAttributes[node] = Object.entries(graphMetadata.nodes.types[node].attributes) + .filter(([, value]) => value.dimension === 'numerical') + .map(([key]) => key); }); const handleCollapseToggle = (nodeType: string) => { diff --git a/libs/shared/lib/vis/visualizations/mapvis/layers/icon-layer/IconOptions.tsx b/libs/shared/lib/vis/visualizations/mapvis/layers/icon-layer/IconOptions.tsx index b0fb2f86cb12bb7ef847a0444fbaa369d54de8d7..433c9b0f5ab57e8da2fe1b5e6bef0e8b5cb3328f 100644 --- a/libs/shared/lib/vis/visualizations/mapvis/layers/icon-layer/IconOptions.tsx +++ b/libs/shared/lib/vis/visualizations/mapvis/layers/icon-layer/IconOptions.tsx @@ -28,7 +28,9 @@ export default function IconOptions({ settings, graphMetadata, updateSettings }: const spatialAttributes: { [id: string]: string[] } = {}; graphMetadata.nodes.labels.forEach((node) => { - spatialAttributes[node] = Object.entries(graphMetadata.nodes.types[node].attributes).map((kv) => kv[0]); + spatialAttributes[node] = Object.entries(graphMetadata.nodes.types[node].attributes) + .filter(([, value]) => value.dimension === 'numerical') + .map(([key]) => key); }); const handleCollapseToggle = (nodeType: string) => { diff --git a/libs/shared/lib/vis/visualizations/mapvis/layers/node-layer/NodeOptions.tsx b/libs/shared/lib/vis/visualizations/mapvis/layers/node-layer/NodeOptions.tsx index 2a69573f50cde327ebbdd1cec86de5af8bc533e6..783788f826d5e83a063fb476f2b2e6d5feaaddad 100644 --- a/libs/shared/lib/vis/visualizations/mapvis/layers/node-layer/NodeOptions.tsx +++ b/libs/shared/lib/vis/visualizations/mapvis/layers/node-layer/NodeOptions.tsx @@ -29,7 +29,9 @@ export default function NodeOptions({ settings, graphMetadata, updateSettings }: const spatialAttributes: { [id: string]: string[] } = {}; graphMetadata.nodes.labels.forEach((node) => { - spatialAttributes[node] = Object.entries(graphMetadata.nodes.types[node].attributes).map((kv) => kv[0]); + spatialAttributes[node] = Object.entries(graphMetadata.nodes.types[node].attributes) + .filter(([, value]) => value.dimension === 'numerical') + .map(([key]) => key); }); const handleCollapseToggle = (nodeType: string) => { diff --git a/libs/shared/lib/vis/visualizations/mapvis/layers/nodelink-layer/NodeLinkOptions.tsx b/libs/shared/lib/vis/visualizations/mapvis/layers/nodelink-layer/NodeLinkOptions.tsx index 06f3fa1e4b330bad432ff5fa45b46c3291167fe0..abab54f011a4ee126b17a7faefa68734189407eb 100644 --- a/libs/shared/lib/vis/visualizations/mapvis/layers/nodelink-layer/NodeLinkOptions.tsx +++ b/libs/shared/lib/vis/visualizations/mapvis/layers/nodelink-layer/NodeLinkOptions.tsx @@ -43,7 +43,9 @@ export default function NodeLinkOptions({ settings, graphMetadata, updateSetting const spatialAttributes: { [id: string]: string[] } = {}; graphMetadata.nodes.labels.forEach((node) => { - spatialAttributes[node] = Object.entries(graphMetadata.nodes.types[node].attributes).map((kv) => kv[0]); + spatialAttributes[node] = Object.entries(graphMetadata.nodes.types[node].attributes) + .filter(([, value]) => value.dimension === 'numerical') + .map(([key]) => key); }); const handleCollapseToggle = (nodeType: string) => {