@naivemap/mapbox-gl-echarts-layer
TypeScript icon, indicating that this package has built-in type declarations

0.3.3 • Public • Published

EChartsLayer class

npm i @naivemap/mapbox-gl-echarts-layer echarts

Signature:

export default class EChartsLayer implements mapboxgl.CustomLayerInterface

Implements: mapboxgl.CustomLayerInterface

Constructors

Constructor Description
(constructor)(id: string, option: ECOption) Constructs a new instance of the EChartsLayer class

Parameters

id (string) The ID of the layer.

option (ECOption) The option of the Lines graph and Scatter (bubble) chart.

export type ECOption = echarts.ComposeOption<
  | TitleComponentOption
  | TooltipComponentOption
  | LegendComponentOption
  | LinesSeriesOption
  | ScatterSeriesOption
  | EffectScatterSeriesOption
>

Methods

Method Description
setOption (option: ECOption) Call echartsInstance.setOption() to update the chart.

Example

// echart option
const option = {...}
const layer = new EChartsLayer('layer-id', option)

map.addLayer(layer)

Package Sidebar

Install

npm i @naivemap/mapbox-gl-echarts-layer

Weekly Downloads

27

Version

0.3.3

License

MIT

Unpacked Size

13.2 kB

Total Files

6

Last publish

Collaborators

  • huanglii