add readme
This commit is contained in:
parent
db0f6b4fa4
commit
b9d9b5a5e0
|
@ -1,3 +1,4 @@
|
|||
^apexcharter\.Rproj$
|
||||
^\.Rproj\.user$
|
||||
^dev$
|
||||
^img$
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
# apexcharter
|
||||
|
||||
> Htmlwidget for [apexcharts.js](https://github.com/apexcharts/apexcharts.js)
|
||||
|
||||
:construction: :warning: Under development !! API will change (and this doesn't work properly in RStudio viewer for now) :warning: :construction:
|
||||
|
||||
## Installation
|
||||
|
||||
You can install the development version from [GitHub](https://github.com/) with:
|
||||
|
||||
``` r
|
||||
# install.packages("devtools")
|
||||
devtools::install_github("dreamRs/apexcharter")
|
||||
```
|
||||
|
||||
## Raw API
|
||||
|
||||
Only raw API available for now :
|
||||
|
||||
``` r
|
||||
apexcharter(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 + '°C';}")
|
||||
)
|
||||
)
|
||||
))
|
||||
```
|
||||
|
||||
![alt text](img/raw-lines.png)
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
Loading…
Reference in New Issue