echarts-for-react 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # echarts-for-react
2
2
 
3
- The simplest, and the best React wrapper for [Apache ECharts](https://github.com/apache/incubator-echarts).
3
+ The simplest, and the best React wrapper for [Apache ECharts](https://github.com/apache/incubator-echarts). Using visualization with MCP Server [mcp-server-chart](https://github.com/antvis/mcp-server-chart).
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/echarts-for-react.svg)](https://www.npmjs.com/package/echarts-for-react)
6
6
  [![build](https://github.com/hustcc/echarts-for-react/actions/workflows/build.yml/badge.svg)](https://github.com/hustcc/echarts-for-react/actions/workflows/build.yml)
7
7
  [![Coverage](https://img.shields.io/coveralls/hustcc/echarts-for-react/master.svg)](https://coveralls.io/github/hustcc/echarts-for-react)
8
8
  [![NPM downloads](https://img.shields.io/npm/dm/echarts-for-react.svg)](https://www.npmjs.com/package/echarts-for-react)
9
9
  [![License](https://img.shields.io/npm/l/echarts-for-react.svg)](https://www.npmjs.com/package/echarts-for-react)
10
- ![ECharts Ver](https://img.shields.io/badge/echarts-%5E3.0.0%20%7C%7C%20%5E4.0.0%20%7C%7C%20%5E5.0.0-blue.svg)
10
+ ![ECharts Ver](https://img.shields.io/badge/echarts-%5E3.0.0%20%7C%7C%20%5E4.0.0%20%7C%7C%20%5E5.0.0%20%5E6.0.0-blue.svg)
11
11
  ![React Ver](https://img.shields.io/badge/React-%20%5E15.0.0%20%7C%7C%20%20%5E16.0.0%20%7C%7C%20%20%5E17.0.0-blue.svg)
12
12
 
13
13
 
@@ -63,7 +63,7 @@ import ReactECharts from 'echarts-for-react'; // or var ReactECharts = require(
63
63
 
64
64
  Import ECharts.js modules manually to reduce bundle size
65
65
 
66
- **With Echarts.js v5:**
66
+ **With Echarts.js v5 or v6:**
67
67
 
68
68
  ```ts
69
69
  import React from 'react';
package/esm/types.d.ts CHANGED
@@ -1,6 +1,9 @@
1
- import { CSSProperties } from 'react';
2
- import type { EChartsOption, EChartsType } from 'echarts';
3
- export type { EChartsOption };
1
+ import type { CSSProperties } from 'react';
2
+ import type { EChartsType } from 'echarts';
3
+ /**
4
+ * Solve the type conflict caused by multiple type files
5
+ */
6
+ export type EChartsOption = any;
4
7
  export type EChartsInstance = EChartsType;
5
8
  export type Opts = {
6
9
  readonly devicePixelRatio?: number;
package/esm/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import { CSSProperties } from 'react';\nimport type { EChartsOption, EChartsType } from 'echarts';\n\nexport type { EChartsOption };\n\nexport type EChartsInstance = EChartsType;\n\nexport type Opts = {\n readonly devicePixelRatio?: number;\n readonly renderer?: 'canvas' | 'svg';\n readonly width?: number | null | undefined | 'auto';\n readonly height?: number | null | undefined | 'auto';\n readonly locale?: string;\n};\n\nexport type EChartsReactProps = {\n /**\n * echarts library entry, use it for import necessary.\n */\n readonly echarts?: any;\n /**\n * `className` for container\n */\n readonly className?: string;\n /**\n * `style` for container\n */\n readonly style?: CSSProperties;\n /**\n * echarts option\n */\n readonly option: EChartsOption;\n /**\n * echarts theme config, can be:\n * 1. theme name string\n * 2. theme object\n */\n readonly theme?: string | Record<string, any>;\n /**\n * notMerge config for echarts, default is `false`\n */\n readonly notMerge?: boolean;\n /**\n * replaceMerge config for echarts, default is `null`\n */\n readonly replaceMerge?: string | string[];\n /**\n * lazyUpdate config for echarts, default is `false`\n */\n readonly lazyUpdate?: boolean;\n /**\n * showLoading config for echarts, default is `false`\n */\n readonly showLoading?: boolean;\n /**\n * loadingOption config for echarts, default is `null`\n */\n readonly loadingOption?: any;\n /**\n * echarts opts config, default is `{}`\n */\n readonly opts?: Opts;\n /**\n * when after chart render, do the callback with echarts instance\n */\n readonly onChartReady?: (instance: EChartsInstance) => void;\n /**\n * bind events, default is `{}`\n */\n readonly onEvents?: Record<string, Function>;\n /**\n * should update echarts options\n */\n readonly shouldSetOption?: (prevProps: EChartsReactProps, props: EChartsReactProps) => boolean;\n\n /**\n * should trigger resize when window resize\n */\n readonly autoResize?: boolean;\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CSSProperties } from 'react';\nimport type { EChartsType } from 'echarts';\n\n/**\n * Solve the type conflict caused by multiple type files\n */\nexport type EChartsOption = any;\n\nexport type EChartsInstance = EChartsType;\n\nexport type Opts = {\n readonly devicePixelRatio?: number;\n readonly renderer?: 'canvas' | 'svg';\n readonly width?: number | null | undefined | 'auto';\n readonly height?: number | null | undefined | 'auto';\n readonly locale?: string;\n};\n\nexport type EChartsReactProps = {\n /**\n * echarts library entry, use it for import necessary.\n */\n readonly echarts?: any;\n /**\n * `className` for container\n */\n readonly className?: string;\n /**\n * `style` for container\n */\n readonly style?: CSSProperties;\n /**\n * echarts option\n */\n readonly option: EChartsOption;\n /**\n * echarts theme config, can be:\n * 1. theme name string\n * 2. theme object\n */\n readonly theme?: string | Record<string, any>;\n /**\n * notMerge config for echarts, default is `false`\n */\n readonly notMerge?: boolean;\n /**\n * replaceMerge config for echarts, default is `null`\n */\n readonly replaceMerge?: string | string[];\n /**\n * lazyUpdate config for echarts, default is `false`\n */\n readonly lazyUpdate?: boolean;\n /**\n * showLoading config for echarts, default is `false`\n */\n readonly showLoading?: boolean;\n /**\n * loadingOption config for echarts, default is `null`\n */\n readonly loadingOption?: any;\n /**\n * echarts opts config, default is `{}`\n */\n readonly opts?: Opts;\n /**\n * when after chart render, do the callback with echarts instance\n */\n readonly onChartReady?: (instance: EChartsInstance) => void;\n /**\n * bind events, default is `{}`\n */\n readonly onEvents?: Record<string, Function>;\n /**\n * should update echarts options\n */\n readonly shouldSetOption?: (prevProps: EChartsReactProps, props: EChartsReactProps) => boolean;\n\n /**\n * should trigger resize when window resize\n */\n readonly autoResize?: boolean;\n};\n"]}
package/lib/types.d.ts CHANGED
@@ -1,6 +1,9 @@
1
- import { CSSProperties } from 'react';
2
- import type { EChartsOption, EChartsType } from 'echarts';
3
- export type { EChartsOption };
1
+ import type { CSSProperties } from 'react';
2
+ import type { EChartsType } from 'echarts';
3
+ /**
4
+ * Solve the type conflict caused by multiple type files
5
+ */
6
+ export type EChartsOption = any;
4
7
  export type EChartsInstance = EChartsType;
5
8
  export type Opts = {
6
9
  readonly devicePixelRatio?: number;
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import { CSSProperties } from 'react';\nimport type { EChartsOption, EChartsType } from 'echarts';\n\nexport type { EChartsOption };\n\nexport type EChartsInstance = EChartsType;\n\nexport type Opts = {\n readonly devicePixelRatio?: number;\n readonly renderer?: 'canvas' | 'svg';\n readonly width?: number | null | undefined | 'auto';\n readonly height?: number | null | undefined | 'auto';\n readonly locale?: string;\n};\n\nexport type EChartsReactProps = {\n /**\n * echarts library entry, use it for import necessary.\n */\n readonly echarts?: any;\n /**\n * `className` for container\n */\n readonly className?: string;\n /**\n * `style` for container\n */\n readonly style?: CSSProperties;\n /**\n * echarts option\n */\n readonly option: EChartsOption;\n /**\n * echarts theme config, can be:\n * 1. theme name string\n * 2. theme object\n */\n readonly theme?: string | Record<string, any>;\n /**\n * notMerge config for echarts, default is `false`\n */\n readonly notMerge?: boolean;\n /**\n * replaceMerge config for echarts, default is `null`\n */\n readonly replaceMerge?: string | string[];\n /**\n * lazyUpdate config for echarts, default is `false`\n */\n readonly lazyUpdate?: boolean;\n /**\n * showLoading config for echarts, default is `false`\n */\n readonly showLoading?: boolean;\n /**\n * loadingOption config for echarts, default is `null`\n */\n readonly loadingOption?: any;\n /**\n * echarts opts config, default is `{}`\n */\n readonly opts?: Opts;\n /**\n * when after chart render, do the callback with echarts instance\n */\n readonly onChartReady?: (instance: EChartsInstance) => void;\n /**\n * bind events, default is `{}`\n */\n readonly onEvents?: Record<string, Function>;\n /**\n * should update echarts options\n */\n readonly shouldSetOption?: (prevProps: EChartsReactProps, props: EChartsReactProps) => boolean;\n\n /**\n * should trigger resize when window resize\n */\n readonly autoResize?: boolean;\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CSSProperties } from 'react';\nimport type { EChartsType } from 'echarts';\n\n/**\n * Solve the type conflict caused by multiple type files\n */\nexport type EChartsOption = any;\n\nexport type EChartsInstance = EChartsType;\n\nexport type Opts = {\n readonly devicePixelRatio?: number;\n readonly renderer?: 'canvas' | 'svg';\n readonly width?: number | null | undefined | 'auto';\n readonly height?: number | null | undefined | 'auto';\n readonly locale?: string;\n};\n\nexport type EChartsReactProps = {\n /**\n * echarts library entry, use it for import necessary.\n */\n readonly echarts?: any;\n /**\n * `className` for container\n */\n readonly className?: string;\n /**\n * `style` for container\n */\n readonly style?: CSSProperties;\n /**\n * echarts option\n */\n readonly option: EChartsOption;\n /**\n * echarts theme config, can be:\n * 1. theme name string\n * 2. theme object\n */\n readonly theme?: string | Record<string, any>;\n /**\n * notMerge config for echarts, default is `false`\n */\n readonly notMerge?: boolean;\n /**\n * replaceMerge config for echarts, default is `null`\n */\n readonly replaceMerge?: string | string[];\n /**\n * lazyUpdate config for echarts, default is `false`\n */\n readonly lazyUpdate?: boolean;\n /**\n * showLoading config for echarts, default is `false`\n */\n readonly showLoading?: boolean;\n /**\n * loadingOption config for echarts, default is `null`\n */\n readonly loadingOption?: any;\n /**\n * echarts opts config, default is `{}`\n */\n readonly opts?: Opts;\n /**\n * when after chart render, do the callback with echarts instance\n */\n readonly onChartReady?: (instance: EChartsInstance) => void;\n /**\n * bind events, default is `{}`\n */\n readonly onEvents?: Record<string, Function>;\n /**\n * should update echarts options\n */\n readonly shouldSetOption?: (prevProps: EChartsReactProps, props: EChartsReactProps) => boolean;\n\n /**\n * should trigger resize when window resize\n */\n readonly autoResize?: boolean;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echarts-for-react",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": " Apache Echarts components for React.",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",
@@ -56,7 +56,7 @@
56
56
  "cross-env": "^7.0.3",
57
57
  "dumi": "^1.1.6",
58
58
  "dumi-theme-default": "^1.0.6",
59
- "echarts": "^5.0.2",
59
+ "echarts": "^6.0.0",
60
60
  "echarts-gl": "^2.0.2",
61
61
  "eslint": "^7.20.0",
62
62
  "eslint-config-prettier": "^8.1.0",
@@ -84,7 +84,7 @@
84
84
  },
85
85
  "peerDependencies": {
86
86
  "react": "^15.0.0 || >=16.0.0",
87
- "echarts": "^3.0.0 || ^4.0.0 || ^5.0.0"
87
+ "echarts": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0"
88
88
  },
89
89
  "jest": {
90
90
  "runner": "jest-electron/runner",
package/src/types.ts CHANGED
@@ -1,7 +1,10 @@
1
- import { CSSProperties } from 'react';
2
- import type { EChartsOption, EChartsType } from 'echarts';
1
+ import type { CSSProperties } from 'react';
2
+ import type { EChartsType } from 'echarts';
3
3
 
4
- export type { EChartsOption };
4
+ /**
5
+ * Solve the type conflict caused by multiple type files
6
+ */
7
+ export type EChartsOption = any;
5
8
 
6
9
  export type EChartsInstance = EChartsType;
7
10