• Stars
    star
    135
  • Rank 259,609 (Top 6 %)
  • Language
    R
  • License
    Other
  • Created almost 6 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ“Š R Htmlwidget for ApexCharts.js

apexcharter

Htmlwidget for apexcharts.js : A modern JavaScript charting library to build interactive charts and visualizations with simple API. See the online documentation for examples.

CRAN status cran checks Codecov test coverage R-CMD-check

Installation

Install from CRAN with:

install.packages("apexcharter")

Or install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("dreamRs/apexcharter")

Quick Charts

Use apex function to quickly create visualizations :

library(apexcharter)
data("mpg", package = "ggplot2")
apex(data = mpg, type = "bar", mapping = aes(manufacturer))

With datetime:

data("economics", package = "ggplot2")
apex(data = economics, type = "line", mapping = aes(x = date, y = uempmed)) %>% 
  ax_stroke(width = 1)

Full API

All methods from ApexCharts are available with function like ax_* compatible with pipe from magrittr :

library(apexcharter)
data(mpg, package = "ggplot2")

apexchart() %>% 
  ax_chart(type = "bar") %>% 
  ax_plotOptions(bar = bar_opts(
    horizontal = FALSE,
    endingShape = "flat",
    columnWidth = "70%",
    dataLabels = list(
      position = "top"
    ))
  ) %>% 
  ax_grid(
    show = TRUE,
    position = "front",
    borderColor = "#FFF"
  ) %>% 
  ax_series(list(
    name = "Count",
    data = tapply(mpg$manufacturer, mpg$manufacturer, length)
  )) %>% 
  ax_colors("#112446") %>% 
  ax_xaxis(categories = unique(mpg$manufacturer)) %>% 
  ax_title(text = "Number of models") %>% 
  ax_subtitle(text = "Data from ggplot2")

Raw API

Pass a list of parameters to the function:

apexchart(ax_opts = list(
  chart = list(
    type = "line"
  ),
  stroke = list(
    curve = "smooth"
  ),
  grid = list(
    borderColor = "#e7e7e7",
    row = list(
      colors = c("#f3f3f3", "transparent"),
      opacity = 0.5
    )
  ),
  dataLabels = list(
    enabled = TRUE
  ),
  markers = list(style = "inverted", size = 6),
  series = list(
    list(
      name = "High",
      data = c(28, 29, 33, 36, 32, 32, 33)
    ),
    list(
      name = "Low",
      data = c(12, 11, 14, 18, 17, 13, 13)
    )
  ),
  title = list(
    text = "Average High & Low Temperature",
    align = "left"
  ),
  xaxis = list(
    categories = month.abb[1:7]
  ),
  yaxis = list(
    title = list(text = "Temperature"),
    labels = list(
      formatter = htmlwidgets::JS("function(value) {return value + '\u00b0C';}")
    )
  )
))

Development

This package use {packer} to manage JavaScript assets, see packer's documentation for more.

Install nodes modules with:

packer::npm_install()

Modify srcjs/widgets/apexcharter.js, then run:

packer::bundle()

Re-install R package and try apexcharter() or apex() functions.

More Repositories

1

esquisse

RStudio add-in to make plots interactively with ggplot2
R
1,719
star
2

shinyWidgets

shinyWidgets : Extend widgets available in shiny
R
794
star
3

fresh

Fresh shiny themes
SCSS
221
star
4

billboarder

πŸ“Š R Htmlwidget for billboard.js
R
172
star
5

prefixer

Prefix function with their namespace & other development tools
R
140
star
6

shinybusy

Minimal busy indicator for Shiny apps
R
137
star
7

datamods

Shiny modules to import data into an application or addin
R
127
star
8

gfonts

πŸ”€ Offline Google Fonts for rmarkdown and shiny
R
112
star
9

shinyapps

Some Shiny applications
R
99
star
10

shinylogs

Logs for Shiny apps
R
96
star
11

colorscale

Create a color scale from a single color
R
80
star
12

shufflecards

✨ Create magical grid layouts in Shiny & Markdown
R
80
star
13

toastui

R htmlwidgets for ToastUI libraries: grid, calendar and chart
R
75
star
14

r2d3maps

r2d3 experiment to draw maps in D3
R
73
star
15

tuicalendr

πŸ“† R htmlwidget for tui-calendar
R
54
star
16

topogram

R htmlwidget for cartogram-chart
R
51
star
17

shinypop

Collection of notifications, confirm dialogs and alerts for 'Shiny' applications
JavaScript
50
star
18

addinit

Initialize & structure an 'RStudio' Project
R
50
star
19

viewxl

'RStudio' addin to open data.frame(s) in Excel
R
47
star
20

wired

Wired elements in Shiny
JavaScript
47
star
21

shinytreeview

Hierarchical tree input for Shiny apps
R
40
star
22

memory-hex

Hex Memory Game in Shiny
R
33
star
23

sqlquery

Htmlwidget to write SQL queries
JavaScript
31
star
24

capture

Take screenshots in Shiny apps
JavaScript
29
star
25

particlesjs

Particles.js for Shiny apps & rmarkdown
R
26
star
26

timelineschart

Htmlwidget for timelines-chart
R
26
star
27

jstools

Tools to work with JavaScript and CSS files
JavaScript
24
star
28

flexpivot

Simple frequency table
R
23
star
29

weather

Weather icons in ggplot2, shiny and rmarkdown
SCSS
20
star
30

phosphoricons

Phosphor Icons for R
R
19
star
31

where

πŸ“ Cities database and a game!
R
16
star
32

d3.format

R interface for d3.format
R
16
star
33

shinyvs

Virtual Select widget for shiny apps
R
16
star
34

resizer

Simulate screen resolution for Shiny apps
R
15
star
35

tuichartr

πŸ“Š R htmlwidget for tui-chart
R
14
star
36

grillade

Grid sytem for shiny apps or rmarkdown and to create htmlwidgets matrix
R
13
star
37

rte.data

Access data from RTE API
R
10
star
38

tweets-transports

Analyse des tweets des lignes de transport parisien
R
9
star
39

bar

R Htmlwidget for proportions-chart JavaScript library
JavaScript
9
star
40

shinywb

Interface to WinBox JavaScript library to use in shiny applications
R
8
star
41

talks

πŸ’¬ Slides for dreamRs talks
5
star
42

france-power-grid

French housing connected to the electricity grid
R
4
star
43

luciole

Luciole font for R. a new typeface developed explicitly for visually impaired people
R
2
star
44

nlpr.fr

Client for 'NLP.js' for Natural Language Operations in French
R
2
star
45

uPlot-r

R htmlwidget for Β΅Plot.js
R
1
star
46

rr2018addins

Exemples d'add-ins RStudio pour les rencontres R 2018
R
1
star