Skip to content
Snippets Groups Projects
Verified Commit 50badea9 authored by Vink, S.A. (Sjoerd)'s avatar Vink, S.A. (Sjoerd) Committed by Dennis Collaris
Browse files

fix(mapvisStorybook): fixed map storybook

parent 9a53bbf8
No related branches found
No related tags found
1 merge request!193fix(mapvisStorybook): fixed map storybook
Pipeline #138287 passed
...@@ -43,7 +43,7 @@ export class NodeLinkLayer extends CompositeLayer<CompositeLayerType> { ...@@ -43,7 +43,7 @@ export class NodeLinkLayer extends CompositeLayer<CompositeLayerType> {
}); });
}); });
if (ml.linkPrediction.enabled) { if (ml?.linkPrediction?.enabled) {
this._layers['link_prediction'] = new LineLayer({ this._layers['link_prediction'] = new LineLayer({
id: 'link-prediction-layer', id: 'link-prediction-layer',
data: ml.linkPrediction.result, data: ml.linkPrediction.result,
......
...@@ -3,7 +3,7 @@ import { Meta } from '@storybook/react'; ...@@ -3,7 +3,7 @@ import { Meta } from '@storybook/react';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import { configureStore } from '@reduxjs/toolkit'; import { configureStore } from '@reduxjs/toolkit';
import { graphQueryResultSlice, querybuilderSlice, schemaSlice, visualizationSlice } from '../../../data-access/store'; import { graphQueryResultSlice, querybuilderSlice, schemaSlice, visualizationSlice } from '../../../data-access/store';
import { MapComponent } from './mapvis'; import MapComponent from './mapvis';
import { mockData } from '../../../mock-data/query-result/mockData'; import { mockData } from '../../../mock-data/query-result/mockData';
const Mockstore = configureStore({ const Mockstore = configureStore({
...@@ -39,27 +39,32 @@ export const NodeLink = { ...@@ -39,27 +39,32 @@ export const NodeLink = {
...(await mockData.mockMobilityQueryResult()), ...(await mockData.mockMobilityQueryResult()),
settings: { settings: {
layer: 'nodelink', layer: 'nodelink',
parkings: { location: { parkings: { lat: 'lat', lon: 'long' } },
color: [6, 147, 227], nodelink: {
fixed: true, enableBrushing: false,
hidden: false, nodes: {
lat: 'lat', parkings: {
lon: 'long', colorByAttribute: false,
max: 10, colorAttribute: undefined,
min: 0, colorAttributeType: undefined,
radius: 1, hidden: false,
sizeAttribute: '', shape: 'circle',
}, color: [6, 147, 227],
rides: { size: 10,
color: [6, 147, 227], },
fixed: true, },
hidden: false, edges: {
max: 10, rides: {
min: 0, hidden: false,
width: 1, width: 1,
widthAttribute: '', sizeAttribute: '',
fixed: true,
color: [6, 147, 227],
},
},
}, },
}, },
handleSelect: () => {},
}, },
}; };
...@@ -68,27 +73,52 @@ export const Heatmap = { ...@@ -68,27 +73,52 @@ export const Heatmap = {
...(await mockData.mockMobilityQueryResult()), ...(await mockData.mockMobilityQueryResult()),
settings: { settings: {
layer: 'heatmap', layer: 'heatmap',
parkings: { location: { parkings: { lat: 'lat', lon: 'long' } },
color: [6, 147, 227], heatmap: {
fixed: true, nodes: {
hidden: false, parkings: {
lat: 'lat', size: 10,
lon: 'long', hidden: false,
max: 10, },
min: 0, },
radius: 1, edges: {
sizeAttribute: '', rides: {},
},
}, },
rides: { },
color: [6, 147, 227], handleSelect: () => {},
fixed: true, },
hidden: false, };
max: 10,
min: 0, export const Choropleth = {
width: 1, args: {
widthAttribute: '', ...(await mockData.mockMobilityQueryResult()),
settings: {
layer: 'choropleth',
location: { parkings: { lat: 'lat', lon: 'long' } },
choropleth: {
coloringStrategy: 'Node count',
colorScale: 'orange',
opacity: 0.8,
nodes: {
parkings: {
color: [0, 0, 0],
hidden: false,
fixed: true,
min: 0,
max: 10,
sizeAttribute: '',
},
},
edges: {
rides: {
color: [0, 0, 0],
onHover: true,
},
},
}, },
}, },
handleSelect: () => {},
}, },
}; };
......
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