UNPKG

echarts-for-react

Version:
57 lines (56 loc) 1.44 kB
import type { ECharts } from 'echarts'; import { PureComponent } from 'react'; import { EChartsReactProps } from './types'; /** * core component for echarts binding */ export default class EChartsReactCore extends PureComponent<EChartsReactProps> { /** * echarts render container */ ele: HTMLElement; /** * if this is the first time we are resizing */ private isInitialResize; /** * echarts library entry */ protected echarts: any; /** * Currently attached ECharts event listeners */ private eventHandlerRefs; constructor(props: EChartsReactProps); componentDidMount(): void; componentDidUpdate(prevProps: EChartsReactProps): void; componentWillUnmount(): void; initEchartsInstance(): Promise<ECharts>; /** * return the existing echart object */ getEchartsInstance(): ECharts; /** * dispose echarts and clear size-sensor */ private dispose; /** * render a new echarts instance */ private renderNewEcharts; private bindEvents; /** * Unbind all currently bound event handlers. Importantly, this does not * unbind the `"finished"` event that is used for chart initialization. */ private unbindEvents; /** * render the echarts */ private updateEChartsOption; /** * resize wrapper */ private resize; render(): JSX.Element; }