Skip to content
Snippets Groups Projects
Commit 7b65e84b authored by Vink, S.A. (Sjoerd)'s avatar Vink, S.A. (Sjoerd)
Browse files

feat(map_nodelink): spatial attributes

parent cfc800e6
No related branches found
No related tags found
1 merge request!151feat(map_nodelink)
......@@ -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) => {
......
......@@ -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) => {
......
......@@ -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) => {
......
......@@ -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) => {
......
......@@ -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) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment