Learn R Programming

⚠️There's a newer version (2.1.16) of this package.Take me there.

Introduction

This package allows to draw interactive charts from the JavaScript library AmCharts using Hmlwidgets.

Currently available chart types: funnel, gantt, gauge, pie, radar, serial, stock, xy.

Since it is still in developpment, some functionnalities might have an unexpected behavior. If you encounter the problem, do not hesitate to contact.

Please refer to this page http://datastorm-open.github.io/introduction_ramcharts/, you will find several examples and a quick tutorial.


Installation

The version 2.0.0 is available on CRAN:

install.packages("rAmCharts")

To install the "dev version" (v2.0.2), run the following code lines:

if (!require(devtools)) {
  install.packages("devtools")
} else {}

devtools::install_github("datastorm-open/rAmCharts")

NB:

  • Version 1.1.2 is based on AmCharts v3.17.2
  • Version 2.0.0 is based on AmCharts v3.18.2
  • Version 2.0.2 is based on AmCharts v3.20.3

Known issues

  • Problem in Shiny with Firefox (works with Chrome or Safari), the function renderAmcharts({NULL}) does not clear the chart, use conditionalPanel instead.
  • Use in R Markown needs either an url path "http://www.amcharts.com/lib/3" to find images or a local path e.g. system.file("htmlwidgets/lib", package = "rAmCharts"). HTML reports also need a call to the method plot.
library(rAmCharts)
data(iris)

amHist(iris$Sepal.Length, freq = FALSE, breaks = 30, col = "gray",
       path = "http://www.amcharts.com/lib/3")
# path = system.file("htmlwidgets/lib", package = "rAmCharts"))
  • Usual R colors work (for instance, light or dark prefixes), however the 'export' feature needs valid CSS colors. To be sure, use hexadecimal format if you want to use the 'export' feature.

Copy Link

Version

Install

install.packages('rAmCharts')

Monthly Downloads

662

Version

2.0.3

License

GPL (>= 2)

Maintainer

Jeffery Petit

Last Published

January 13th, 2025

Functions in rAmCharts (2.0.3)

AmBalloon-class

AmBalloon class
add_responsive_dependency

Add responsive dependency
amBullet

Plotting bullet chart using rAmCharts
add_dataloader_dependency

Add dataloader dependency
amBarplot

Plotting bar chart using rAmCharts
amBoxplot

Plotting boxplot using rAmCharts
amAngularGauge

Plotting gauge using rAmCharts
initialize,AmBalloon-method

Initializes an AmBalloon
add_theme_dependency

Add theme dependency
add_export_dependency

Add the export dependency to an htmlwidget
AmGraph-class

AmGraph class
amHist

Plotting histogram using rAmCharts
setExport

Setters for AmChart and AmStockChart.
amChartsOutput

SHINY
amFunnel

Plotting funnel chart using rAmCharts
amCandlestick

Plotting candlestick chart using rAmCharts
AmChart-class

AmChart
AmObject-class

AmObject class
amOptions

amOptions
amPlot

Plot serial data
AmStockChart-class

AmStockChart
amLines

amLines adds a serie to a graph.
amOHLC

Plotting OHLC chart using rAmCharts
amPie

Plotting pie chart using rAmCharts
amMekko

Plotting mekko chart (quali vs quali) using rAmCharts
amSolidGauge

Plotting solid gauge using rAmCharts
api

See AmCharts API
controlShinyPlot

Tests the class of an expression.
initialize,AmStockChart-method

Initializes an AmStockChart
amTimeSeries

Plotting times series which aggregation
amWaterfall

Plotting waterfall chart using rAmCharts
ChartCursor-class

ChartCursor class
AxisBase-class

AxisBase class
ChartScrollbar-class

ChartScrollbar class
CategoryAxis-class

CategoryAxis class
amFloatingBar

Plotting floating bar chart using rAmCharts
initialize,AmGraph-method

Initializes an AmGraph
data_bar

Random data for plotting bar chart examples
data_mekko

Random data for plotting mekko chart examples
data_pie

Random data for plotting pie chart examples
data_AirPassengers

Air passengers for example
data_gdp

10 Richest Countries in the World by 2015 GDP
data_gbar

Random data for plotting bar chart examples
data_candleStick2

Random data for plotting candlestick chart examples
data_candleStick1

Random data for plotting candlestick chart examples
data_funnel

Random data for plotting funnel chart examples
data_fbar

Random data for plotting floating bar chart examples
AmLegend-class

AmLegend class
data_stock1

Random data for example
data_waterfall

Random data for plotting candlestick chart examples
initialize,ValueAxis-method

Initializes ValueAxis
GaugeAxis-class

GaugeAxis class
Generics functions

General shared generic methods
Label-class

Label class
show,AmChart-method

Visualize AmStockChart with show
stockLegend

Constructor for StockLegend.
StockPanel-class

StockPanel class
amRadar

Plotting radar using rAmCharts
amWind

Plotting wind using rAmCharts
initialize,GaugeArrow-method

Initializes a GaugeArrow
data_radar

Random data for plotting radar chart examples
initialize,CategoryAxis-method

Initializes a CategoryAxis
data_stock_2

Random data for example
initialize,Guide-method

Initializes a Guide
addGuide,AxisBase,GuideOrMissing-method

Add a Guide for AxisBase
initialize,PeriodSelector-method

Initializes a PeriodSelector
renderAmCharts

SHINY
initialize,DataSet-method

Creates or updates a DataSet
DataSetSelector-class

DataSetSelector class
initialize,GaugeBand-method

Initializes a GaugeBand
Guide-class

Guide class
ValueAxis-class

ValueAxis class
runExamples

Run example with shiny
DataSet-class

DataSet class
initialize,AmChart-method

Creates an AmChart
data_wind

Random data for plotting wind chart examples
initialize,AmLegend-method

Initializes legend of the chart
initialize,Label-method

Initializes Label
listProperties

List properties of an S4 object
addListener

AmObject methods
PeriodSelector-class

PeriodSelector
initialize,GaugeAxis-method

Initializes a GaugeAxis
initialize,Title-method

Initializes A Title
Title-class

Title class
GaugeBand-class

GaugeBand class
initialize,ChartCursor-method

Initializes a ChartCursor
initialize,ChartScrollbar-method

Initializes a ChartScrollbar
show,AmObject-method

Visualize with show
show,AmStockChart-method

Visualize AmStockChart with show
TrendLine-class

TrendLine class
initialize,TrendLine-method

Initializes a TrendLine
initialize,StockEvent-method

Initialize a StockEvent
GaugeArrow-class

GaugeArrow class
initialize,DataSetSelector-method

Creates or updates a DataSetSelector
initialize,StockPanel-method

Initialize a StockPanel
plot,AmCharts-method

PLOTTING METHOD
print,AmObject-method

Visualize with print
StockEvent-class

StockEvent class
stockGraph

Constructor for a stockGraph (class AmGraph)