【问题标题】:Showing all values on one point on x axis and changing range for rCharts highcharts在 x 轴上的一个点上显示所有值并更改 rCharts highcharts 的范围
【发布时间】:2017-02-21 21:19:07
【问题描述】:

我刚刚进入 rCharts,我想增强我的图表。

  • 我想更改图表中轴的最小值/最大值,

  • 我还想在 x 轴上显示每个点的所有值 当我将鼠标悬停在它上面时。目前,我每 x 只能查看一个数据点 当我将鼠标悬停在轴上时

有人可以帮我展示一下它的语法吗?非常感谢。

library(rCharts)
h <- Highcharts$new()
h$xAxis(categories = c('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
                       'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'))
h$yAxis(list(list(title = list(text = 'Rainfall'))
             , list(title = list(text = 'Temperature'), opposite = TRUE)
             , list(title = list(text = 'Sea Pressure'), opposite = TRUE))
)
h$series(name = 'Rainfall', type = 'column', color = '#4572A7',
         data = c(49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4))
h$series(name = 'Temperature', type = 'spline', color = '#89A54E',
         data = c(7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6),
         yAxis = 1)

h$series(name = 'Sea-Level Pressure', type = 'spline', color = '#AA4643',
         data = c(1016, 1016, 1015.9, 1015.5, 1012.3, 1009.5, 1009.6, 1010.2, 1013.1, 1016.9, 1018.2, 1016.7),
         yAxis = 2)
h

【问题讨论】:

    标签: r highcharts rcharts


    【解决方案1】:

    到目前为止,您尝试/搜索了什么?

    【讨论】:

    • 工具提示技巧奏效了!我试图更改 tickInterval 但它没有显示任何内容。至于最小值,最大值,我不确定合适的语法
    猜你喜欢
    • 2018-05-20
    • 2013-06-10
    • 2023-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-03
    相关资源
    最近更新 更多