Compare Versions - echarts-for-react
npm / echarts-for-react / Compare Versions
What's Changed
- Only unbind events passed from the parent component by @gggritso in https://github.com/hustcc/echarts-for-react/pull/613
- Pass unknown (non-ECharts) props through to the div element by @joshkel in https://github.com/hustcc/echarts-for-react/pull/602
- Bump version from 3.0.4 to 3.0.5 by @hustcc in https://github.com/hustcc/echarts-for-react/pull/614
New Contributors
- @gggritso made their first contribution in https://github.com/hustcc/echarts-for-react/pull/613
- @joshkel made their first contribution in https://github.com/hustcc/echarts-for-react/pull/602
Full Changelog: https://github.com/hustcc/echarts-for-react/compare/v3.0.4...v3.0.5
What's Changed
- Add a section for next.js user on reducing bundle size by @Mr-Milk in https://github.com/hustcc/echarts-for-react/pull/470
- Fixes #460: Initialise echarts with correct width and height by @mobeigi in https://github.com/hustcc/echarts-for-react/pull/464
- :memo: doc: 修改README.md by @scc02 in https://github.com/hustcc/echarts-for-react/pull/485
- fix: TSLint export type by @tisonkun in https://github.com/hustcc/echarts-for-react/pull/498
- feat: whether to trigger
this.resizewhen window resize by @fakership in https://github.com/hustcc/echarts-for-react/pull/490 - docs(types): fix typo by @100gle in https://github.com/hustcc/echarts-for-react/pull/535
- Update types.ts by @poozhu in https://github.com/hustcc/echarts-for-react/pull/562
- feat: Pass through replaceMerge when using setOption. by @Xalier in https://github.com/hustcc/echarts-for-react/pull/520
- docs: update .umirc.js by @hustcc in https://github.com/hustcc/echarts-for-react/pull/569
- docs: update TS and useRef example by @mrdulin in https://github.com/hustcc/echarts-for-react/pull/554
- Updated code transpilation for Next.js 13.1 or higher in readme file by @linkfang in https://github.com/hustcc/echarts-for-react/pull/528
- fix: Replace EChartsOption/EChartsInstance type by @xyz-26 in https://github.com/hustcc/echarts-for-react/pull/586
- fix: update action workflow by @hustcc in https://github.com/hustcc/echarts-for-react/pull/587
- Fix #446, #447 issues. 1) Only refresh the events bound by echart when the event changes. 2) If the style or classname changes, it's more reasonable to refresh the data after performing charts.resize first. by @iitodo in https://github.com/hustcc/echarts-for-react/pull/444
- chore: v3.0.3 by @hustcc in https://github.com/hustcc/echarts-for-react/pull/588
- fix: Solve the options type conflict caused by multiple type files. A… by @xyz-26 in https://github.com/hustcc/echarts-for-react/pull/590
- Use type-only import for CSSProperties by @stefan-fast in https://github.com/hustcc/echarts-for-react/pull/597
- chore: update document by @hustcc in https://github.com/hustcc/echarts-for-react/pull/601
- chore: bump version to 3.0.4 and update ECharts dependency to 6.0.0 (… by @sherotree in https://github.com/hustcc/echarts-for-react/pull/606
New Contributors
- @Mr-Milk made their first contribution in https://github.com/hustcc/echarts-for-react/pull/470
- @scc02 made their first contribution in https://github.com/hustcc/echarts-for-react/pull/485
- @tisonkun made their first contribution in https://github.com/hustcc/echarts-for-react/pull/498
- @fakership made their first contribution in https://github.com/hustcc/echarts-for-react/pull/490
- @100gle made their first contribution in https://github.com/hustcc/echarts-for-react/pull/535
- @poozhu made their first contribution in https://github.com/hustcc/echarts-for-react/pull/562
- @Xalier made their first contribution in https://github.com/hustcc/echarts-for-react/pull/520
- @mrdulin made their first contribution in https://github.com/hustcc/echarts-for-react/pull/554
- @linkfang made their first contribution in https://github.com/hustcc/echarts-for-react/pull/528
- @xyz-26 made their first contribution in https://github.com/hustcc/echarts-for-react/pull/586
- @iitodo made their first contribution in https://github.com/hustcc/echarts-for-react/pull/444
- @stefan-fast made their first contribution in https://github.com/hustcc/echarts-for-react/pull/597
- @sherotree made their first contribution in https://github.com/hustcc/echarts-for-react/pull/606
Full Changelog: https://github.com/hustcc/echarts-for-react/compare/v3.0.2...v3.0.4
What's Changed
- Add a section for next.js user on reducing bundle size by @Mr-Milk in https://github.com/hustcc/echarts-for-react/pull/470
- Fixes #460: Initialise echarts with correct width and height by @mobeigi in https://github.com/hustcc/echarts-for-react/pull/464
- :memo: doc: 修改README.md by @scc02 in https://github.com/hustcc/echarts-for-react/pull/485
- fix: TSLint export type by @tisonkun in https://github.com/hustcc/echarts-for-react/pull/498
- feat: whether to trigger
this.resizewhen window resize by @fakership in https://github.com/hustcc/echarts-for-react/pull/490 - docs(types): fix typo by @100gle in https://github.com/hustcc/echarts-for-react/pull/535
- Update types.ts by @poozhu in https://github.com/hustcc/echarts-for-react/pull/562
- feat: Pass through replaceMerge when using setOption. by @Xalier in https://github.com/hustcc/echarts-for-react/pull/520
- docs: update .umirc.js by @hustcc in https://github.com/hustcc/echarts-for-react/pull/569
- docs: update TS and useRef example by @mrdulin in https://github.com/hustcc/echarts-for-react/pull/554
- Updated code transpilation for Next.js 13.1 or higher in readme file by @linkfang in https://github.com/hustcc/echarts-for-react/pull/528
- fix: Replace EChartsOption/EChartsInstance type by @xyz-26 in https://github.com/hustcc/echarts-for-react/pull/586
- fix: update action workflow by @hustcc in https://github.com/hustcc/echarts-for-react/pull/587
- Fix #446, #447 issues. 1) Only refresh the events bound by echart when the event changes. 2) If the style or classname changes, it's more reasonable to refresh the data after performing charts.resize first. by @iitodo in https://github.com/hustcc/echarts-for-react/pull/444
New Contributors
- @Mr-Milk made their first contribution in https://github.com/hustcc/echarts-for-react/pull/470
- @scc02 made their first contribution in https://github.com/hustcc/echarts-for-react/pull/485
- @tisonkun made their first contribution in https://github.com/hustcc/echarts-for-react/pull/498
- @fakership made their first contribution in https://github.com/hustcc/echarts-for-react/pull/490
- @100gle made their first contribution in https://github.com/hustcc/echarts-for-react/pull/535
- @poozhu made their first contribution in https://github.com/hustcc/echarts-for-react/pull/562
- @Xalier made their first contribution in https://github.com/hustcc/echarts-for-react/pull/520
- @mrdulin made their first contribution in https://github.com/hustcc/echarts-for-react/pull/554
- @linkfang made their first contribution in https://github.com/hustcc/echarts-for-react/pull/528
- @xyz-26 made their first contribution in https://github.com/hustcc/echarts-for-react/pull/586
- @iitodo made their first contribution in https://github.com/hustcc/echarts-for-react/pull/444
Full Changelog: https://github.com/hustcc/echarts-for-react/compare/v3.0.2...v3.0.3
What's Changed
- fix(docs): xAxis "0" not found when import ECharts.js modules manually by @superlbr in https://github.com/hustcc/echarts-for-react/pull/414
- Fix animations being cancelled by initial render resize by @mobeigi in https://github.com/hustcc/echarts-for-react/pull/458
- getEchartsInstance方法没有注明返回值类型 by @n0099 in https://github.com/hustcc/echarts-for-react/pull/429
- Allow resize to occur if style or className have changed by @mobeigi in https://github.com/hustcc/echarts-for-react/pull/459
New Contributors
- @superlbr made their first contribution in https://github.com/hustcc/echarts-for-react/pull/414
- @mobeigi made their first contribution in https://github.com/hustcc/echarts-for-react/pull/458
- @n0099 made their first contribution in https://github.com/hustcc/echarts-for-react/pull/429
Full Changelog: https://github.com/hustcc/echarts-for-react/compare/v3.0.1...v3.0.2
- add opts.locale config.
本次升级主要的内容在于:
1. 支持 echarts v5 最新版本

2. 完全 typescript
之前是在 React 0.14 时代,还是使用 props-types 校验 props,然后 ts 类型定义单独自己手写,也非常痛苦。所以这次直接使用 ts 写,自动生成 类型定义 文件。
3. 单测覆盖率
之前使用 jest-canvas-mock 进行单元测试,毕竟是 mock 而不是真实运营,所有一些逻辑测试不到,覆盖率一直提不上去。
所以这次换成了 jest-electron,真实运行,覆盖率直接提升到 ,运行也改成使用 GitHub action 了。当然 jest-electron 这个模块,也是为了给 AntV 系列技术栈做单测,而开发的轮子,个人觉得还是挺好用的。
4. 全新官网
之前的官网是自己初学 React 的时候,完全自己搭建的,没有 lint、ci,代码凌乱,样式也不好看。所以这次直接使用 dumi 这个库自动生成,网站全部 markdown 开发,也方便大家遇到官网 typo,直接一键提交 PR。

同时 Example 实例也可直接一键导航到其他代码编辑工具上。
5. README 排版
项目很简单,概念也很简单,所以直接 Readme 作为 document,但是之前的文档结构、样式排版比较凌乱,所以按照现在的个人审美,重新写了写!
Fix issues:
- bind events duplicate, #155
- when
onEventsis null, will thrown, #154
Fixed:
- bug of 100px width * height canvas #149 #150
- events can not be removed #151
- add opts in typescript file #153
add new props of component named
opts. It can be used to set render chart withsvg.
新特性:自定义 import / 动态加载模块
在保持原来的使用方式不变的情况下, 用户可以可以自定义导入 echarts 中的模块,从而保证在少量使用 echarts 的情况下,减少打包出来的 JavaScript 文件大小。具体做法如下:
import React from 'react';
// import the core library.
import ReactEchartsCore from 'echarts-for-react/lib/core';
// then import echarts modules those you have used manually.
import echarts from 'echarts/lib/echarts';
import 'echarts/lib/chart/bar';
import 'echarts/lib/component/tooltip';
// The usage of ReactEchartsCore are same with above.
<ReactEchartsCore
echarts={echarts}
option={this.getOption()}
notMerge={true}
lazyUpdate={true}
theme={"theme_name"}
onChartReady={this.onChartReadyCallback}
onEvents={EventsDict} />
使用上,除了 import 的文件不一致之外,组件的使用方式和 props 和原来没有任何区别。
主要修复了:#12 #13 。
增加属性:
- notMerge
- lazyUpdate
并稳定运行近两个月。