Giter Club home page Giter Club logo

Comments (5)

Lchiffon avatar Lchiffon commented on August 17, 2024

请看这里
http://taiyun.github.io/recharts/interface.html#section-3.2.2

安装请使用:

devtools::install_github("taiyun/recharts@dev")

from recharts.

c101088 avatar c101088 commented on August 17, 2024

from recharts.

GofunTR avatar GofunTR commented on August 17, 2024

上述链接打不开了,能否请解释一下目前怎么实现双Y轴?

from recharts.

c101088 avatar c101088 commented on August 17, 2024

以下是我实现双Y轴绘图的方法:

  1. 按照要求安装recharts包:
    require(devtools)
    devtools::install_github('cosname/recharts')
  2. 在描述坐标轴属性时,规定yAxis有两个内容:
    ext<-list(
    xAxis=list(
    type="category",
    data=Date
    ),
    yAxis=list(
    list(
    type ="value",
    name="discharge(m3·s-1)",
    splitNumber="5",
    min = "0"
    ),
    list(
    type = "value",
    name = "precipitation(mm)",
    inverse="true",
    splitNumber ="5",
    min ="0"
    )
    )
    )
  3. 描述数据序列时,使用yAxisIndex变量确定该数据序列使用的Y轴:
    series<-list(
    list(
    name= "Qmea",
    type ="line",
    data = Qmea,
    yAxisIndex = "0"
    ),
    list(
    name= "Qcal",
    type ="line",
    data = Qcal,
    yAxisIndex = "0"
    ),
    list(
    name = "precipitation",
    type="bar",
    data =P,
    yAxisIndex = "1"
    )
    )
  4. 使用ePlot方法完成绘图:
    ePlot(series,ext)
    @GofunTR

from recharts.

GofunTR avatar GofunTR commented on August 17, 2024

@c101088 十分感谢!

from recharts.

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.