Git Product home page Git Product logo

Comments (5)

hustcc avatar hustcc commented on May 22, 2024

What‘s your react version and other env ?

from echarts-for-react.

wu123456 avatar wu123456 commented on May 22, 2024

[email protected]
[email protected]

from echarts-for-react.

hustcc avatar hustcc commented on May 22, 2024

可以把你写的代码核心部分贴出来吧?我今天抽空自己测试了一下,是可以运行的o(〃'▽'〃)o

from echarts-for-react.

wu123456 avatar wu123456 commented on May 22, 2024

补充一个
[email protected] extraneous

还有我把代码缩减到

'use strict';

var React = require('react');
var ReactDOM = require('react-dom');
var ReactEcharts = require('echarts-for-react/lib/echarts-for-react');

ReactDOM.render(
    <ReactEcharts 
        option={{}} 
        style={{height: '200px', width: '100px'}}  />,
    document.getElementById('example')
);

尝试过用webpack 和 watchify 打包,结果都是一样的。
image

option尝试过填入http://echarts.baidu.com/demo.html#area-rainfall 官网demo的数据,也一样显示不出来。

还有试过运行readme的demo,是可以展示出来的。

可能是我哪里用的不对。

from echarts-for-react.

hustcc avatar hustcc commented on May 22, 2024

运行过了,确实存在问题。必须使用

import ReactEcharts from './lib/echarts-for-react.js';

才行,ES5写法确实存在这个问题,之前我理解错了你的问题呢。建议你还是使用上面代码的方法,然后加个一个loader吧~ ^_^~

刚刚已经修正,请下载v1.1.3版本,我本地测试通过。

from echarts-for-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.