hustcc / echarts-for-react

⛳️ Apache ECharts components for React wrapper. 一个简单的 Apache echarts 的 React 封装。
https://git.hust.cc/echarts-for-react
MIT License
4.56k stars 633 forks source link

feat: please support echarts v5.0 #388

Closed dongliutony closed 3 years ago

dongliutony commented 3 years ago

I encountered below errors when updated echarts to v5.0:

System complains that it cannot find below functions, such as getInstanceByDom().

var EchartsReactCore = function (_Component) { _inherits(EchartsReactCore, _Component);

function EchartsReactCore(props) { _classCallCheck(this, EchartsReactCore);

var _this = _possibleConstructorReturn(this, (EchartsReactCore.__proto__ || Object.getPrototypeOf(EchartsReactCore)).call(this, props));

_this.getEchartsInstance = function () {
  return _this.echartsLib.getInstanceByDom(_this.echartsElement) || _this.echartsLib.init(_this.echartsElement, _this.props.theme, _this.props.opts);
};

_this.dispose = function () {
  if (_this.echartsElement) {
    try {
      (0, _sizeSensor.clear)(_this.echartsElement);
    } catch (e) {
      console.warn(e);
    }
    // dispose echarts instance
    _this.echartsLib.dispose(_this.echartsElement);
  }
};
hustcc commented 3 years ago

can helpto give us a pr

zachsa commented 3 years ago

Ahh. I am getting the same issue. Will have to rollback to echarts 4 for now

yifans commented 3 years ago

I am also getting the same issue and rollback to V4. V5 offers lots of new features, looking forward the update to support V5~

theDoinb commented 3 years ago

+1

thetylerwolf commented 3 years ago

This library has been great. Would be even greater with echarts 5!

+1

hustcc commented 3 years ago

最近两周看看。

I will finish v5 in 2 weeks, has anyone want to contribute?

zachsa commented 3 years ago

I would be interested in taking a look early January. I'm not sure what needs to change though?

hustcc commented 3 years ago

v3 is on the way.

glaucopater commented 3 years ago

最近两周看看。

I will finish v5 in 2 weeks, has anyone want to contribute?

I do, how can I help?

hustcc commented 3 years ago

最近两周看看。

I will finish v5 in 2 weeks, has anyone want to contribute?

I do, how can I help?

Help me to write the website and demo on v3 branch.

greatbear412 commented 3 years ago

最近两周看看。

I will finish v5 in 2 weeks, has anyone want to contribute?

I do, how can I help?

Help me to write the website and demo on v3 branch.

详细说说. Willing to help.

pedroviniv commented 3 years ago

Thank you very much for building such a great lib, I've been using a lot in my projects! 💯 any progress in this feature? is there anything I could help? I'm really excited to see this working with echarts 5.0, this version has enhancements in label overlapping problems

xingangsun commented 3 years ago

@hustcc 既然是react,考虑支持一下 hooks?

Veigar-C commented 3 years ago

这个月能出个版本吗?图表一多,resize 和 id create 写到头皮发麻

dmozzoni commented 3 years ago

The newer echarts changed how it gets exported. I hand edited the index.js in the lib folder to get echarts 5 to work. I'm sure there is a better way though.

If you replace line 33 in the echarts-for-react/lib/index.js: _this.echartsLib = _echarts2['default']; with: _this.echartsLib = _echarts2['default'] || _echarts2 ;

hsluoyz commented 3 years ago

Any progress?

ISBN9527 commented 3 years ago

The latest progress ?

zhenzhenmao commented 3 years ago

最近两周看看。

I will finish v5 in 2 weeks, has anyone want to contribute?

I do, how can I help?

Help me to write the website and demo on v3 branch.

详细说说. Willing to help.

最近两周看看。

I will finish v5 in 2 weeks, has anyone want to contribute?

I do, how can I help?

Help me to write the website and demo on v3 branch.

已经修复了么,没有修复的话,我愿意帮忙

Braffolk commented 3 years ago

Any update on this?

jrdzha commented 3 years ago

Also curious if there is any update here? Perhaps a PR we can take a look at?

hustcc commented 3 years ago

Sorry, I'm very busy these days. I have to deal with it during the Spring Festival.

Set up a flag 🚩 before 02-18, I will release a beta version.

hustcc commented 3 years ago

Sorry, I'm very busy these days. I have to deal with it during the Spring Festival.

Set up a flag 🚩 before 02-18, I will release a beta version.

+ echarts-for-react@3.0.0-beta.1

beta.1 is released, have a try! after Spring Festival, will release stable. Welcome to:

nkenobi commented 3 years ago

Nice work - thanks!