vis-state
Last updated
Was this helpful?
Last updated
Was this helpful?
Examples
Add a new filter
Parameters
Add a new layer
Parameters
When select dataset for export, apply cpu filter to selected dataset
Parameters
Show larger time filter at bottom for time playback (apply to time filter only)
Parameters
Default initial visState
Properties
Update interactionConfig
Parameters
Trigger layer click event with clicked object
Parameters
Trigger layer hover event with hovered object
Parameters
Update layer type. Previews layer config will be copied if applicable.
Parameters
Update layer visConfig
Parameters
Update layer visual channel
Parameters
Trigger loading file error
Parameters
action.error
any
Trigger file loading dispatch addDataToMap
if succeed, or loadFilesErr
if failed
Parameters
Trigger map click event, unselect clicked object
Parameters
Propagate visState
reducer with a new configuration. Current config will be override.
Parameters
action.payload.config
(optional, default {}
)
action.payload.options
(optional, default {}
)
Remove a dataset and all layers, filters, tooltip configs that based on it
Parameters
Remove a filter
Parameters
remove layer
Parameters
Reorder layer
Parameters
reset visState to initial State
Parameters
Set the property of a filter plot
Parameters
Update filter property
Parameters
action.value
any new value
User input to update the info of the map
Parameters
Display dataset table in a modal
Parameters
Start and end filter animation
Parameters
Toggle visibility of a layer in a split map
Parameters
Toggle visibility of a layer for a split map
Parameters
Reset animation config current time to a specified value
Parameters
Change filter animation speed
Parameters
Update animation speed with the vertical speed slider
Parameters
update layer blending mode
Parameters
Add new dataset to visState
, with option to load a map config along with the datasets
Parameters
Updaters for visState
reducer. Can be used in your root reducer to directly modify kepler.gl's state. Read more about
Action:
state
visState
action
action
action.dataId
dataset id
this new filter is associated with
Returns nextState
Action:
state
visState
action
action
action.props
new layer props
Returns nextState
Action:
state
visState
action
action.dataId
dataset id
Returns nextState
Action:
state
visState
action
action
action.idx
index of filter to enlarge
Returns nextState
Type:
layers
layerData
layerToBeMerged
layerOrder
filters
filterToBeMerged
datasets
editingDataset
interactionConfig
interactionToBeMerged
layerBlending
hoverInfo
clicked
mousePos
splitMaps
a list of objects of layer availabilities and visibilities for each map
layerClasses
animationConfig
editor
Action:
state
visState
action
action
action.config
new config as key value map: {tooltip: {enabled: true}}
Returns nextState
Action:
state
visState
action
action
action.info
Object clicked, returned by deck.gl
Returns nextState
Action:
state
visState
action
action
action.info
Object hovered, returned by deck.gl
Returns nextState
Action:
state
visState
action
action
action.oldLayer
layer to be updated
action.newType
new type
Returns nextState
Action:
state
visState
action
action
action.oldLayer
layer to be updated
action.newVisConfig
new visConfig as a key value map: e.g. {opacity: 0.8}
Returns nextState
Action:
state
visState
action
action
action.oldLayer
layer to be updated
action.newConfig
new visual channel config
action.channel
channel to be updated
Returns nextState
Action:
state
visState
action
action
Returns nextState
Action:
state
visState
action
action
action.files
<> array of fileblob
Returns nextState
Action:
state
visState
Returns nextState
Action:
state
visState
action
action
action.payload
map config to be propagated
action.payload.config
map config to be propagated
action.payload.option
{keepExistingConfig: true | false}
Returns nextState
Action:
state
visState
action
action
action.key
dataset id
Returns nextState
Action:
state
visState
action
action
action.idx
index of filter to b e removed
Returns nextState
Action:
state
visState
action
action
action.idx
index of layer to b e removed
Returns nextState
Action:
state
visState
action
action
action.order
<> an array of layer indexes
Returns nextState
Action:
state
visState
Returns nextState
Action:
state
visState
action
action
action.idx
action.newProp
key value mapping of new prop {yAxis: 'histogram'}
Returns nextState
Action:
state
visState
action
action
action.idx
idx
of filter to be updated
action.prop
prop
of filter, e,g, dataId
, name
, value
datasetId
used when updating a prop (dataId, name) that can be linked to multiple datasets
Returns nextState
Action:
state
visState
action
action
action.info
{title: 'hello'}
Returns nextState
Action:
state
visState
action
action
action.dataId
dataset id to show in table
Returns nextState
Action:
state
visState
action
action
action.idx
idx of filter
Returns nextState
Action:
state
action
action.mapIndex
index of the split map
action.layerId
id of the layer
Returns nextState
Action:
state
visState
action
action
action.payload
( | ) index of the split map
Returns nextState
Action:
state
visState
action
action
action.value
the value current time will be set to
Returns nextState
Action:
state
visState
action
action
action.idx
idx
of filter
action.speed
speed
to change it to. speed
is a multiplier
Returns nextState
Action:
state
visState
action
action
action.speed
the updated speed of the animation
Returns nextState
Action:
state
visState
action
action
action.mode
one of additive
, normal
and subtractive
Returns nextState
Action:
state
visState
action
action
action.datasets
(<> | ) *required datasets can be a dataset or an array of datasets Each dataset object needs to have info
and data
property.
action.datasets.info
-info of a dataset
action.datasets.info.id
id of this dataset. If config is defined, id
should matches the dataId
in config.
action.datasets.info.label
A display name of this dataset
action.datasets.data
*required The data object, in a tabular format with 2 properties fields
and rows
action.datasets.data.fields
<> *required Array of fields,
action.datasets.data.fields.name
*required Name of the field,
action.datasets.data.rows
<> *required Array of rows, in a tabular format with fields
and rows
action.options
option object {centerMap: true, keepExistingConfig: false}
action.config
map config
Returns nextState