API for Amcharts
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
data-raw
data
dev
enhancement
faq
img
inst
issues
man-roxygen
man
tests
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
NAMESPACE
NEWS.md
README.md
changelog.md

README.md

Rdoc Build Status Rdoc

LOG CHANGE

rAmCharts 2.1.8 (dev) (based on AmCharts version 3.21.13)

  • rAmChartsTimeSeries module : fix keeping first and last values when NA
  • Update to amcharts.js 3.21.13
  • Add full javascript API in package & amChartsAPI() function

rAmCharts 2.1.7 (based on AmCharts version 3.20.18)

  • new add_animate_dependency function

Introduction

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

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

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

Moreover, full AmCharts API is available in the package using amChartsAPI().


Installation

The version 2.1.7 is available on CRAN:

install.packages("rAmCharts")

To install the "dev version", 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
  • Version 2.1.0 is based on AmCharts v3.20.10
  • Version <= 2.1.7 is based on AmCharts v3.20.18
  • Version >= 2.1.8 is based on AmCharts v3.21.13

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.