36 Commits

Author SHA1 Message Date
hustcc
6bbc4c5b0b
Bump version from 3.0.4 to 3.0.5 (#614) v3.0.5 2025-11-06 09:56:46 +08:00
Josh Kelley
809fc46d4b
Pass unknown (non-ECharts) props through to the div element (#602)
* Pass unknown props through to the div element

This fits common React conventions and allows using attributes such as `data-testid` for testing purposes.

Related changes:

- Adding HTMLAttributes<HTMLDivElement> to EChartsReactProps meant that EChartsReactProps was no longer usable as a `Record<string, unknown>`, which caused problems for the `pick` function.  (See https://stackoverflow.com/q/65799316/25507.). I updated the pick function to use a generic type instead.
- Add [ignoreRestSiblings](https://eslint.org/docs/latest/rules/no-unused-vars#ignorerestsiblings) so ESLint is happy with the new code.
- Fix an unrelated Prettier warning in `componentDidUpdate`.

There's a slight risk of backwards-incompatible changes in this release: IF the user previously passed unknown props (e.g., due to typos or mistaken props spreads), they were ignored, but they're now passed through to the div element.

Fixes #546

* Update tests

* Code review
2025-11-06 09:51:52 +08:00
George Gritsouk
a6945e8c49
Only unbind events passed from the parent component (#613)
`initEchartsInstance` attached a handler for the `"finish"` event. If
`componentDidUpdate` is called between attaching the handler, and firing
the handler and the `onEvents` prop changed, this will fire
`"offEvents"` which will remove the handler for the `"finish"` event.
This means the finish handler never fires, so the chart auto-resize is
not attached, and the ready event handler never fires.

Instead, only remove the events that are on the previous props, and
leave the `"finish"` callback alone.
2025-11-06 09:46:39 +08:00
sherotree
373982283c
chore: bump version to 3.0.4 and update ECharts dependency to 6.0.0 (… (#606)
* chore: bump version to 3.0.4 and update ECharts dependency to 6.0.0 (#601)

* docs: update README to reflect ECharts version support for v6.0.0

* fix: standardize formatting and improve code readability in dynamic, simple, and theme examples

* chore: update npm install script

---------

Co-authored-by: tangweikun <819573105@qq.com>
Co-authored-by: hustcc <i@hust.cc>
v3.0.4
2025-08-08 23:29:11 +08:00
hustcc
21665a5495
chore: update document (#601) 2025-07-01 12:51:40 +08:00
Stefan Fast
74434b88a6
fix: use type-only import for CSSProperties (#597) 2025-05-19 18:54:19 +08:00
xyz-26
da0dd2433f
fix: Declare EChartsOption type as any (#590) 2025-03-20 09:31:06 +08:00
hustcc
e150dc134c
chore: v3.0.3 (#588)
* chore: v3.0.3

* docs: update readme
2025-03-05 10:25:15 +08:00
Sen Wang
fcc1268f8e
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. (#444)
* 1. 仅事件变化时只刷新echart绑定的事件;2. 如果style或者className变化,先进行echarts.resize再刷新数据更合理

* 检视意见修改

* 增加测试用例

---------

Co-authored-by: Wang Sen <13710729@qq.com>
2025-03-05 10:19:33 +08:00
hustcc
670d9b1090
fix: update action workflow (#587)
* fix: update action workflow

* chore: jest down to v24 to fix ci
2025-03-05 09:57:54 +08:00
xyz-26
3381db666c
fix: Replace EChartsOption/EChartsInstance type (#586) 2025-03-05 09:39:08 +08:00
Zhou Fang
b07584bf81
Updated code transpilation for Next.js 13.1 or higher in readme file (#528)
* Updated code transpilation for Next.js 13.1 or higher

* docs: update readme for nextjs

---------

Co-authored-by: Zhou Fang <zhfaxb@syntronic.com>
Co-authored-by: hustcc <i@hust.cc>
2025-03-05 09:38:26 +08:00
official_dulin
0aa380c641
docs: update TS and useRef example (#554)
* Update README.md

* docs: add new line to format code

---------

Co-authored-by: hustcc <i@hust.cc>
2025-03-05 09:27:53 +08:00
hustcc
f8ee87fa8a
Update .umirc.js (#569) 2025-03-05 09:25:43 +08:00
Xalier
d151b141df
feat: Pass through replaceMerge when using setOption. (#520) 2025-01-10 13:36:05 +08:00
破竹
f90ab4a72b
Update types.ts (#562) 2024-02-17 20:48:04 +08:00
Xiaoyue Lin
e33247b9b8
docs(types): fix typo (#535)
* docs(types): fix typo

* chore: fix typo
2023-03-27 16:39:22 +08:00
fakership
a35220e42c
feat: whether to trigger this.resize when window resize (#490)
Co-authored-by: lidong.peace <lidong.peace@bytedance.com>
2022-09-01 12:59:19 +08:00
tison
0e98914b75
fix: TSLint export type (#498)
TS1205: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.
2022-08-24 09:07:54 +08:00
Scc
70d905146f
📝 doc: 修改README.md (#485)
Co-authored-by: chencong <chencong@dian.so>
2022-07-08 13:14:57 +08:00
Mo Beigi
0ab3861856
Fixes #460: Initialise echarts with correct width and height (#464)
* Fix initial echarts div size by using temporary render

* Remove timeout and replace with finished event

* Add tests for container size
2022-02-12 18:20:31 +11:00
Mr-Milk
6f49a851ec
Add a section for next.js user on reducing bundle size (#470) 2022-01-18 10:02:20 +08:00
hustcc
7fc5c33c0b chore: v3.0.2 v3.0.2 2021-10-29 11:40:00 +08:00
Mo Beigi
7be262ced1
Allow resize to occur if style or className have changed (#459) 2021-10-29 11:22:17 +08:00
n0099
7d20c9a950
getEchartsInstance方法没有注明返回值类型 (#429)
* getEchartsInstance方法没有注明返回值类型

* forgot to import ECharts type

* Update core.tsx
2021-10-28 10:29:03 +08:00
Mo Beigi
4748dda3c9
Fix animations being cancelled by initial render resize (#458)
This change fixes the issue where echarts animations are cancelled because there is a resize() call that occurs directly after the initial render.
2021-10-28 10:28:51 +08:00
Baorong Li
e261fd8ecb
fix(docs): xAxis "0" not found when import ECharts.js modules manually (#414)
Co-authored-by: Baorong Li <superlbr@gmail.com>
2021-02-27 15:53:41 +08:00
hustcc
0df82ff38d
chore: update deps (#413) v3.0.1 2021-02-26 09:31:42 +08:00
Sylvain Thénault
e9cf9ade40
Add locale to Opts type (#412)
* Add locale to Opts type

as available in echarts v5

* Add example of using Opts.locale to the demo website

Co-authored-by: Sylvain Thénault <sylvain.thenault@lowatt.fr>
2021-02-25 18:15:29 +08:00
hustcc
787cee1750
chore: v3.0.0 released (#409) v3.0.0 2021-02-19 10:37:51 +08:00
sjfkai
be5f5aa8c3
docs: add code sample of manually import modules in echarts v5 (#407) 2021-02-18 14:21:21 +08:00
hustcc
a415b3075d
docs: readme & ga (#405)
* docs: update readme

* chore: add ga

* chore: add baidu tongji

* chore: remove baidu zhanzhang meta

* chore: update slogan
2021-02-10 15:01:53 +08:00
hustcc
2da279172b
chore: v3.0.0-beta.2 (#404) 3.0.0-beta.2 2021-02-07 20:16:45 +08:00
hustcc
1d48dacd3f
fix(docs): base url 404 (#403) 3.0.0-beta.1 2021-02-07 19:30:41 +08:00
hustcc
0afc47d463 docs: update badge order 2021-02-07 18:04:51 +08:00
hustcc
469acda80b chore: init 3.0.0-beta.1 2021-02-07 18:03:59 +08:00