View source: R/chart_amCandlestick.R
amCandlestick | R Documentation |
amCandlestick computes a candlestick chart of the given value.
amCandlestick( data, xlab = "", ylab = "", horiz = FALSE, positiveColor = "#7f8da9", negativeColor = "#db4c3c", names = c("low", "open", "close", "high"), dataDateFormat = NULL, minPeriod = ifelse(!is.null(dataDateFormat), "DD", ""), ... )
data |
|
xlab |
|
ylab |
|
horiz |
|
positiveColor |
|
negativeColor |
|
names |
|
dataDateFormat |
|
minPeriod |
|
... |
see |
See online documentation https://datastorm-open.github.io/introduction_ramcharts/ and amChartsAPI
amOptions, amBarplot, amBoxplot, amHist, amPie, amPlot, amTimeSeries, amStockMultiSet, amBullet, amRadar, amWind, amFunnel, amAngularGauge, amSolidGauge, amMekko, amCandlestick, amFloatingBar, amOHLC, amWaterfall
data("data_candleStick2") amCandlestick(data = data_candleStick2) ## Not run: # Change colors amCandlestick(data = data_candleStick2, positiveColor = "black", negativeColor = "green") # Naming the axes amCandlestick(data = data_candleStick2, xlab = "categories", ylab = "values") # Rotate the labels for x axis amCandlestick(data = data_candleStick2, labelRotation = 90) # Change names amCandlestick(data = data_candleStick2, names = c("min", "begin", "end", "max")) # Horizontal chart : amCandlestick(data = data_candleStick2, horiz = TRUE) # Parse date amCandlestick(data = data_candleStick2, dataDateFormat = "YYYY-MM-DD") # Datas over months data_candleStick2$category <- c("2015-01-01", "2015-02-01", "2015-03-01", "2015-04-01", "2015-05-01", "2015-06-01", "2015-07-01", "2015-08-01", "2015-09-01", "2015-10-01", "2015-11-01", "2015-12-01") amCandlestick(data = data_candleStick2, dataDateFormat = "YYYY-MM-DD", minPeriod = "MM") # Decimal precision if (requireNamespace("pipeR", quietly = TRUE)) { require(pipeR) amCandlestick(data = data_candleStick2, horiz = TRUE) %>>% setProperties(precision = 2) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.