Giter Club home page Giter Club logo

Comments (8)

hustcc avatar hustcc commented on August 17, 2024

width可以自己在外面包裹一下来定制,例如:

<div className="chart_wrapper">
    <ReactEcharts
        option={this.getOtion()} 
        height={300} />
</div>

然后设置css:

.chart_wrapper {
     width: 60%;
}

from echarts-for-react.

codering avatar codering commented on August 17, 2024

个人觉得应该直接对外暴露className, style属性,不用height.

from echarts-for-react.

hustcc avatar hustcc commented on August 17, 2024

@codering 是的,开始也这么考虑的,开放style和class,不用height~
准备下个版本这么做。欢迎pr^_^~

from echarts-for-react.

hustcc avatar hustcc commented on August 17, 2024

@hihl @codering v1.1.1 增加className, style,去掉height属性,使用v1.1.0版本将默认height=300px.

from echarts-for-react.

byenow avatar byenow commented on August 17, 2024

@hustcc 建议修改一下README

from echarts-for-react.

hustcc avatar hustcc commented on August 17, 2024

@byenow 需要修改什么?

from echarts-for-react.

byenow avatar byenow commented on August 17, 2024

http://7xrn7f.com1.z0.glb.clouddn.com/16-7-18/42485883.jpg

from echarts-for-react.

hustcc avatar hustcc commented on August 17, 2024

@byenow 感谢提醒,包括demo代码中也有很多的height属性~~~
已经修改~

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.