Skip to content

Class: default

A custom Mapbox GL JS layer that renders Apache ECharts visualizations.

Implements

  • CustomLayerInterface

Constructors

Constructor

new default(id, ecOption): EChartsLayer

Parameters

ParameterTypeDescription
idstringA unique layer id
ecOptionECOptionThe ECharts option object used to configure the visualization.

Returns

EChartsLayer

See

https://echarts.apache.org/en/option.html

Methods

setOption()

setOption(option, notMerge?): void

Updates the ECharts visualization with a new configuration. This is the primary method for dynamically changing the displayed data or styles.

Parameters

ParameterTypeDescription
optionECOptionThe new ECharts option object to apply.
notMerge?booleanIf true, the new options will completely replace the existing ones. If false or undefined, the new options will be merged with the old ones. Defaults to false.

Returns

void

See

https://echarts.apache.org/en/api.html#echartsInstance.setOption