EVOLUTION-MANAGER
Edit File: hc_add_yAxis.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Creating multiples yAxis t use with highcharts</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for hc_yAxis_multiples {highcharter}"><tr><td>hc_yAxis_multiples {highcharter}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Creating multiples yAxis t use with highcharts</h2> <h3>Description</h3> <p>The Y axis or value axis. Normally this is the vertical axis, though if the chart is inverted this is the horizontal axis. Add yAxis allows to add multiple axis with a relative height between Y axis. Based upon the <code>relative</code> parameter the height of each Y axis is recalculated. Otherwise the parameters are as supported by Y axis. </p> <h3>Usage</h3> <pre> hc_yAxis_multiples(hc, ...) hc_xAxis_multiples(hc, ...) hc_zAxis_multiples(hc, ...) create_axis( naxis = 2, heights = 1, sep = 0.01, offset = 0, turnopposite = TRUE, ... ) create_yaxis(...) hc_add_yAxis(hc, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>hc</code></td> <td> <p>A <code>highchart</code> <code>htmlwidget</code> object.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Arguments defined in <a href="https://api.highcharts.com/highcharts/yAxis">https://api.highcharts.com/highcharts/yAxis</a>.</p> </td></tr> <tr valign="top"><td><code>naxis</code></td> <td> <p>Number of axis an integer.</p> </td></tr> <tr valign="top"><td><code>heights</code></td> <td> <p>A numeric vector. This values will be normalized.</p> </td></tr> <tr valign="top"><td><code>sep</code></td> <td> <p>A numeric value for the separation (in percentage) for the panes.</p> </td></tr> <tr valign="top"><td><code>offset</code></td> <td> <p>A numeric value (in percentage).</p> </td></tr> <tr valign="top"><td><code>turnopposite</code></td> <td> <p>A logical value to turn the side of each axis or not.</p> </td></tr> </table> <h3>Examples</h3> <pre> highchart() %>% hc_yAxis_multiples(create_axis(naxis = 2, heights = c(2, 1))) %>% hc_add_series(data = c(1, 3, 2), yAxis = 0) %>% hc_add_series(data = c(20, 40, 10), yAxis = 1) highchart() %>% hc_yAxis_multiples(create_axis(naxis = 3, lineWidth = 2, title = list(text = NULL))) %>% hc_add_series(data = c(1, 3, 2)) %>% hc_add_series(data = c(20, 40, 10), type = "area", yAxis = 1) %>% hc_add_series(data = c(200, 400, 500), yAxis = 2) %>% hc_add_series(data = c(500, 300, 400), type = "areaspline", yAxis = 2) # Retrieve stock data to plot. aapl <- quantmod::getSymbols("AAPL", src = "yahoo", from = "2020-01-01", auto.assign = FALSE ) # Plot prices and volume with relative height. highchart(type = "stock") %>% hc_title(text = "AAPLE") %>% hc_add_series(aapl, yAxis = 0, showInLegend = FALSE) %>% hc_add_yAxis(nid = 1L, title = list(text = "Prices"), relative = 2) %>% hc_add_series(aapl[, "AAPL.Volume"], yAxis = 1, type = "column", showInLegend = FALSE) %>% hc_add_yAxis(nid = 2L, title = list(text = "Volume"), relative = 1) </pre> <hr /><div style="text-align: center;">[Package <em>highcharter</em> version 0.9.4 <a href="00Index.html">Index</a>]</div> </body></html>