echarts-for-react

  • Version 3.0.5
  • Published
  • 92.5 kB
  • 2 dependencies
  • MIT license

Install

npm i echarts-for-react
yarn add echarts-for-react
pnpm add echarts-for-react

Overview

Apache Echarts components for React.

Index

Classes

class EChartsReact

class EChartsReact extends EChartsReactCore {}

    constructor

    constructor(props: any);

      Type Aliases

      type EChartsInstance

      type EChartsInstance = EChartsType;

        type EChartsOption

        type EChartsOption = any;
        • Solve the type conflict caused by multiple type files

        type EChartsReactProps

        type EChartsReactProps = React.HTMLAttributes<HTMLDivElement> & {
        /**
        * echarts library entry, use it for import necessary.
        */
        readonly echarts?: any;
        /**
        * echarts option
        */
        readonly option: EChartsOption;
        /**
        * echarts theme config, can be:
        * 1. theme name string
        * 2. theme object
        */
        readonly theme?: string | Record<string, any>;
        /**
        * notMerge config for echarts, default is `false`
        */
        readonly notMerge?: boolean;
        /**
        * replaceMerge config for echarts, default is `null`
        */
        readonly replaceMerge?: string | string[];
        /**
        * lazyUpdate config for echarts, default is `false`
        */
        readonly lazyUpdate?: boolean;
        /**
        * showLoading config for echarts, default is `false`
        */
        readonly showLoading?: boolean;
        /**
        * loadingOption config for echarts, default is `null`
        */
        readonly loadingOption?: any;
        /**
        * echarts opts config, default is `{}`
        */
        readonly opts?: Opts;
        /**
        * when after chart render, do the callback with echarts instance
        */
        readonly onChartReady?: (instance: EChartsInstance) => void;
        /**
        * bind events, default is `{}`
        */
        readonly onEvents?: Record<string, Function>;
        /**
        * should update echarts options
        */
        readonly shouldSetOption?: (
        prevProps: EChartsReactProps,
        props: EChartsReactProps
        ) => boolean;
        /**
        * should trigger resize when window resize
        */
        readonly autoResize?: boolean;
        };

          Package Files (2)

          Dependencies (2)

          Dev Dependencies (31)

          Peer Dependencies (2)

          Badge

          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/echarts-for-react.

          • Markdown
            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/echarts-for-react)
          • HTML
            <a href="https://www.jsdocs.io/package/echarts-for-react"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>