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 +3 -3
- package/esm/types.d.ts +6 -3
- package/esm/types.js.map +1 -1
- package/lib/types.d.ts +6 -3
- package/lib/types.js.map +1 -1
- package/package.json +3 -3
- package/src/types.ts +6 -3
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
|
[](https://www.npmjs.com/package/echarts-for-react)
|
|
6
6
|
[](https://github.com/hustcc/echarts-for-react/actions/workflows/build.yml)
|
|
7
7
|
[](https://coveralls.io/github/hustcc/echarts-for-react)
|
|
8
8
|
[](https://www.npmjs.com/package/echarts-for-react)
|
|
9
9
|
[](https://www.npmjs.com/package/echarts-for-react)
|
|
10
|
-

|
|
10
|
+

|
|
11
11
|

|
|
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 {
|
|
3
|
-
|
|
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 {
|
|
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 {
|
|
3
|
-
|
|
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 {
|
|
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
|
+
"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": "^
|
|
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 {
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { EChartsType } from 'echarts';
|
|
3
3
|
|
|
4
|
-
|
|
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
|
|