EVOLUTION-MANAGER
Edit File: hc_annotations.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: Annotations options for highcharter objects</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_annotations {highcharter}"><tr><td>hc_annotations {highcharter}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Annotations options for highcharter objects</h2> <h3>Description</h3> <p>A basic type of an annotation. It allows to add custom labels or shapes. The items can be tied to points, axis coordinates or chart pixel coordinates. </p> <h3>Usage</h3> <pre> hc_annotations(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/annotations">https://api.highcharts.com/highcharts/annotations</a>.</p> </td></tr> </table> <h3>Examples</h3> <pre> # Ex 1 highchart() %>% hc_add_series( data = c(29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4) ) %>% hc_xAxis( tickInterval = 0.5, gridLineWidth = 1 ) %>% hc_annotations( list( labels = list( list( point = list(x = 3, y = 129.2, xAxis = 0, yAxis = 0), text = "x: {x}<br/>y: {y}" ), list( point = list(x = 9, y = 194.1, xAxis = 0, yAxis = 0), text = "x: {x}<br/>y: {y}" ), list( point = list(x = 5, y = 100, xAxis = 0), text = "x: {x}<br/>y: {point.plotY} px" ), list( point = list(x = 0, y = 0), text = "x: {point.plotX} px<br/>y: {point.plotY} px" ) ) ) ) # Ex 2 df <- data.frame( x = 1:10, y = 1:10 ) highchart() %>% hc_add_series(data = df, hcaes(x = x, y = y), type = "area") %>% hc_annotations( list( labels = list( list(point = list(x = 5, y = 5, xAxis = 0, yAxis = 0), text = "Middle"), list(point = list(x = 1, y = 1, xAxis = 0, yAxis = 0), text = "Start") ) ) ) </pre> <hr /><div style="text-align: center;">[Package <em>highcharter</em> version 0.9.4 <a href="00Index.html">Index</a>]</div> </body></html>