Skip to content
Snippets Groups Projects

Feat/mapAttributeColoring

Merged Vink, S.A. (Sjoerd) requested to merge feat/mapAttributeColoring into main
1 file
+ 11
5
Compare changes
  • Side-by-side
  • Inline
@@ -255,10 +255,13 @@ export function NodeLinkOptions({
}
/>
</div>
) : nodeSettings.colorAttributeType === 'categorical' ? (
<div>
{graphMetadata.nodes.types[nodeType]?.attributes?.[nodeSettings?.colorAttribute]?.values.map(
(attr: string) => (
) : (
nodeSettings.colorAttributeType === 'categorical' &&
nodeSettings.colorAttribute && (
<div>
{(
graphMetadata.nodes.types[nodeType] as { attributes: { [key: string]: { values: string[] } } }
)?.attributes?.[nodeSettings.colorAttribute]?.values.map((attr: string) => (
<div key={attr} className="flex items-center justify-between">
<p>{attr}</p>
<ColorPicker
@@ -267,7 +270,10 @@ export function NodeLinkOptions({
updateLayerSettings({
nodes: {
...layerSettings.nodes,
[nodeType]: { ...nodeSettings, colorMapping: { ...nodeSettings.colorMapping, [attr]: val } },
[nodeType]: {
...nodeSettings,
colorMapping: { ...nodeSettings.colorMapping, [attr]: val },
},
},
});
}}
Loading