@naivemap/mapbox-gl-echarts-layer
v0.3.3
Published
Integrate the Lines graph and Scatter (bubble) chart of Apache ECharts.
Maintainers
Readme
EChartsLayer class
npm i @naivemap/mapbox-gl-echarts-layer echartsSignature:
export default class EChartsLayer implements mapboxgl.CustomLayerInterfaceImplements: 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)