combine
Last updated
Was this helpful?
Last updated
Was this helpful?
Some actions will affect the entire kepler.lg instance state. The updaters for these actions is exported as combinedUpdaters
. These updater take the entire instance state as the first argument. Read more about
Examples
Combine data and full configuration update in a single action
Parameters
Action:
state
kepler.gl instance state, containing all subreducer state
action
action.payload
{datasets, options, config}
action.payload.datasets
(<> | ) *required datasets can be a dataset or an array of datasets Each dataset object needs to have info
and data
property.
action.payload.datasets.info
-info of a dataset
action.payload.datasets.info.id
id of this dataset. If config is defined, id
should matches the dataId
in config.
action.payload.datasets.info.label
A display name of this dataset
action.payload.datasets.data
*required The data object, in a tabular format with 2 properties fields
and rows
action.payload.datasets.data.fields
<> *required Array of fields,
action.payload.datasets.data.fields.name
*required Name of the field,
action.payload.datasets.data.rows
<> *required Array of rows, in a tabular format with fields
and rows
action.payload.options
option object {centerMap: true}
action.payload.config
map config
Returns nextState