Compare commits
93 Commits
Author | SHA1 | Date |
---|---|---|
pvictor | 85708897b0 | |
pvictor | 9200d918ad | |
pvictor | 58723475cb | |
pvictor | b313b45989 | |
pvictor | 7e4189366e | |
pvictor | 3a3a10369f | |
pvictor | d0fac7c1ee | |
pvictor | 1ac176f30c | |
pvictor | 624ab8b901 | |
pvictor | 57733add33 | |
pvictor | c1560fc9c5 | |
dependabot[bot] | e68f20930c | |
pvictor | 6cff8a9f67 | |
pvictor | 1d94f9d4a6 | |
pvictor | eb228597d8 | |
pvictor | bbda86de93 | |
pvictor | 467be227fc | |
pvictor | 11d244e992 | |
pvictor | 5587cdbef4 | |
pvictor | be187e37f1 | |
Victor Perrier | 34aee9bc96 | |
Victor Perrier | 44ead44178 | |
Victor Perrier | 9baa753c3f | |
pvictor | 24c552ea68 | |
pvictor | b7ed86e556 | |
pvictor | 7705b91e88 | |
pvictor | 70204162f4 | |
dependabot[bot] | 11c6938935 | |
pvictor | f83cb879a8 | |
pvictor | de477fec66 | |
pvictor | 896998074e | |
pvictor | b69b7b7b4d | |
pvictor | 1b6a57df3a | |
pvictor | 34d73e81ee | |
pvictor | 7d32381a65 | |
pvictor | 2174c8b238 | |
Victor Perrier | 1fe6e97eee | |
pvictor | cacfcde3ce | |
pvictor | 4ef564e605 | |
Victor Perrier | 23dbb5e869 | |
pvictor | 4cbf760e29 | |
pvictor | 1e3ad8fcc8 | |
pvictor | 162b7874d6 | |
pvictor | ef470d1889 | |
pvictor | 69a343fca0 | |
pvictor | e848debf0a | |
pvictor | f50e0064c2 | |
pvictor | d0d234baee | |
pvictor | a9914aa702 | |
dependabot[bot] | f45efa78fd | |
pvictor | bc22af7e0c | |
pvictor | 7a959cb461 | |
pvictor | ea4abf2779 | |
Victor Perrier | aa6d74a38d | |
dependabot[bot] | eb2a82746e | |
pvictor | 50fac13d51 | |
pvictor | 3f1bb5048e | |
pvictor | 036244b981 | |
pvictor | f7de6805db | |
pvictor | 64ca1925c1 | |
pvictor | 50926f0570 | |
pvictor | 67a97cdf5f | |
pvictor | 314baa5cd9 | |
pvictor | dddd472c1f | |
pvictor | 4f4142211b | |
pvictor | f4215fdf37 | |
pvictor | 301051c297 | |
pvictor | 45f29fca2e | |
pvictor | c717358068 | |
pvictor | 0f7ec49342 | |
pvictor | fe45564f6a | |
pvictor | 647f4ab9c8 | |
pvictor | ace2508e89 | |
pvictor | a0d0616009 | |
pvictor | 47381fcfda | |
pvictor | d14e36d22b | |
pvictor | 14484602f7 | |
pvictor | 017b84f35c | |
pvictor | 05494785ae | |
Victor Perrier | c0672ba655 | |
pvictor | 8bda434fa0 | |
pvictor | 01c1c8ed2d | |
pvictor | 090f3d2d37 | |
pvictor | 7b9df92ee7 | |
pvictor | f670771a22 | |
pvictor | 027c5bc16f | |
pvictor | 4178c633de | |
pvictor | 705f9f971a | |
pvictor | 3c861bec58 | |
pvictor | 251df70b2b | |
pvictor | cefba791f7 | |
pvictor | dfd9bb07af | |
pvictor | ea494e899d |
|
@ -9,6 +9,16 @@
|
|||
^cran-comments\.md$
|
||||
^CRAN-RELEASE$
|
||||
^examples$
|
||||
^man-roxygen$
|
||||
^\.github$
|
||||
^LICENSE\.md$
|
||||
^codecov\.yml$
|
||||
^pkgdown$
|
||||
^srcjs$
|
||||
^node_modules$
|
||||
^package\.json$
|
||||
^package-lock\.json$
|
||||
^webpack\.dev\.js$
|
||||
^webpack\.prod\.js$
|
||||
^webpack\.common\.js$
|
||||
^CRAN-SUBMISSION$
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
|
||||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
|
||||
name: R-CMD-check
|
||||
|
||||
jobs:
|
||||
R-CMD-check:
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
|
||||
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {os: macos-latest, r: 'release'}
|
||||
- {os: windows-latest, r: 'release'}
|
||||
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
|
||||
- {os: ubuntu-latest, r: 'release'}
|
||||
- {os: ubuntu-latest, r: 'oldrel-1'}
|
||||
|
||||
env:
|
||||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
||||
R_KEEP_PKG_SOURCE: yes
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: r-lib/actions/setup-pandoc@v2
|
||||
|
||||
- uses: r-lib/actions/setup-r@v2
|
||||
with:
|
||||
r-version: ${{ matrix.config.r }}
|
||||
http-user-agent: ${{ matrix.config.http-user-agent }}
|
||||
use-public-rspm: true
|
||||
|
||||
- uses: r-lib/actions/setup-r-dependencies@v2
|
||||
with:
|
||||
extra-packages: any::rcmdcheck
|
||||
needs: check
|
||||
|
||||
- uses: r-lib/actions/check-r-package@v2
|
||||
with:
|
||||
upload-snapshots: true
|
|
@ -1,80 +0,0 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
name: R-CMD-check
|
||||
|
||||
jobs:
|
||||
R-CMD-check:
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
|
||||
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {os: windows-latest, r: 'release'}
|
||||
- {os: macOS-latest, r: 'release'}
|
||||
- {os: macOS-latest, r: 'devel'}
|
||||
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
|
||||
|
||||
env:
|
||||
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
|
||||
RSPM: ${{ matrix.config.rspm }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: r-lib/actions/setup-r@master
|
||||
with:
|
||||
r-version: ${{ matrix.config.r }}
|
||||
|
||||
- uses: r-lib/actions/setup-pandoc@master
|
||||
|
||||
- name: Query dependencies
|
||||
run: |
|
||||
install.packages('remotes')
|
||||
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
|
||||
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
|
||||
shell: Rscript {0}
|
||||
|
||||
- name: Cache R packages
|
||||
if: runner.os != 'Windows'
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ env.R_LIBS_USER }}
|
||||
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
|
||||
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
|
||||
|
||||
- name: Install system dependencies
|
||||
if: runner.os == 'Linux'
|
||||
env:
|
||||
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
|
||||
run: |
|
||||
Rscript -e "remotes::install_github('r-hub/sysreqs')"
|
||||
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
|
||||
sudo -s eval "$sysreqs"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
remotes::install_deps(dependencies = TRUE)
|
||||
remotes::install_cran("rcmdcheck")
|
||||
shell: Rscript {0}
|
||||
|
||||
- name: Check
|
||||
env:
|
||||
_R_CHECK_CRAN_INCOMING_REMOTE_: false
|
||||
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
|
||||
shell: Rscript {0}
|
||||
|
||||
- name: Upload check results
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
|
||||
path: check
|
|
@ -0,0 +1,47 @@
|
|||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
|
||||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
name: pkgdown
|
||||
|
||||
jobs:
|
||||
pkgdown:
|
||||
runs-on: ubuntu-latest
|
||||
# Only restrict concurrency for non-PR jobs
|
||||
concurrency:
|
||||
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
|
||||
env:
|
||||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: r-lib/actions/setup-pandoc@v2
|
||||
|
||||
- uses: r-lib/actions/setup-r@v2
|
||||
with:
|
||||
use-public-rspm: true
|
||||
|
||||
- uses: r-lib/actions/setup-r-dependencies@v2
|
||||
with:
|
||||
extra-packages: any::pkgdown, local::., any::dplyr, any::highcharter, any::gapminder
|
||||
needs: website
|
||||
pak-version: devel
|
||||
|
||||
- name: Build site
|
||||
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
|
||||
shell: Rscript {0}
|
||||
|
||||
- name: Deploy to GitHub pages 🚀
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: JamesIves/github-pages-deploy-action@v4.4.1
|
||||
with:
|
||||
clean: false
|
||||
branch: gh-pages
|
||||
folder: docs
|
|
@ -1,48 +1,50 @@
|
|||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
|
||||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
branches: [main, master]
|
||||
|
||||
name: test-coverage
|
||||
|
||||
jobs:
|
||||
test-coverage:
|
||||
runs-on: macOS-latest
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: r-lib/actions/setup-r@v1
|
||||
|
||||
- uses: r-lib/actions/setup-pandoc@v1
|
||||
|
||||
- name: Query dependencies
|
||||
run: |
|
||||
install.packages('remotes')
|
||||
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
|
||||
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
|
||||
shell: Rscript {0}
|
||||
|
||||
- name: Cache R packages
|
||||
uses: actions/cache@v2
|
||||
- uses: r-lib/actions/setup-r@v2
|
||||
with:
|
||||
path: ${{ env.R_LIBS_USER }}
|
||||
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
|
||||
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
|
||||
use-public-rspm: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
install.packages(c("remotes"))
|
||||
remotes::install_deps(dependencies = TRUE)
|
||||
remotes::install_cran("covr")
|
||||
shell: Rscript {0}
|
||||
- uses: r-lib/actions/setup-r-dependencies@v2
|
||||
with:
|
||||
extra-packages: any::covr
|
||||
needs: coverage
|
||||
|
||||
- name: Test coverage
|
||||
run: covr::codecov()
|
||||
run: |
|
||||
covr::codecov(
|
||||
quiet = FALSE,
|
||||
clean = FALSE,
|
||||
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
|
||||
)
|
||||
shell: Rscript {0}
|
||||
|
||||
- name: Show testthat output
|
||||
if: always()
|
||||
run: |
|
||||
## --------------------------------------------------------------------
|
||||
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
|
||||
shell: bash
|
||||
|
||||
- name: Upload test results
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: coverage-test-failures
|
||||
path: ${{ runner.temp }}/package
|
||||
|
|
|
@ -4,3 +4,6 @@ inst/doc
|
|||
.RData
|
||||
*.Rproj
|
||||
data-raw/*.csv
|
||||
node_modules
|
||||
docs
|
||||
data-raw/inputs/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Package: apexcharter
|
||||
Version: 0.2.0
|
||||
Version: 0.4.3
|
||||
Title: Create Interactive Chart with the JavaScript 'ApexCharts' Library
|
||||
Description: Provides an 'htmlwidgets' interface to 'apexcharts.js'.
|
||||
'Apexcharts' is a modern JavaScript charting library to build interactive charts and visualizations with simple API.
|
||||
|
@ -16,7 +16,7 @@ ByteCompile: true
|
|||
Depends: R (>= 2.10)
|
||||
Imports:
|
||||
htmltools,
|
||||
htmlwidgets,
|
||||
htmlwidgets (>= 1.5.3),
|
||||
magrittr,
|
||||
rlang,
|
||||
ggplot2,
|
||||
|
@ -28,7 +28,7 @@ Suggests:
|
|||
scales,
|
||||
rmarkdown,
|
||||
covr
|
||||
RoxygenNote: 7.1.1
|
||||
RoxygenNote: 7.3.1
|
||||
Roxygen: list(markdown = TRUE)
|
||||
URL: https://github.com/dreamRs/apexcharter, https://dreamrs.github.io/apexcharter/
|
||||
BugReports: https://github.com/dreamRs/apexcharter/issues
|
||||
|
|
|
@ -29,6 +29,7 @@ export(ax_dataLabels)
|
|||
export(ax_facet_grid)
|
||||
export(ax_facet_wrap)
|
||||
export(ax_fill)
|
||||
export(ax_forecast_data_points)
|
||||
export(ax_grid)
|
||||
export(ax_labels)
|
||||
export(ax_labels2)
|
||||
|
@ -52,6 +53,7 @@ export(ax_xaxis)
|
|||
export(ax_yaxis)
|
||||
export(ax_yaxis2)
|
||||
export(bar_opts)
|
||||
export(boxplot_opts)
|
||||
export(bubble_opts)
|
||||
export(config_update)
|
||||
export(events_opts)
|
||||
|
@ -81,10 +83,13 @@ export(vars)
|
|||
importFrom(ggplot2,aes)
|
||||
importFrom(ggplot2,label_value)
|
||||
importFrom(ggplot2,vars)
|
||||
importFrom(graphics,boxplot)
|
||||
importFrom(htmltools,css)
|
||||
importFrom(htmltools,renderTags)
|
||||
importFrom(htmltools,resolveDependencies)
|
||||
importFrom(htmltools,tagList)
|
||||
importFrom(htmltools,tags)
|
||||
importFrom(htmltools,validateCssUnit)
|
||||
importFrom(htmlwidgets,JS)
|
||||
importFrom(htmlwidgets,JSEvals)
|
||||
importFrom(htmlwidgets,createWidget)
|
||||
|
@ -95,11 +100,14 @@ importFrom(htmlwidgets,sizingPolicy)
|
|||
importFrom(jsonlite,fromJSON)
|
||||
importFrom(magrittr,"%>%")
|
||||
importFrom(rlang,"!!")
|
||||
importFrom(rlang,"%||%")
|
||||
importFrom(rlang,as_label)
|
||||
importFrom(rlang,eval_tidy)
|
||||
importFrom(rlang,is_function)
|
||||
importFrom(rlang,is_list)
|
||||
importFrom(rlang,is_named)
|
||||
importFrom(rlang,is_null)
|
||||
importFrom(rlang,quo)
|
||||
importFrom(rlang,quos)
|
||||
importFrom(rlang,sym)
|
||||
importFrom(rlang,syms)
|
||||
|
|
50
NEWS.md
50
NEWS.md
|
@ -1,3 +1,53 @@
|
|||
apexcharter 0.4.3
|
||||
==================
|
||||
|
||||
* Updated ApexCharts.js to 3.49.1 (see https://github.com/apexcharts/apexcharts.js/releases).
|
||||
* New chart type : slope charts.
|
||||
|
||||
|
||||
|
||||
apexcharter 0.4.2
|
||||
==================
|
||||
|
||||
* Updated ApexCharts.js to 3.46.0 (see https://github.com/apexcharts/apexcharts.js/releases).
|
||||
|
||||
|
||||
|
||||
apexcharter 0.4.1
|
||||
==================
|
||||
|
||||
* Updated ApexCharts.js to 3.41.0 (new charts type: dumbbell chart and funnel chart).
|
||||
* `apex()` : added support for boxplot.
|
||||
* New function `ax_forecast_data_points()` to mark points as forecasted values.
|
||||
|
||||
|
||||
|
||||
apexcharter 0.4.0
|
||||
==================
|
||||
|
||||
* Updated ApexCharts.js to 3.36.3.
|
||||
* New chart type : range area charts.
|
||||
* Facets: correctly manage secondary y axis.
|
||||
|
||||
|
||||
|
||||
apexcharter 0.3.1
|
||||
==================
|
||||
|
||||
* Updated ApexCharts.js to 3.33.1
|
||||
* Minimal {htmlwidgets} version required >= 1.5.3
|
||||
|
||||
|
||||
|
||||
apexcharter 0.3.0
|
||||
==================
|
||||
|
||||
* Updated ApexCharts.js to 3.29.0
|
||||
* Internal: use [{packer}](https://github.com/JohnCoene/packer) to manage JavaScript assets.
|
||||
* `d3.format` JavaScript functions are now available in browser under `format()` and `formatLocale()`.
|
||||
|
||||
|
||||
|
||||
apexcharter 0.2.0
|
||||
==================
|
||||
|
||||
|
|
|
@ -96,7 +96,8 @@ add_annotation <- function(ax, type_annotation = c("xaxis", "yaxis", "points"),
|
|||
#' @param cssClass A custom Css Class to give to the annotation label elements.
|
||||
#' @param padding Padding for the label: top, right, bottom, left.
|
||||
#'
|
||||
#' @return A \code{list} that can be used in \code{\link{add_shade}}.
|
||||
#' @return A \code{list} that can be used in \code{\link{add_shade}}, \code{\link{add_point}},
|
||||
#' \code{\link{add_event}}, \code{\link{add_event_marker}}.
|
||||
#' @export
|
||||
#'
|
||||
label <- function(text = NULL,
|
||||
|
@ -181,7 +182,7 @@ marker <- function(size = NULL,
|
|||
#' @description \code{add_shade()} allow to add a shaded area on specified range,
|
||||
#' \code{add_shade_weekend()} add a shadow on every week-end.
|
||||
#'
|
||||
#' @param ax An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param from Vector of position to start shadow.
|
||||
#' @param to Vector of position to end shadow.
|
||||
#' @param color Color of the shadow.
|
||||
|
@ -194,7 +195,7 @@ marker <- function(size = NULL,
|
|||
#' @note \code{add_shade_weekend} only works if variable
|
||||
#' used for x-axis is of class \code{Date} or \code{POSIXt}.
|
||||
#'
|
||||
#' @return An \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @name add-shade
|
||||
|
@ -258,7 +259,7 @@ add_shade_weekend <- function(ax, color = "#848484", opacity = 0.2, label = NULL
|
|||
#'
|
||||
#' @description Add a vertical line to mark a special event on a chart.
|
||||
#'
|
||||
#' @param ax An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param when Vector of position to place the event.
|
||||
#' @param color Color of the line.
|
||||
#' @param dash Creates dashes in borders of SVG path.
|
||||
|
@ -269,8 +270,10 @@ add_shade_weekend <- function(ax, color = "#848484", opacity = 0.2, label = NULL
|
|||
#' @param ... Additional arguments, see
|
||||
#' \url{https://apexcharts.com/docs/options/annotations/} for possible options.
|
||||
#'
|
||||
#' @return An \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @seealso \code{\link{add_event_marker}} to add a point.
|
||||
#'
|
||||
#' @example examples/add_event.R
|
||||
add_event <- function(ax, when, color = "#E41A1C", dash = 4, label = NULL, ...) {
|
||||
|
@ -287,13 +290,17 @@ add_event <- function(ax, when, color = "#E41A1C", dash = 4, label = NULL, ...)
|
|||
}
|
||||
|
||||
|
||||
#' Add an event marker to a chart
|
||||
#' @title Add an event marker to a chart
|
||||
#'
|
||||
#' @description Add a point with a label based on a datetime.
|
||||
#'
|
||||
#' @param when Vector of position to place the event.
|
||||
#' @inheritParams add_point
|
||||
#'
|
||||
#' @return An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @return An [apexchart()] `htmlwidget` object.
|
||||
#' @export
|
||||
#'
|
||||
#' @seealso \code{\link{add_event}} to add a vertical line.
|
||||
#'
|
||||
#' @example examples/add_event_marker.R
|
||||
add_event_marker <- function(ax, when, y,
|
||||
|
@ -331,7 +338,7 @@ add_event_marker <- function(ax, when, y,
|
|||
|
||||
#' Add horizontal or vertical line
|
||||
#'
|
||||
#' @param ax An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param value Vector of position for the line(s).
|
||||
#' @param color Color(s) of the line(s).
|
||||
#' @param dash Creates dashes in borders of SVG path.
|
||||
|
@ -342,7 +349,7 @@ add_event_marker <- function(ax, when, y,
|
|||
#' @param ... Additional arguments, see
|
||||
#' \url{https://apexcharts.com/docs/options/annotations/} for possible options.
|
||||
#'
|
||||
#' @return An \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @name add-vh-lines
|
||||
|
@ -381,7 +388,7 @@ add_vline <- function(ax, value, color = "#000", dash = 0, label = NULL, ...) {
|
|||
|
||||
#' Add an annotation point
|
||||
#'
|
||||
#' @param ax An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param x Coordinate(s) on the x-axis.
|
||||
#' @param y Coordinate(s) on the y-axis.
|
||||
#' @param size Size of the marker.
|
||||
|
@ -395,8 +402,10 @@ add_vline <- function(ax, value, color = "#000", dash = 0, label = NULL, ...) {
|
|||
#' @param ... Additional arguments, see
|
||||
#' \url{https://apexcharts.com/docs/options/annotations/} for possible options.
|
||||
#'
|
||||
#' @return An \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @seealso \code{\link{add_event_marker}} to add a point when x-axis is a datetime.
|
||||
#'
|
||||
#' @example examples/add_point.R
|
||||
add_point <- function(ax, x, y,
|
||||
|
@ -411,7 +420,7 @@ add_point <- function(ax, x, y,
|
|||
ax = ax,
|
||||
type_annotation = "points",
|
||||
position = "front",
|
||||
as_date = FALSE,
|
||||
as_date = inherits(x, c("Date", "POSIXct")),
|
||||
x = x, y = y,
|
||||
marker = marker(
|
||||
size = size,
|
||||
|
|
|
@ -115,7 +115,7 @@ events_opts <- function(click = NULL,
|
|||
|
||||
#' @title Bar options
|
||||
#'
|
||||
#' @description Use these options in \code{\link{ax_plotOptions}}.
|
||||
#' @description Use these options in [ax_plotOptions()].
|
||||
#'
|
||||
#' @param horizontal Logical. This option will turn a column chart into a horizontal bar chart.
|
||||
#' @param endingShape Available Options: \code{"flat"} or \code{"rounded"}.
|
||||
|
@ -128,7 +128,7 @@ events_opts <- function(click = NULL,
|
|||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/plotoptions/bar/}.
|
||||
#'
|
||||
#' @return A \code{list} of options that can be used in \code{\link{ax_plotOptions}}.
|
||||
#' @return A \code{list} of options that can be used in [ax_plotOptions()].
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
|
@ -170,7 +170,7 @@ bar_opts <- function(horizontal = NULL,
|
|||
|
||||
#' @title Heatmap options
|
||||
#'
|
||||
#' @description Use these options in \code{\link{ax_plotOptions}}.
|
||||
#' @description Use these options in [ax_plotOptions()].
|
||||
#'
|
||||
#' @param radius Numeric. Radius of the rectangle inside heatmap.
|
||||
#' @param enableShades Logical. Enable different shades of color depending on the value
|
||||
|
@ -180,7 +180,7 @@ bar_opts <- function(horizontal = NULL,
|
|||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/plotoptions/heatmap/}.
|
||||
#'
|
||||
#' @return A \code{list} of options that can be used in \code{\link{ax_plotOptions}}.
|
||||
#' @return A \code{list} of options that can be used in [ax_plotOptions()].
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
|
@ -228,7 +228,7 @@ heatmap_opts <- function(radius = NULL,
|
|||
|
||||
#' @title Radial bar options
|
||||
#'
|
||||
#' @description Use these options in \code{\link{ax_plotOptions}}.
|
||||
#' @description Use these options in [ax_plotOptions()].
|
||||
#'
|
||||
#' @param size Numeric. Manual size of the radialBars instead of calculating automatically from default height / width.
|
||||
#' @param inverseOrder Logical. Whether to make the first value of series innermost or outermost.
|
||||
|
@ -243,7 +243,7 @@ heatmap_opts <- function(radius = NULL,
|
|||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/plotoptions/radialbar/}.
|
||||
#'
|
||||
#' @return A \code{list} of options that can be used in \code{\link{ax_plotOptions}}.
|
||||
#' @return A \code{list} of options that can be used in [ax_plotOptions()].
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
|
@ -301,7 +301,7 @@ radialBar_opts <- function(size = NULL,
|
|||
|
||||
#' @title Pie options
|
||||
#'
|
||||
#' @description Use these options in \code{\link{ax_plotOptions}}.
|
||||
#' @description Use these options in [ax_plotOptions()].
|
||||
#'
|
||||
#' @param size Numeric. Custom size of the pie which will override the default size calculations.
|
||||
#' @param donut List with two fields \code{size} (Donut / ring size in percentage relative to the total pie area.)
|
||||
|
@ -314,7 +314,7 @@ radialBar_opts <- function(size = NULL,
|
|||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/plotoptions/pie/}.
|
||||
#'
|
||||
#' @return A \code{list} of options that can be used in \code{\link{ax_plotOptions}}.
|
||||
#' @return A \code{list} of options that can be used in [ax_plotOptions()].
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
|
@ -351,7 +351,7 @@ pie_opts <- function(size = NULL,
|
|||
|
||||
#' @title Bubble options
|
||||
#'
|
||||
#' @description Use these options in \code{\link{ax_plotOptions}}.
|
||||
#' @description Use these options in [ax_plotOptions()].
|
||||
#'
|
||||
#' @param minBubbleRadius Minimum radius size of a bubble.
|
||||
#' If a bubble value is too small to be displayed, this size will be used.
|
||||
|
@ -361,7 +361,7 @@ pie_opts <- function(size = NULL,
|
|||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/plotoptions/bubble/}.
|
||||
#'
|
||||
#' @return A \code{list} of options that can be used in \code{\link{ax_plotOptions}}.
|
||||
#' @return A \code{list} of options that can be used in [ax_plotOptions()].
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
|
@ -386,3 +386,36 @@ bubble_opts <- function(minBubbleRadius, maxBubbleRadius, ...) {
|
|||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#' @title Boxplot options
|
||||
#'
|
||||
#' @description Use these options in [ax_plotOptions()].
|
||||
#'
|
||||
#' @param color.upper Color for the upper quartile (Q3 to median) of the box plot.
|
||||
#' @param color.lower Color for the lower quartile (median to Q1) of the box plot.
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/plotoptions/boxplot/}.
|
||||
#'
|
||||
#' @return A \code{list} of options that can be used in [ax_plotOptions()].
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' data("mpg", package = "ggplot2")
|
||||
#' apex(mpg, aes(class, hwy), "boxplot") %>%
|
||||
#' ax_plotOptions(
|
||||
#' boxPlot = boxplot_opts(color.upper = "#848484", color.lower = "#848484" )
|
||||
#' )
|
||||
boxplot_opts <- function(color.upper, color.lower, ...) {
|
||||
dropNulls(
|
||||
list(
|
||||
colors = dropNulls(list(
|
||||
upper = color.upper,
|
||||
lower = color.lower
|
||||
)),
|
||||
...
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
141
R/apex-utils.R
141
R/apex-utils.R
|
@ -4,7 +4,7 @@
|
|||
|
||||
#' Annotations properties
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param position Whether to put the annotations behind the charts or in front of it. Available Options: \code{"front"} or \code{"back"}.
|
||||
#' @param yaxis List of lists.
|
||||
#' @param xaxis List of lists.
|
||||
|
@ -13,7 +13,6 @@
|
|||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/annotations/}.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
|
@ -126,7 +125,7 @@ ax_annotations <- function(ax,
|
|||
|
||||
#' Chart parameters
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param type Specify the chart type. Available Options: \code{"bar"}, \code{"column"}, \code{"line"},
|
||||
#' \code{"pie"}, \code{"donut"}, \code{"radialBar"}, \code{"scatter"}, \code{"bubble"}, \code{"heatmap"}.
|
||||
#' @param stacked Logical. Enables stacked option for axis charts.
|
||||
|
@ -154,7 +153,6 @@ ax_annotations <- function(ax,
|
|||
#' @param height Height of the chart.
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @export
|
||||
#'
|
||||
#' @example examples/ax_chart.R
|
||||
|
@ -186,15 +184,16 @@ ax_chart <- function(ax,
|
|||
|
||||
#' Specific options for chart
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @param bar See \code{\link{bar_opts}}.
|
||||
#' @param heatmap See \code{\link{heatmap_opts}}.
|
||||
#' @param radialBar See \code{\link{radialBar_opts}}.
|
||||
#' @param pie See \code{\link{pie_opts}}.
|
||||
#' @param bubble See \code{\link{bubble_opts}}.
|
||||
#' @template ax-default
|
||||
#' @param bar See [bar_opts()].
|
||||
#' @param heatmap See [heatmap_opts()].
|
||||
#' @param radialBar See [radialBar_opts()].
|
||||
#' @param pie See [pie_opts()].
|
||||
#' @param bubble See [bubble_opts()].
|
||||
#' @param boxPlot See [boxplot_opts()].
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
|
@ -236,6 +235,7 @@ ax_plotOptions <- function(ax,
|
|||
radialBar = NULL,
|
||||
pie = NULL,
|
||||
bubble = NULL,
|
||||
boxPlot = NULL,
|
||||
...) {
|
||||
params <- c(as.list(environment()), list(...))[-1]
|
||||
.ax_opt2(ax, "plotOptions", l = dropNulls(params))
|
||||
|
@ -244,10 +244,10 @@ ax_plotOptions <- function(ax,
|
|||
|
||||
#' Colors
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param ... Colors for the chart's series. When all colors are used, it starts from the beginning.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/colors/}
|
||||
|
@ -280,7 +280,7 @@ ax_colors <- function(ax, ...) {
|
|||
|
||||
#' Labels on data
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param enabled To determine whether to show dataLabels or not.
|
||||
#' @param textAnchor The alignment of text relative to dataLabel's drawing position.
|
||||
#' Accepted values \code{"start"}, \code{"middle"} or \code{"end"}.
|
||||
|
@ -291,7 +291,7 @@ ax_colors <- function(ax, ...) {
|
|||
#' @param formatter The formatter function takes in a single value and allows you to format the value before displaying
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/datalabels/}
|
||||
|
@ -321,7 +321,7 @@ ax_dataLabels <- function(ax,
|
|||
|
||||
#' Fill property
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param type Whether to fill the paths with solid colors or gradient.
|
||||
#' Available options: \code{"solid"}, \code{"gradient"}, \code{"pattern"} or \code{"image"}.
|
||||
#' @param colors Colors to fill the svg paths..
|
||||
|
@ -331,7 +331,7 @@ ax_dataLabels <- function(ax,
|
|||
#' @param pattern A list of parameters.
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/fill/}
|
||||
|
@ -384,7 +384,7 @@ ax_fill <- function(ax,
|
|||
|
||||
#' Add grids on chart
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param show Logical. To show or hide grid area (including xaxis / yaxis)
|
||||
#' @param borderColor Colors of grid borders / lines.
|
||||
#' @param strokeDashArray Creates dashes in borders of svg path. Higher number creates more space between dashes in the border.
|
||||
|
@ -396,7 +396,7 @@ ax_fill <- function(ax,
|
|||
#' @param padding A list of parameters.
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/grid/}
|
||||
|
@ -448,12 +448,12 @@ ax_grid <- function(ax,
|
|||
|
||||
#' Alternative axis labels
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param labels A vector to use as labels.
|
||||
#' @param ... Vector. In Axis Charts (line / column), labels can be set instead of setting xaxis categories
|
||||
#' option. While, in pie/donut charts, each label corresponds to value in series array.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @name ax_labels
|
||||
|
@ -484,7 +484,7 @@ ax_labels2 <- function(ax, labels) {
|
|||
|
||||
#' Legend properties
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param show Logical. Whether to show or hide the legend container.
|
||||
#' @param position Available position options for legend: \code{"top"}, \code{"right"}, \code{"bottom"}, \code{"left"}.
|
||||
#' @param showForSingleSeries Show legend even if there is just 1 series.
|
||||
|
@ -510,7 +510,7 @@ ax_labels2 <- function(ax, labels) {
|
|||
#' @param floating Logical. The floating option will take out the legend from the chart area and make it float above the chart.
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/legend/}
|
||||
|
@ -558,7 +558,7 @@ ax_legend <- function(ax,
|
|||
|
||||
#' Markers properties
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param size Numeric. Size of the marker point.
|
||||
#' @param colors Sets the fill color(s) of the marker point.
|
||||
#' @param strokeColor Stroke Color of the marker.
|
||||
|
@ -572,7 +572,7 @@ ax_legend <- function(ax,
|
|||
#' @param hover List with item \code{size} (Size of the marker when it is active).
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/markers/}
|
||||
|
@ -607,7 +607,7 @@ ax_markers <- function(ax,
|
|||
|
||||
#' No data specification
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param text
|
||||
#' @param align
|
||||
#' @param verticalAlign
|
||||
|
@ -616,7 +616,7 @@ ax_markers <- function(ax,
|
|||
#' @param style
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @noRd
|
||||
#'
|
||||
ax_noData <- function(ax,
|
||||
|
@ -634,10 +634,10 @@ ax_noData <- function(ax,
|
|||
|
||||
#' Responsive options
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/responsive/}
|
||||
|
@ -674,10 +674,10 @@ ax_responsive <- function(ax, ...) {
|
|||
|
||||
#' Add data to a chart
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param ... Lists containing data to plot, typically list with two items: \code{name} and \code{data}.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @name ax-series
|
||||
|
@ -717,13 +717,13 @@ ax_series2 <- function(ax, l) {
|
|||
|
||||
#' Charts' states
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param normal A list of parameters.
|
||||
#' @param hover A list of parameters.
|
||||
#' @param active A list of parameters.
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/states/}
|
||||
|
@ -756,7 +756,7 @@ ax_states <- function(ax,
|
|||
|
||||
#' Chart's title
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param text Text to display as a title of chart.
|
||||
#' @param align Alignment of subtitle relative to chart area. Possible Options: \code{"left"}, \code{"center"} and \code{"right"}.
|
||||
#' @param margin Numeric. Vertical spacing around the title text.
|
||||
|
@ -766,7 +766,7 @@ ax_states <- function(ax,
|
|||
#' @param style List with two items: \code{fontSize} (Font Size of the title text) and \code{color} (Fore color of the title text).
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/title/}
|
||||
|
@ -797,7 +797,7 @@ ax_title <- function(ax,
|
|||
|
||||
#' Chart's subtitle
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param text Text to display as a subtitle of chart.
|
||||
#' @param align Alignment of subtitle relative to chart area. Possible Options: \code{"left"}, \code{"center"} and \code{"right"}.
|
||||
#' @param margin Numeric. Vertical spacing around the subtitle text.
|
||||
|
@ -807,7 +807,7 @@ ax_title <- function(ax,
|
|||
#' @param style List with two items: \code{fontSize} (Font Size of the subtitle text) and \code{color} (Fore color of the subtitle text).
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/subtitle/}
|
||||
|
@ -841,7 +841,7 @@ ax_subtitle <- function(ax,
|
|||
|
||||
#' Stroke properties
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param show Logical. To show or hide path-stroke / line
|
||||
#' @param curve In line / area charts, whether to draw smooth lines or straight lines.
|
||||
#' Available Options: \code{"smooth"} (connects the points in a curve fashion. Also known as spline)
|
||||
|
@ -855,7 +855,7 @@ ax_subtitle <- function(ax,
|
|||
#' @param dashArray Creates dashes in borders of svg path. Higher number creates more space between dashes in the border.
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/stroke/}
|
||||
|
@ -897,7 +897,7 @@ ax_stroke <- function(ax,
|
|||
|
||||
#' Tooltip options
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param enabled Logical. Show tooltip when user hovers over chart area.
|
||||
#' @param shared Logical. When having multiple series, show a shared tooltip.
|
||||
#' @param followCursor Logical. Follow user's cursor position instead of putting tooltip on actual data points.
|
||||
|
@ -915,7 +915,7 @@ ax_stroke <- function(ax,
|
|||
#' @param fixed A list of parameters.
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/tooltip/}
|
||||
|
@ -971,7 +971,7 @@ ax_tooltip <- function(ax,
|
|||
|
||||
#' X-axis options
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param type Character. Available Options : \code{"categories"} and \code{"datetime"}.
|
||||
#' @param categories Categories are labels which are displayed on the x-axis.
|
||||
#' @param labels A list of parameters.
|
||||
|
@ -990,7 +990,7 @@ ax_tooltip <- function(ax,
|
|||
#' @param tooltip A list of parameters.
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/xaxis/}
|
||||
|
@ -1076,7 +1076,7 @@ ax_xaxis <- function(ax,
|
|||
|
||||
#' Y-axis options
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param opposite Logical. When enabled, will draw the yaxis on the right side of the chart.
|
||||
#' @param tickAmount Number of Tick Intervals to show.
|
||||
#' @param max Lowest number to be set for the y-axis. The graph drawing beyond this number will be clipped off.
|
||||
|
@ -1091,7 +1091,7 @@ ax_xaxis <- function(ax,
|
|||
#' @param crosshairs A list of parameters.
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/yaxis/}
|
||||
|
@ -1145,10 +1145,10 @@ ax_yaxis <- function(ax,
|
|||
|
||||
#' Secondary Y-axis options
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param ... See arguments from \code{\link{ax_yaxis}}.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @example examples/ax_yaxis2.R
|
||||
|
@ -1170,13 +1170,12 @@ ax_yaxis2 <- function(ax, ...) {
|
|||
|
||||
#' Theme for charts
|
||||
#'
|
||||
#' @param ax An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param mode use light or dark theme.
|
||||
#' @param palette Character. Available palettes: \code{"palette1"} to \code{"palette10"}.
|
||||
#' @param monochrome A list of parameters.
|
||||
#' @param ... Additional parameters.
|
||||
#'
|
||||
#' @return An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @export
|
||||
#'
|
||||
#' @note See \url{https://apexcharts.com/docs/options/theme/}
|
||||
|
@ -1226,7 +1225,7 @@ ax_theme <- function(ax,
|
|||
|
||||
#' Configuration for charts with no data
|
||||
#'
|
||||
#' @param ax An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param text The text to display when no-data is available.
|
||||
#' @param align Horizontal alignment: \code{"left"}, \code{"center"} or \code{"right"}.
|
||||
#' @param verticalAlign Vertical alignment: \code{"top"}, \code{"middle"} or \code{"bottom"}.
|
||||
|
@ -1235,7 +1234,6 @@ ax_theme <- function(ax,
|
|||
#' @param fontFamily FontFamily of the text.
|
||||
#' @param offsetX,offsetY Text offset.
|
||||
#'
|
||||
#' @return An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
|
@ -1275,9 +1273,44 @@ ax_nodata <- function(ax,
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#' Forecast data points
|
||||
#'
|
||||
#' @template ax-default
|
||||
#' @param count Number of ending data-points you want to indicate as a forecast or prediction values.
|
||||
#' The ending line/bar will result into a dashed border with a distinct look to differentiate from the rest of the data-points.
|
||||
#' @param fillOpacity Opacity of the fill attribute.
|
||||
#' @param strokeWidth Sets the width of the points.
|
||||
#' @param dashArray Creates dashes in borders of svg path. Higher number creates more space between dashes in the border.
|
||||
#' @param ... Additional arguments (not used).
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' # add 5 predictions to data then plot it
|
||||
#' data.frame(
|
||||
#' time = seq_len(53),
|
||||
#' lh = c(
|
||||
#' as.vector(lh),
|
||||
#' as.vector(predict(arima(lh, order = c(1,0,1)), 5)$pred)
|
||||
#' )
|
||||
#' ) %>%
|
||||
#' apex(aes(time, lh), type = "line") %>%
|
||||
#' ax_xaxis(type = "numeric") %>%
|
||||
#' ax_forecast_data_points(count = 5)
|
||||
ax_forecast_data_points <- function(ax,
|
||||
count = NULL,
|
||||
fillOpacity = NULL,
|
||||
strokeWidth = NULL,
|
||||
dashArray = NULL,
|
||||
...) {
|
||||
params <- list(
|
||||
count = count,
|
||||
fillOpacity = fillOpacity,
|
||||
strokeWidth = strokeWidth,
|
||||
dashArray = dashArray
|
||||
)
|
||||
.ax_opt2(ax, "forecastDataPoints", l = dropNulls(params))
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
127
R/apex.R
127
R/apex.R
|
@ -5,28 +5,23 @@
|
|||
#' data, mapping and type of chart.
|
||||
#'
|
||||
#' @param data Default dataset to use for chart. If not already
|
||||
#' a \code{data.frame}, it will be coerced to with \code{as.data.frame}.
|
||||
#' a `data.frame`, it will be coerced to with `as.data.frame`.
|
||||
#' @param mapping Default list of aesthetic mappings to use for chart
|
||||
#' @param type Specify the chart type. Available options:
|
||||
#' \code{"column"}, \code{"bar"},
|
||||
#' \code{"line"}, \code{"step"}, \code{"spline"},
|
||||
#' \code{"area"}, \code{"area-step"}, \code{"area-spline"},
|
||||
#' \code{"pie"}, \code{"donut"},
|
||||
#' \code{"radialBar"}, \code{"radar"}, \code{"scatter"},
|
||||
#' \code{"heatmap"}, \code{"treemap"},
|
||||
#' \code{"timeline"}.
|
||||
#' `"column"`, `"bar"`,
|
||||
#' `"line"`, `"step"`, `"spline"`,
|
||||
#' `"area"`, `"area-step"`, `"area-spline"`,
|
||||
#' `"pie"`, `"donut"`,
|
||||
#' `"radialBar"`, `"radar"`, `"scatter"`,
|
||||
#' `"heatmap"`, `"treemap"`,
|
||||
#' `"timeline"`, `"dumbbell"` and `"slope"`.
|
||||
#' @param ... Other arguments passed on to methods. Not currently used.
|
||||
#' @param auto_update In Shiny application, update existing chart
|
||||
#' rather than generating new one. Can be \code{TRUE}/\code{FALSE} or
|
||||
#' use \code{\link{config_update}} for more control.
|
||||
#' @param synchronize Give a common id to charts to synchronize them (tooltip and zoom).
|
||||
#' @param serie_name Name for the serie displayed in tooltip,
|
||||
#' only used for single serie.
|
||||
#' @param width A numeric input in pixels.
|
||||
#' @param height A numeric input in pixels.
|
||||
#' @param elementId Use an explicit element ID for the widget.
|
||||
#' @inheritParams apexchart
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @return An [apexchart()] `htmlwidget` object.
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
|
@ -35,7 +30,9 @@
|
|||
#' @importFrom stats complete.cases
|
||||
#'
|
||||
#' @example examples/apex.R
|
||||
apex <- function(data, mapping, type = "column", ...,
|
||||
apex <- function(data, mapping,
|
||||
type = "column",
|
||||
...,
|
||||
auto_update = TRUE,
|
||||
synchronize = NULL,
|
||||
serie_name = NULL,
|
||||
|
@ -46,8 +43,10 @@ apex <- function(data, mapping, type = "column", ...,
|
|||
arg = type,
|
||||
choices = c(
|
||||
"column", "bar",
|
||||
"line", "spline", "step",
|
||||
"rangeBar", "dumbbell",
|
||||
"line", "spline", "step", "slope",
|
||||
"area", "area-spline", "area-step",
|
||||
"rangeArea",
|
||||
"pie", "donut",
|
||||
"radialBar",
|
||||
"radar",
|
||||
|
@ -56,7 +55,8 @@ apex <- function(data, mapping, type = "column", ...,
|
|||
"heatmap",
|
||||
"treemap",
|
||||
"timeline",
|
||||
"candlestick"
|
||||
"candlestick",
|
||||
"boxplot"
|
||||
)
|
||||
)
|
||||
data <- as.data.frame(data)
|
||||
|
@ -69,7 +69,8 @@ apex <- function(data, mapping, type = "column", ...,
|
|||
type <- "bubble"
|
||||
}
|
||||
mapdata <- lapply(mapping, rlang::eval_tidy, data = data)
|
||||
if (is.null(mapdata$y) & !type %in% c("candlestick", "timeline", "heatmap")) {
|
||||
type_no_compute <- c("candlestick", "boxplot", "timeline", "heatmap", "rangeArea", "rangeBar", "dumbbell", "slope")
|
||||
if (is.null(mapdata$y) & !type %in% type_no_compute) {
|
||||
mapdata <- compute_count(mapdata)
|
||||
}
|
||||
if (type %in% c("pie", "donut", "radialBar", "polarArea")) {
|
||||
|
@ -118,8 +119,11 @@ apex <- function(data, mapping, type = "column", ...,
|
|||
|
||||
|
||||
# Construct series
|
||||
#' @importFrom rlang %||%
|
||||
make_series <- function(mapdata, mapping, type = NULL, serie_name = NULL, force_datetime_names = FALSE) {
|
||||
if (identical(type, "candlestick")) {
|
||||
if (identical(type, "boxplot")) {
|
||||
series <- parse_boxplot_data(mapdata, serie_name = serie_name)
|
||||
} else if (identical(type, "candlestick")) {
|
||||
if (!all(c("x", "open", "high", "low", "close") %in% names(mapping)))
|
||||
stop("For candlestick charts 'x', 'open', 'high', 'low', and 'close' aesthetics must be provided.", call. = FALSE)
|
||||
if (!is.null(mapdata$group))
|
||||
|
@ -132,8 +136,23 @@ make_series <- function(mapdata, mapping, type = NULL, serie_name = NULL, force_
|
|||
if (is.null(mapdata$group))
|
||||
mapdata$group <- serie_name %||% rlang::as_label(mapping$x)
|
||||
series <- parse_timeline_data(mapdata)
|
||||
} else if (isTRUE(type %in% c("dumbbell"))) {
|
||||
if (!all(c("y", "x", "xend") %in% names(mapping)))
|
||||
stop("For dumbbell charts 'x', 'xend', and 'y' aesthetics must be provided.", call. = FALSE)
|
||||
if (is.null(mapdata$group))
|
||||
mapdata$group <- serie_name %||% rlang::as_label(mapping$x)
|
||||
series <- parse_dumbbell_data(mapdata)
|
||||
} else {
|
||||
mapdata <- as.data.frame(mapdata, stringsAsFactors = FALSE)
|
||||
if (all(rlang::has_name(mapdata, c("ymin", "ymax")))) {
|
||||
mapdata$y <- lapply(
|
||||
X = seq_len(nrow(mapdata)),
|
||||
FUN = function(i) {
|
||||
list(mapdata$ymin[i], mapdata$ymax[i])
|
||||
}
|
||||
)
|
||||
mapdata$ymin <- mapdata$ymax <- NULL
|
||||
}
|
||||
if (isTRUE(type %in% c("scatter", "bubble"))) {
|
||||
complete <- complete.cases(mapdata[c("x", "y")])
|
||||
n_missing <- sum(!complete)
|
||||
|
@ -145,7 +164,7 @@ make_series <- function(mapdata, mapping, type = NULL, serie_name = NULL, force_
|
|||
if (is.character(mapdata$x))
|
||||
mapdata$x[is.na(mapdata$x)] <- "NA"
|
||||
x_order <- unique(mapdata$x)
|
||||
if (is_x_datetime(mapdata)) {
|
||||
if (is_x_datetime(mapdata) & !identical(type, "rangeArea")) {
|
||||
add_names <- force_datetime_names
|
||||
x_order <- sort(x_order)
|
||||
} else {
|
||||
|
@ -154,13 +173,13 @@ make_series <- function(mapdata, mapping, type = NULL, serie_name = NULL, force_
|
|||
if (is.null(serie_name) & !is.null(mapping$y))
|
||||
serie_name <- rlang::as_label(mapping$y)
|
||||
series <- list(dropNulls(list(
|
||||
name = serie_name,
|
||||
name = as.character(serie_name),
|
||||
type = multi_type(type),
|
||||
data = parse_df(mapdata, add_names = add_names)
|
||||
)))
|
||||
if (is_grouped(mapping)) {
|
||||
mapdata <- rename_aes(mapdata)
|
||||
len_grp <- tapply(mapdata$group, mapdata$group, length)
|
||||
len_grp <- tapply(as.character(mapdata$group), as.character(mapdata$group), length)
|
||||
if (length(unique(len_grp)) > 1 & !isTRUE(type %in% c("scatter", "bubble"))) {
|
||||
warning("apex: all groups must have same length! You can use `tidyr::complete` for this.")
|
||||
}
|
||||
|
@ -171,7 +190,7 @@ make_series <- function(mapdata, mapping, type = NULL, serie_name = NULL, force_
|
|||
data <- data[, setdiff(names(data), "group"), drop = FALSE]
|
||||
data <- data[order(match(x = data[["x"]], table = x_order, nomatch = 0L)), , drop = FALSE]
|
||||
dropNulls(list(
|
||||
name = x,
|
||||
name = as.character(x),
|
||||
type = multi_type(type),
|
||||
data = parse_df(
|
||||
data = data,
|
||||
|
@ -193,8 +212,11 @@ is_sized <- function(x) {
|
|||
any(c("size", "z") %in% names(x))
|
||||
}
|
||||
|
||||
|
||||
#' @importFrom rlang quo
|
||||
rename_aes_heatmap <- function(mapping) {
|
||||
if (is.null(mapping["x"]))
|
||||
stop("apex(..., type = 'heatmap') must have an 'x' aesthetic", call. = FALSE)
|
||||
mapping[["x"]] <- quo(as.character(!!mapping[["x"]]))
|
||||
n_mapping <- names(mapping)
|
||||
n_mapping[n_mapping == "y"] <- "group"
|
||||
if ("fill" %in% n_mapping) {
|
||||
|
@ -234,14 +256,16 @@ list1 <- function(x) {
|
|||
|
||||
# Change type of charts for helpers type
|
||||
correct_type <- function(type) {
|
||||
if (identical(type, "column")) {
|
||||
if (isTRUE(type %in% c("column"))) {
|
||||
"bar"
|
||||
} else if (isTRUE(type %in% c("spline", "step"))) {
|
||||
} else if (isTRUE(type %in% c("spline", "step", "slope"))) {
|
||||
"line"
|
||||
} else if (isTRUE(type %in% c("area-spline", "area-step"))) {
|
||||
"area"
|
||||
} else if (identical(type, "timeline")) {
|
||||
} else if (isTRUE(type %in% c("timeline", "dumbbell"))) {
|
||||
"rangeBar"
|
||||
} else if (identical(type, "boxplot")) {
|
||||
"boxPlot"
|
||||
} else {
|
||||
type
|
||||
}
|
||||
|
@ -250,7 +274,7 @@ correct_type <- function(type) {
|
|||
multi_type <- function(x) {
|
||||
multis <- c("column", "area", "line",
|
||||
"spline", "step", "scatter",
|
||||
"bubble")
|
||||
"bubble", "rangeArea")
|
||||
if (isTRUE(x %in% multis)) {
|
||||
correct_type(x)
|
||||
} else {
|
||||
|
@ -271,7 +295,7 @@ range_num <- function(x) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#' @importFrom rlang %||%
|
||||
compute_count <- function(mapdata) {
|
||||
if (!is_grouped(mapdata)) {
|
||||
x <- mapdata$x
|
||||
|
@ -300,12 +324,17 @@ choose_config <- function(type, mapdata) {
|
|||
datetime <- is_x_datetime(mapdata)
|
||||
range_x <- range_num(mapdata$x)
|
||||
range_y <- range_num(mapdata$y)
|
||||
if (identical(type, "boxplot")) {
|
||||
box_horiz <- !is.numeric(mapdata$y) & is.numeric(mapdata$x)
|
||||
}
|
||||
switch(
|
||||
type,
|
||||
"bar" = config_bar(horizontal = TRUE),
|
||||
"dumbbell" = config_bar(horizontal = TRUE, isDumbbell = TRUE),
|
||||
"column" = config_bar(horizontal = FALSE, datetime = datetime),
|
||||
"line" = config_line(datetime = datetime),
|
||||
"area" = config_line(datetime = datetime),
|
||||
"rangeArea" = config_line(datetime = datetime),
|
||||
"spline" = config_line(curve = "smooth", datetime = datetime),
|
||||
"step" = config_line(curve = "stepline", datetime = datetime),
|
||||
"area-spline" = config_line(curve = "smooth", datetime = datetime),
|
||||
|
@ -314,34 +343,33 @@ choose_config <- function(type, mapdata) {
|
|||
"bubble" = config_scatter(range_x = range_x, range_y = range_y, datetime = datetime),
|
||||
"timeline" = config_timeline(),
|
||||
"candlestick" = config_candlestick(),
|
||||
"boxplot" = config_boxplot(horizontal = box_horiz),
|
||||
"slope" = config_slope(),
|
||||
list()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
# Config for column & bar charts
|
||||
config_bar <- function(horizontal = FALSE, datetime = FALSE) {
|
||||
config_bar <- function(horizontal = FALSE, datetime = FALSE, isDumbbell = FALSE) {
|
||||
config <- list(
|
||||
dataLabels = list(enabled = FALSE),
|
||||
plotOptions = list(
|
||||
bar = list(
|
||||
horizontal = horizontal
|
||||
horizontal = horizontal,
|
||||
isDumbbell = isDumbbell
|
||||
)
|
||||
),
|
||||
tooltip = list(
|
||||
shared = TRUE,
|
||||
intersect = FALSE,
|
||||
followCursor = TRUE
|
||||
),
|
||||
grid = list(
|
||||
yaxis = list(lines = list(show = !isTRUE(horizontal))),
|
||||
xaxis = list(lines = list(show = isTRUE(horizontal)))
|
||||
)
|
||||
)
|
||||
if (isTRUE(horizontal)) {
|
||||
config <- c(config, list(
|
||||
grid = list(
|
||||
yaxis = list(lines = list(show = FALSE)),
|
||||
xaxis = list(lines = list(show = TRUE))
|
||||
)
|
||||
))
|
||||
}
|
||||
if (isTRUE(datetime)) {
|
||||
config$xaxis$type <- "datetime"
|
||||
}
|
||||
|
@ -427,3 +455,22 @@ config_candlestick <- function() {
|
|||
)
|
||||
}
|
||||
|
||||
config_boxplot <- function(horizontal = FALSE) {
|
||||
list(
|
||||
plotOptions = list(
|
||||
bar = list(
|
||||
horizontal = horizontal
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
config_slope <- function() {
|
||||
list(
|
||||
plotOptions = list(
|
||||
line = list(
|
||||
isSlopeChart = TRUE
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
#' to create interactive and modern SVG charts.
|
||||
#'
|
||||
#' @name apexcharter-package
|
||||
#' @docType package
|
||||
#' @author Victor Perrier (@@dreamRs_fr)
|
||||
NULL
|
||||
"_PACKAGE"
|
||||
|
||||
#' apexcharter exported operators and S3 methods
|
||||
#'
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
|
||||
#' Create an apexcharts.js widget
|
||||
#' Create an ApexCharts widget
|
||||
#'
|
||||
#' @param ax_opts A \code{list} in JSON format with chart parameters.
|
||||
#' @param ax_opts A `list` in JSON format with chart parameters.
|
||||
#' @param auto_update In Shiny application, update existing chart
|
||||
#' rather than generating new one. Can be \code{TRUE}/\code{FALSE} or
|
||||
#' use \code{\link{config_update}} for more control.
|
||||
#' @param width A numeric input in pixels.
|
||||
#' @param height A numeric input in pixels.
|
||||
#' rather than generating new one. Can be `TRUE`/`FALSE` or
|
||||
#' use [config_update()] for more control.
|
||||
#' @param width,height A numeric input in pixels.
|
||||
#' @param elementId Use an explicit element ID for the widget.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @return An [apexchart()] `htmlwidget` object.
|
||||
#' @seealso For quickly create a chart, see [apex()].
|
||||
#' @export
|
||||
#'
|
||||
#' @importFrom htmlwidgets createWidget sizingPolicy
|
||||
#'
|
||||
#' @example examples/apexchart.R
|
||||
apexchart <- function(ax_opts = list(), auto_update = TRUE, width = NULL, height = NULL, elementId = NULL) {
|
||||
|
||||
apexchart <- function(ax_opts = list(),
|
||||
auto_update = TRUE,
|
||||
width = NULL,
|
||||
height = NULL,
|
||||
elementId = NULL) {
|
||||
|
||||
if (isTRUE(auto_update)) {
|
||||
auto_update <- config_update()
|
||||
}
|
||||
|
@ -38,6 +42,7 @@ apexchart <- function(ax_opts = list(), auto_update = TRUE, width = NULL, height
|
|||
preRenderHook = function(widget) {
|
||||
widget$x$data <- NULL
|
||||
widget$x$mapping <- NULL
|
||||
widget$x$add_line <- NULL
|
||||
add_locale_apex(widget)
|
||||
},
|
||||
sizingPolicy = htmlwidgets::sizingPolicy(
|
||||
|
@ -56,16 +61,16 @@ apexchart <- function(ax_opts = list(), auto_update = TRUE, width = NULL, height
|
|||
)
|
||||
}
|
||||
|
||||
# dput(tools::file_path_sans_ext(list.files("inst/htmlwidgets/assets/apexcharts-locales/")))
|
||||
# dput(tools::file_path_sans_ext(list.files("inst/apexcharts-locale/")))
|
||||
#' @importFrom jsonlite fromJSON
|
||||
add_locale_apex <- function(widget) {
|
||||
if (!is.null(widget$x$ax_opts$chart$defaultLocale)) {
|
||||
defaultLocale <- widget$x$ax_opts$chart$defaultLocale
|
||||
defaultLocale <- match.arg(
|
||||
arg = defaultLocale,
|
||||
choices = c("ca", "cs", "de", "el", "en", "es", "fi", "fr", "he", "hi",
|
||||
"hr", "hu", "hy", "id", "it", "ja", "ka", "ko", "lt", "nb", "nl",
|
||||
"pl", "pt-br", "pt", "rs", "ru", "se", "sk", "sl", "sq", "th",
|
||||
choices = c("ca", "cs", "de", "el", "en", "es", "fi", "fr", "he", "hi",
|
||||
"hr", "hu", "hy", "id", "it", "ja", "ka", "ko", "lt", "nb", "nl",
|
||||
"pl", "pt-br", "pt", "rs", "ru", "se", "sk", "sl", "sq", "th",
|
||||
"tr", "ua", "zh-cn")
|
||||
)
|
||||
if (!is.null(widget$x$ax_opts$chart$locales)) {
|
||||
|
@ -75,7 +80,7 @@ add_locale_apex <- function(widget) {
|
|||
)
|
||||
} else {
|
||||
path <- system.file(
|
||||
file.path("htmlwidgets/assets/apexcharts-locales", paste0(defaultLocale, ".json")),
|
||||
file.path("apexcharts-locale", paste0(defaultLocale, ".json")),
|
||||
package = "apexcharter"
|
||||
)
|
||||
locale <- jsonlite::fromJSON(txt = path)
|
||||
|
@ -93,22 +98,22 @@ add_locale_apex <- function(widget) {
|
|||
#' @param update_options Update or not global options for chart.
|
||||
#' @param options_animate Should the chart animate on re-rendering.
|
||||
#' @param options_redrawPaths When the chart is re-rendered,
|
||||
#' should it draw from the existing paths or completely redraw
|
||||
#' the chart paths from the beginning. By default, the chart
|
||||
#' should it draw from the existing paths or completely redraw
|
||||
#' the chart paths from the beginning. By default, the chart
|
||||
#' is re-rendered from the existing paths.
|
||||
#' @param update_synced_charts All the charts in a group should
|
||||
#' also update when one chart in a group is updated.
|
||||
#'
|
||||
#'
|
||||
#' @export
|
||||
config_update <- function(series_animate = TRUE,
|
||||
update_options = FALSE,
|
||||
options_animate = TRUE,
|
||||
config_update <- function(series_animate = TRUE,
|
||||
update_options = FALSE,
|
||||
options_animate = TRUE,
|
||||
options_redrawPaths = TRUE,
|
||||
update_synced_charts = FALSE) {
|
||||
list(
|
||||
series_animate = series_animate,
|
||||
update_options = update_options,
|
||||
options_animate = options_animate,
|
||||
series_animate = series_animate,
|
||||
update_options = update_options,
|
||||
options_animate = options_animate,
|
||||
options_redrawPaths = options_redrawPaths,
|
||||
update_synced_charts = update_synced_charts
|
||||
)
|
||||
|
@ -120,23 +125,26 @@ config_update <- function(series_animate = TRUE,
|
|||
#' @description Output and render functions for using apexcharter within Shiny
|
||||
#' applications and interactive Rmd documents.
|
||||
#'
|
||||
#' @param outputId output variable to read from
|
||||
#' @param width,height Must be a valid CSS unit (like \code{'100\%'},
|
||||
#' \code{'400px'}, \code{'auto'}) or a number, which will be coerced to a
|
||||
#' string and have \code{'px'} appended.
|
||||
#' @param expr An expression that generates a apexcharter
|
||||
#' @param env The environment in which to evaluate \code{expr}.
|
||||
#' @param quoted Is \code{expr} a quoted expression (with \code{quote()})? This
|
||||
#' @param outputId Output variable to read from.
|
||||
#' @param width,height Must be a valid CSS unit (like `100%`,
|
||||
#' `400px`, `auto`) or a number, which will be coerced to a
|
||||
#' string and have `px` appended.
|
||||
#' @param expr An expression that generates a calendar
|
||||
#' @param env The environment in which to evaluate `expr`.
|
||||
#' @param quoted Is `expr` a quoted expression (with `quote()`)? This
|
||||
#' is useful if you want to save an expression in a variable.
|
||||
#'
|
||||
#' @return An Apexcharts output that can be included in the application UI.
|
||||
#'
|
||||
#' @return Output element that can be included in UI. Render function to create output in server.
|
||||
#'
|
||||
#' @note To render a chart with facets (using [ax_facet_wrap()] or [ax_facet_grid()]) in Shiny,
|
||||
#' see [apexfacetOutput()] (in UI) and [renderApexfacet()] (in Server).
|
||||
#'
|
||||
#' @name apexcharter-shiny
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @importFrom htmlwidgets shinyWidgetOutput shinyRenderWidget
|
||||
#'
|
||||
#'
|
||||
#' @example examples/apexcharter-shiny.R
|
||||
apexchartOutput <- function(outputId, width = "100%", height = "400px") { # nocov start
|
||||
htmlwidgets::shinyWidgetOutput(outputId, "apexcharter", width, height, package = "apexcharter")
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
|
||||
#' Set specific color's series
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param values Named list, names represent data series, values colors to use.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @export
|
||||
#'
|
||||
#' @example examples/colors.R
|
||||
|
|
69
R/data.R
69
R/data.R
|
@ -1,20 +1,3 @@
|
|||
#' UNHCR data for 2017
|
||||
#'
|
||||
#' The dataset contains data about UNHCR's populations of concern for the year 2017.
|
||||
#'
|
||||
#' @format A data frame with 11237 observations and the following 6 variables:
|
||||
#' \describe{
|
||||
#' \item{\code{country_origin}}{Country of origin of population}
|
||||
#' \item{\code{country_residence}}{Country / territory of asylum/residence of population}
|
||||
#' \item{\code{population_type}}{Populations of concern : Refugees, Asylum-seekers, Internally displaced persons (IDPs), Returned refugees,
|
||||
#' Returned IDPs, Stateless persons, Others of concern.}
|
||||
#' \item{\code{value}}{Number of people concerned}
|
||||
#' \item{\code{continent_residence}}{Continent of origin of population}
|
||||
#' \item{\code{continent_origin}}{Continent of residence of population}
|
||||
#' }
|
||||
#' @source UNHCR (The UN Refugee Agency) (\url{https://www.unhcr.org/})
|
||||
"unhcr_popstats_2017"
|
||||
|
||||
|
||||
#' UNHCR data by continent of origin
|
||||
#'
|
||||
|
@ -24,11 +7,11 @@
|
|||
#' \describe{
|
||||
#' \item{\code{year}}{Year concerned.}
|
||||
#' \item{\code{population_type}}{Populations of concern : Refugees, Asylum-seekers, Internally displaced persons (IDPs), Returned refugees,
|
||||
#' Returned IDPs, Stateless persons, Others of concern.}
|
||||
#' Returned IDPs, Stateless persons, Others of concern.}
|
||||
#' \item{\code{continent_origin}}{Continent of residence of population.}
|
||||
#' \item{\code{n}}{Number of people concerned.}
|
||||
#' }
|
||||
#' @source UNHCR (The UN Refugee Agency) (\url{https://www.unhcr.org/})
|
||||
#' @source UNHCR (The UN Refugee Agency) (\url{https://data.unhcr.org/})
|
||||
"unhcr_ts"
|
||||
|
||||
|
||||
|
@ -40,7 +23,7 @@
|
|||
#' @format A data frame with 120 observations and the following 3 variables:
|
||||
#' \describe{
|
||||
#' \item{\code{date}}{date.}
|
||||
#' \item{\code{type}}{Type of data : realized or forecast.}
|
||||
#' \item{\code{type}}{Type of data : realized or forecast.}
|
||||
#' \item{\code{value}}{Value in giga-watt per hour.}
|
||||
#' }
|
||||
#' @source Rte (Electricity Transmission Network in France) (\url{https://data.rte-france.com/})
|
||||
|
@ -53,7 +36,7 @@
|
|||
#' @format A data frame with 60 observations and the following 5 variables:
|
||||
#' \describe{
|
||||
#' \item{\code{datetime}}{Timestamp.}
|
||||
#' \item{\code{open}}{Open value.}
|
||||
#' \item{\code{open}}{Open value.}
|
||||
#' \item{\code{high}}{Highest value.}
|
||||
#' \item{\code{low}}{Lowest value.}
|
||||
#' \item{\code{close}}{Close value.}
|
||||
|
@ -63,15 +46,55 @@
|
|||
|
||||
|
||||
#' @title Paris Climate
|
||||
#'
|
||||
#'
|
||||
#' @description Average temperature and precipitation in Paris for the period 1971-2000.
|
||||
#'
|
||||
#'
|
||||
#' @format A data frame with 12 observations and the following 3 variables:
|
||||
#' \describe{
|
||||
#' \item{\code{month}}{Month}
|
||||
#' \item{\code{temperature}}{Temperature (in degree celsius).}
|
||||
#' \item{\code{temperature}}{Temperature (in degree celsius).}
|
||||
#' \item{\code{precipitation}}{Precipitation (in mm).}
|
||||
#' }
|
||||
#' @source Wikipedia (\url{https://fr.wikipedia.org/wiki/Climat_de_Paris})
|
||||
"climate_paris"
|
||||
|
||||
|
||||
#' @title eco2mix data
|
||||
#'
|
||||
#' @description The dataset contains data about electricity consumption and production in France between 2012 and 2022.
|
||||
#'
|
||||
#' @format A data frame with 3,033 observations and 3 variables.
|
||||
#'
|
||||
#' @source Rte (Réseau et transport d'électricité) (\url{https://www.rte-france.com/eco2mix} and \url{https://opendata.reseaux-energies.fr/})
|
||||
"eco2mix"
|
||||
|
||||
|
||||
#' @title Temperature data
|
||||
#'
|
||||
#' @description The dataset contains data about temperatures in France between 2018 and 2022.
|
||||
#'
|
||||
#' @format A data frame with 365 observations and 6 variables.
|
||||
#'
|
||||
#' @source Enedis (\url{https://data.enedis.fr/explore/dataset/donnees-de-temperature-et-de-pseudo-rayonnement/})
|
||||
"temperatures"
|
||||
|
||||
|
||||
#' @title Life expectancy data
|
||||
#'
|
||||
#' @description The dataset contains data about life expectancy in 1972 and 2007 for 10 countries.
|
||||
#'
|
||||
#' @format A data frame with 10 observations and 4 variables.
|
||||
#'
|
||||
#' @source gapminder package (\url{https://jennybc.github.io/gapminder/} and \url{https://www.gapminder.org/data/})
|
||||
"life_expec"
|
||||
|
||||
#' @title Life expectancy data (long format)
|
||||
#'
|
||||
#' @description The dataset contains data about life expectancy in 1972 and 2007 for 10 countries.
|
||||
#'
|
||||
#' @format A data frame with 20 observations and 3 variables.
|
||||
#'
|
||||
#' @source gapminder package (\url{https://jennybc.github.io/gapminder/} and \url{https://www.gapminder.org/data/})
|
||||
"life_expec_long"
|
||||
|
||||
|
|
|
@ -0,0 +1,180 @@
|
|||
|
||||
#' @importFrom rlang eval_tidy
|
||||
get_facets <- function(data, rows, cols, type = c("wrap", "grid")) {
|
||||
type <- match.arg(type)
|
||||
byrows <- lapply(X = rows, FUN = eval_tidy, data = data)
|
||||
bycols <- lapply(X = cols, FUN = eval_tidy, data = data)
|
||||
facets <- split(x = data, f = c(bycols, byrows), sep = "|__|")
|
||||
facets <- lapply(
|
||||
X = seq_along(facets),
|
||||
FUN = function(i) {
|
||||
facet <- facets[[i]]
|
||||
attr(facet, "keys") <- strsplit(
|
||||
x = names(facets)[i],
|
||||
split = "|__|", fixed = TRUE
|
||||
)[[1]]
|
||||
facet
|
||||
}
|
||||
)
|
||||
label_row <- lapply(byrows, unique)
|
||||
label_row <- lapply(label_row, sort)
|
||||
label_row <- apply(expand.grid(label_row), 1, paste, collapse = "*")
|
||||
label_col <- lapply(bycols, unique)
|
||||
label_col <- lapply(label_col, sort)
|
||||
label_col <- apply(expand.grid(label_col), 1, paste, collapse = "*")
|
||||
list(
|
||||
facets = facets,
|
||||
nrow = if (identical(type, "grid")) n_facet(byrows) else NULL,
|
||||
ncol = if (identical(type, "grid")) n_facet(bycols) else NULL,
|
||||
label_row = label_row,
|
||||
label_col = label_col
|
||||
)
|
||||
}
|
||||
|
||||
n_facet <- function(l) {
|
||||
l <- lapply(l, function(x) {
|
||||
length(unique(x))
|
||||
})
|
||||
Reduce(`*`, l)
|
||||
}
|
||||
|
||||
#' @importFrom rlang %||% is_list is_named
|
||||
set_scale <- function(ax, values, scales = c("fixed", "free", "free_y", "free_x"), axis = c("x", "y", "y2")) {
|
||||
if (is.null(scales))
|
||||
return(ax)
|
||||
scales <- match.arg(scales)
|
||||
axis <- match.arg(axis)
|
||||
if (identical(axis, "y2")) {
|
||||
axis <- "y"
|
||||
wyaxis <- 2
|
||||
} else {
|
||||
wyaxis <- 1
|
||||
}
|
||||
if (is.null(values))
|
||||
return(ax)
|
||||
|
||||
if (inherits(values, c("numeric", "integer", "Date", "POSIXt"))) {
|
||||
range_vals <- range(pretty(values, n = 10), na.rm = TRUE)
|
||||
} else {
|
||||
range_vals <- NULL
|
||||
}
|
||||
|
||||
waxis <- switch(
|
||||
axis,
|
||||
"x" = "xaxis",
|
||||
"y" = "yaxis"
|
||||
)
|
||||
|
||||
this_axis <- ax$x$ax_opts[[waxis]]
|
||||
if (inherits(this_axis, "yaxis2")) {
|
||||
ax$x$ax_opts[[waxis]][[wyaxis]] <- set_scale_axis(
|
||||
this_axis[[wyaxis]],
|
||||
range_vals = range_vals,
|
||||
scales = scales,
|
||||
axis = axis
|
||||
)
|
||||
# ax$x$ax_opts[[waxis]][[2]] <- set_scale_axis(
|
||||
# this_axis[[2]],
|
||||
# range_vals = range_vals,
|
||||
# scales = scales,
|
||||
# axis = axis
|
||||
# )
|
||||
} else {
|
||||
ax$x$ax_opts[[waxis]] <- set_scale_axis(
|
||||
this_axis,
|
||||
range_vals = range_vals,
|
||||
scales = scales,
|
||||
axis = axis
|
||||
)
|
||||
}
|
||||
|
||||
return(ax)
|
||||
}
|
||||
|
||||
|
||||
scale_fmt <- function(x, time = inherits(x, c("Date", "POSIXt"))) {
|
||||
if (is.null(x))
|
||||
return(NULL)
|
||||
if (time)
|
||||
x <- format_date(x)
|
||||
x
|
||||
}
|
||||
|
||||
|
||||
set_scale_axis <- function(this_axis,
|
||||
range_vals,
|
||||
scales = c("fixed", "free", "free_y", "free_x"),
|
||||
axis = c("x", "y")) {
|
||||
scales <- match.arg(scales)
|
||||
axis <- match.arg(axis)
|
||||
if (scales == "fixed") {
|
||||
this_axis$min <- this_axis$min %||% scale_fmt(range_vals[1])
|
||||
this_axis$max <- this_axis$max %||% scale_fmt(range_vals[2])
|
||||
} else if (scales == "free") {
|
||||
this_axis$min <- NULL
|
||||
this_axis$max <- NULL
|
||||
} else if (scales == "free_x") {
|
||||
if (axis == "y") {
|
||||
this_axis$min <- this_axis$min %||% scale_fmt(range_vals[1])
|
||||
this_axis$max <- this_axis$max %||% scale_fmt(range_vals[2])
|
||||
} else {
|
||||
this_axis$min <- NULL
|
||||
this_axis$max <- NULL
|
||||
}
|
||||
} else if (scales == "free_y") {
|
||||
if (axis == "x") {
|
||||
this_axis$min <- this_axis$min %||% scale_fmt(range_vals[1])
|
||||
this_axis$max <- this_axis$max %||% scale_fmt(range_vals[2])
|
||||
} else {
|
||||
this_axis$min <- NULL
|
||||
this_axis$max <- NULL
|
||||
}
|
||||
}
|
||||
return(this_axis)
|
||||
}
|
||||
|
||||
|
||||
get_option <- function(ax, opt1, opt2 = NULL) {
|
||||
if (is.null(opt2)) {
|
||||
ax$x$ax_opts[[opt1]]
|
||||
} else {
|
||||
ax$x$ax_opts[[opt1]][[opt2]]
|
||||
}
|
||||
}
|
||||
remove_option <- function(ax, opt1, opt2 = NULL) {
|
||||
if (is.null(opt2)) {
|
||||
ax$x$ax_opts[[opt1]] <- NULL
|
||||
} else {
|
||||
ax$x$ax_opts[[opt1]][[opt2]] <- NULL
|
||||
}
|
||||
ax
|
||||
}
|
||||
|
||||
|
||||
get_yaxis_serie <- function(ax, which = 1) {
|
||||
series <- ax$x$ax_opts$series
|
||||
yaxis <- ax$x$ax_opts$yaxis
|
||||
if (inherits(yaxis, c("yaxis", "yaxis2"))) {
|
||||
yaxis <- yaxis[[which]]
|
||||
name <- yaxis$serieName
|
||||
if (!is.null(name)) {
|
||||
series_names <- vapply(series, FUN = `[[`, "name", FUN.VALUE = character(1))
|
||||
indice <- which(name == series_names)
|
||||
} else {
|
||||
indice <- which
|
||||
}
|
||||
unlist(lapply(series[[indice]]$data, FUN = `[[`, "y"))
|
||||
} else {
|
||||
unlist(lapply(
|
||||
X = seq_along(series),
|
||||
FUN = function(indice) {
|
||||
unlist(lapply(series[[indice]]$data, FUN = `[[`, "y"))
|
||||
}
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
has_yaxis2 <- function(ax) {
|
||||
inherits(ax$x$ax_opts$yaxis, "yaxis2")
|
||||
}
|
213
R/facets.R
213
R/facets.R
|
@ -1,114 +1,4 @@
|
|||
|
||||
#' @importFrom rlang eval_tidy
|
||||
get_facets <- function(data, rows, cols, type = c("wrap", "grid")) {
|
||||
type <- match.arg(type)
|
||||
byrows <- lapply(X = rows, FUN = eval_tidy, data = data)
|
||||
bycols <- lapply(X = cols, FUN = eval_tidy, data = data)
|
||||
facets <- split(x = data, f = c(bycols, byrows), sep = "|__|")
|
||||
facets <- lapply(
|
||||
X = seq_along(facets),
|
||||
FUN = function(i) {
|
||||
facet <- facets[[i]]
|
||||
attr(facet, "keys") <- strsplit(
|
||||
x = names(facets)[i],
|
||||
split = "|__|", fixed = TRUE
|
||||
)[[1]]
|
||||
facet
|
||||
}
|
||||
)
|
||||
label_row <- lapply(byrows, unique)
|
||||
label_row <- lapply(label_row, sort)
|
||||
label_row <- apply(expand.grid(label_row), 1, paste, collapse = "*")
|
||||
label_col <- lapply(bycols, unique)
|
||||
label_col <- lapply(label_col, sort)
|
||||
label_col <- apply(expand.grid(label_col), 1, paste, collapse = "*")
|
||||
list(
|
||||
facets = facets,
|
||||
nrow = if (identical(type, "grid")) n_facet(byrows) else NULL,
|
||||
ncol = if (identical(type, "grid")) n_facet(bycols) else NULL,
|
||||
label_row = label_row,
|
||||
label_col = label_col
|
||||
)
|
||||
}
|
||||
|
||||
n_facet <- function(l) {
|
||||
l <- lapply(l, function(x) {
|
||||
length(unique(x))
|
||||
})
|
||||
Reduce(`*`, l)
|
||||
}
|
||||
|
||||
|
||||
set_scale <- function(ax, values, scales = c("fixed", "free", "free_y", "free_x"), axis = c("x", "y")) {
|
||||
if (is.null(scales))
|
||||
return(ax)
|
||||
scales <- match.arg(scales)
|
||||
axis <- match.arg(axis)
|
||||
if (is.null(values))
|
||||
return(ax)
|
||||
if (inherits(values, c("numeric", "integer", "Date", "POSIXt"))) {
|
||||
range_vals <- range(pretty(values, n = 10), na.rm = TRUE)
|
||||
} else {
|
||||
range_vals <- NULL
|
||||
}
|
||||
|
||||
fmt <- function(x, time = inherits(values, c("Date", "POSIXt"))) {
|
||||
if (is.null(x))
|
||||
return(NULL)
|
||||
if (time)
|
||||
x <- format_date(x)
|
||||
x
|
||||
}
|
||||
|
||||
waxis <- switch(
|
||||
axis,
|
||||
"x" = "xaxis",
|
||||
"y" = "yaxis"
|
||||
)
|
||||
|
||||
if (scales == "fixed") {
|
||||
ax$x$ax_opts[[waxis]]$min <- ax$x$ax_opts[[waxis]]$min %||% fmt(range_vals[1])
|
||||
ax$x$ax_opts[[waxis]]$max <- ax$x$ax_opts[[waxis]]$max %||% fmt(range_vals[2])
|
||||
} else if (scales == "free") {
|
||||
ax$x$ax_opts[[waxis]]$min <- NULL
|
||||
ax$x$ax_opts[[waxis]]$max <- NULL
|
||||
} else if (scales == "free_x") {
|
||||
if (axis == "y") {
|
||||
ax$x$ax_opts[[waxis]]$min <- ax$x$ax_opts[[waxis]]$min %||% fmt(range_vals[1])
|
||||
ax$x$ax_opts[[waxis]]$max <- ax$x$ax_opts[[waxis]]$max %||% fmt(range_vals[2])
|
||||
} else {
|
||||
ax$x$ax_opts[[waxis]]$min <- NULL
|
||||
ax$x$ax_opts[[waxis]]$max <- NULL
|
||||
}
|
||||
} else if (scales == "free_y") {
|
||||
if (axis == "x") {
|
||||
ax$x$ax_opts[[waxis]]$min <- ax$x$ax_opts[[waxis]]$min %||% fmt(range_vals[1])
|
||||
ax$x$ax_opts[[waxis]]$max <- ax$x$ax_opts[[waxis]]$max %||% fmt(range_vals[2])
|
||||
} else {
|
||||
ax$x$ax_opts[[waxis]]$min <- NULL
|
||||
ax$x$ax_opts[[waxis]]$max <- NULL
|
||||
}
|
||||
}
|
||||
|
||||
return(ax)
|
||||
}
|
||||
|
||||
|
||||
get_option <- function(ax, opt1, opt2 = NULL) {
|
||||
if (is.null(opt2)) {
|
||||
ax$x$ax_opts[[opt1]]
|
||||
} else {
|
||||
ax$x$ax_opts[[opt1]][[opt2]]
|
||||
}
|
||||
}
|
||||
remove_option <- function(ax, opt1, opt2 = NULL) {
|
||||
if (is.null(opt2)) {
|
||||
ax$x$ax_opts[[opt1]] <- NULL
|
||||
} else {
|
||||
ax$x$ax_opts[[opt1]][[opt2]] <- NULL
|
||||
}
|
||||
ax
|
||||
}
|
||||
|
||||
#' @importFrom rlang eval_tidy is_null is_function
|
||||
build_facets <- function(chart) {
|
||||
|
@ -144,6 +34,14 @@ build_facets <- function(chart) {
|
|||
byrow = TRUE
|
||||
)
|
||||
lrow <- get_last_row(grid)
|
||||
facet_data_add_line <- if (!is.null(chart$x$add_line)) {
|
||||
get_facets(
|
||||
data = chart$x$add_line$data,
|
||||
rows = chart$x$facet$facets_row,
|
||||
cols = chart$x$facet$facets_col,
|
||||
type = chart$x$facet$type
|
||||
)$facets
|
||||
}
|
||||
facets <- lapply(
|
||||
X = nums,
|
||||
FUN = function(i) {
|
||||
|
@ -176,7 +74,37 @@ build_facets <- function(chart) {
|
|||
if (!is.null(new$x$colors_manual)) {
|
||||
new <- ax_colors_manual(ax = new, values = new$x$colors_manual)
|
||||
}
|
||||
new$height <- chart$x$facet$chart_height
|
||||
if (!is.null(facet_data_add_line)) {
|
||||
maplinedata <- lapply(chart$x$add_line$mapping, eval_tidy, data = facet_data_add_line[[i]])
|
||||
if (chart$x$facet$scales %in% c("fixed", "free_y") & chart$x$type %in% c("bar")) {
|
||||
maplinedata <- complete_mapdata(maplinedata, mapall)
|
||||
}
|
||||
if (chart$x$facet$scales %in% c("fixed", "free_x") & chart$x$type %in% c("column")) {
|
||||
maplinedata <- complete_mapdata(maplinedata, mapall)
|
||||
}
|
||||
new$x$ax_opts$series <- c(
|
||||
new$x$ax_opts$series,
|
||||
make_series(
|
||||
mapdata = maplinedata,
|
||||
mapping = chart$x$add_line$mapping,
|
||||
type = chart$x$add_line$type,
|
||||
serie_name = chart$x$add_line$serie_name,
|
||||
force_datetime_names = c("x", "y")
|
||||
)
|
||||
)
|
||||
# new <- add_line(
|
||||
# ax = new,
|
||||
# mapping = chart$x$add_line$mapping,
|
||||
# data = facet_data_add_line[[i]],
|
||||
# type = chart$x$add_line$type,
|
||||
# serie_name = chart$x$add_line$serie_name
|
||||
# )
|
||||
}
|
||||
if (has_yaxis2(new)) {
|
||||
values <- get_yaxis_serie(chart, 2)
|
||||
new <- set_scale(new, values, scales = chart$x$facet$scales, axis = "y2")
|
||||
}
|
||||
new$height <- chart$height %||% chart$x$facet$chart_height
|
||||
new$x$facet <- NULL
|
||||
class(new) <- setdiff(class(new), "apex_facet")
|
||||
return(new)
|
||||
|
@ -206,17 +134,25 @@ get_last_row <- function(mat) {
|
|||
|
||||
|
||||
|
||||
#' Facet wrap for ApexCharts
|
||||
#' @title Facets for ApexCharts
|
||||
#'
|
||||
#' @param ax An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @param facets Variable(s) to use for facetting, wrapped in \code{vars(...)}.
|
||||
#' @description Create matrix of charts by row and column faceting variable (`ax_facet_grid`),
|
||||
#' or by specified number of row and column for faceting variable(s) (`ax_facet_wrap`).
|
||||
#'
|
||||
#' @param ax An [apexchart()] `htmlwidget` object.
|
||||
#' @param facets Variable(s) to use for facetting, wrapped in `vars(...)`.
|
||||
#' @param nrow,ncol Number of row and column in output matrix.
|
||||
#' @param scales Should scales be fixed (\code{"fixed"}, the default),
|
||||
#' free (\code{"free"}), or free in one dimension (\code{"free_x"}, \code{"free_y"})?
|
||||
#' @param scales Should scales be fixed (`"fixed"`, the default),
|
||||
#' free (`"free"`), or free in one dimension (`"free_x"`, `"free_y"`)?
|
||||
#' @param labeller A function with one argument containing for each facet the value of the faceting variable.
|
||||
#' @param chart_height Individual chart height.
|
||||
#' @param chart_height Individual chart height, ignored if an height is defined in `apex()` or `apexcharter()`.
|
||||
#' @param grid_width Total width for the grid, regardless of the number of column.
|
||||
#'
|
||||
#' @return An [apexchart()] `htmlwidget` object with an additionnal class `"apex_facet"`.
|
||||
#'
|
||||
#' @details # Warning
|
||||
#' To properly render in Shiny applications, use [apexfacetOutput()] (in UI) and [renderApexfacet()] (in Server).
|
||||
#'
|
||||
#' @return An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @export
|
||||
#'
|
||||
#' @name apex-facets
|
||||
|
@ -230,7 +166,8 @@ ax_facet_wrap <- function(ax,
|
|||
ncol = NULL,
|
||||
scales = c("fixed", "free", "free_y", "free_x"),
|
||||
labeller = label_value,
|
||||
chart_height = "300px") {
|
||||
chart_height = "300px",
|
||||
grid_width = "100%") {
|
||||
if (!inherits(ax, "apex"))
|
||||
stop("ax_facet_wrap only works with charts generated with apex()", call. = FALSE)
|
||||
scales <- match.arg(scales)
|
||||
|
@ -243,6 +180,7 @@ ax_facet_wrap <- function(ax,
|
|||
scales = scales,
|
||||
labeller = labeller,
|
||||
chart_height = chart_height,
|
||||
grid_width = grid_width,
|
||||
type = "wrap"
|
||||
)
|
||||
class(ax) <- c("apex_facet", class(ax))
|
||||
|
@ -250,7 +188,8 @@ ax_facet_wrap <- function(ax,
|
|||
}
|
||||
|
||||
|
||||
#' @param rows,cols A set of variables or expressions quoted by vars() and defining faceting groups on the rows or columns dimension.
|
||||
#' @param rows,cols A set of variables or expressions quoted by `vars()`
|
||||
#' and defining faceting groups on the rows or columns dimension.
|
||||
#' @export
|
||||
#'
|
||||
#' @rdname apex-facets
|
||||
|
@ -261,7 +200,8 @@ ax_facet_grid <- function(ax,
|
|||
cols = NULL,
|
||||
scales = c("fixed", "free", "free_y", "free_x"),
|
||||
labeller = label_value,
|
||||
chart_height = "300px") {
|
||||
chart_height = "300px",
|
||||
grid_width = "100%") {
|
||||
if (!inherits(ax, "apex"))
|
||||
stop("ax_facet_wrap only works with charts generated with apex()", call. = FALSE)
|
||||
scales <- match.arg(scales)
|
||||
|
@ -277,6 +217,7 @@ ax_facet_grid <- function(ax,
|
|||
scales = scales,
|
||||
labeller = labeller,
|
||||
chart_height = chart_height,
|
||||
grid_width = grid_width,
|
||||
type = "grid"
|
||||
)
|
||||
class(ax) <- c("apex_facet", class(ax))
|
||||
|
@ -289,6 +230,8 @@ ax_facet_grid <- function(ax,
|
|||
|
||||
# Tag ---------------------------------------------------------------------
|
||||
|
||||
#' @importFrom rlang %||%
|
||||
#' @importFrom htmltools tags css validateCssUnit
|
||||
build_facet_tag <- function(x) {
|
||||
facets <- build_facets(x)
|
||||
content <- facets$facets
|
||||
|
@ -350,10 +293,10 @@ build_facet_tag <- function(x) {
|
|||
}
|
||||
if (identical(facets$type, "wrap")) {
|
||||
TAG <- build_grid(
|
||||
content = content,
|
||||
nrow = d$nrow,
|
||||
ncol = d$ncol,
|
||||
row_after = row_after,
|
||||
content = content,
|
||||
nrow = d$nrow,
|
||||
ncol = d$ncol,
|
||||
row_after = row_after,
|
||||
col_before = col_before
|
||||
)
|
||||
} else if (identical(facets$type, "grid")) {
|
||||
|
@ -389,7 +332,7 @@ build_facet_tag <- function(x) {
|
|||
col_after = if (!is.null(facets$nrow)) "30px",
|
||||
row_gap = "3px",
|
||||
col_gap = "3px",
|
||||
row_after = row_after,
|
||||
row_after = row_after,
|
||||
col_before = col_before
|
||||
)
|
||||
} else {
|
||||
|
@ -415,6 +358,11 @@ build_facet_tag <- function(x) {
|
|||
TAG
|
||||
)
|
||||
}
|
||||
TAG <- tags$div(
|
||||
style = css(width = validateCssUnit(x$x$facet$grid_width)),
|
||||
class = "apexcharter-facet",
|
||||
TAG
|
||||
)
|
||||
return(TAG)
|
||||
}
|
||||
|
||||
|
@ -449,11 +397,13 @@ apexfacetOutput <- function(outputId) {
|
|||
)
|
||||
}
|
||||
|
||||
#' @param expr An expression that generates a apexcharter facet.
|
||||
#' @param env The environment in which to evaluate \code{expr}.
|
||||
#' @param quoted Is \code{expr} a quoted expression (with \code{quote()})? This
|
||||
#' @param expr An expression that generates a apexcharter facet with [ax_facet_wrap()] or [ax_facet_grid()].
|
||||
#' @param env The environment in which to evaluate `expr`.
|
||||
#' @param quoted Is `expr` a quoted expression (with `quote()`)? This
|
||||
#' is useful if you want to save an expression in a variable.
|
||||
#'
|
||||
#' @seealso [ax_facet_wrap()], [ax_facet_grid()]
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#' @rdname apexcharter-shiny-facets
|
||||
|
@ -513,8 +463,8 @@ complete_mapdata <- function(mapdata, mapall) {
|
|||
data <- as.data.frame(mapdata)
|
||||
full_x <- unique(mapall$x)
|
||||
full_data <- data.frame(
|
||||
xorder = seq_along(full_x),
|
||||
x = full_x,
|
||||
xorder = seq_along(full_x),
|
||||
x = full_x,
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
full_data <- merge(
|
||||
|
@ -546,4 +496,3 @@ complete_data <- function(data, vars, fill_var, fill_value = 0) {
|
|||
return(full_data)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -10,25 +10,25 @@
|
|||
#'
|
||||
#' @return a \code{JS} function
|
||||
#' @export
|
||||
#'
|
||||
#'
|
||||
#' @importFrom htmlwidgets JS
|
||||
#'
|
||||
#' @example examples/format.R
|
||||
format_num <- function(format, prefix = "", suffix = "", locale = "en-US") {
|
||||
check_locale_d3(locale)
|
||||
path <- system.file(file.path("htmlwidgets/assets/d3-format/locale", paste0(locale, ".json")), package = "apexcharter")
|
||||
path <- system.file(file.path("d3-format-locale", paste0(locale, ".json")), package = "apexcharter")
|
||||
if (path != "") {
|
||||
locale <- paste(readLines(con = path, encoding = "UTF-8"), collapse = "")
|
||||
}
|
||||
JS(sprintf(
|
||||
"function(value) {var locale = d3.formatLocale(JSON.parse('%s')); return '%s' + locale.format('%s')(value) + '%s';}",
|
||||
"function(value) {var locale = formatLocale(JSON.parse('%s')); return '%s' + locale.format('%s')(value) + '%s';}",
|
||||
locale, prefix, format, suffix
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
check_locale_d3 <- function(x) {
|
||||
json <- list.files(system.file("htmlwidgets/assets/d3-format/locale", package = "apexcharter"))
|
||||
json <- list.files(system.file("d3-format-locale", package = "apexcharter"))
|
||||
njson <- gsub("\\.json", "", json)
|
||||
if (!x %in% njson) {
|
||||
stop(paste(
|
||||
|
|
2
R/labs.R
2
R/labs.R
|
@ -1,7 +1,7 @@
|
|||
|
||||
#' Modify axis, legend, and chart labels
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param title Text for the title.
|
||||
#' @param subtitle Text for the subtitle.
|
||||
#' @param x Text for the x-axis label.
|
||||
|
|
|
@ -1,26 +1,25 @@
|
|||
|
||||
#' @title Add a line to a chart
|
||||
#'
|
||||
#'
|
||||
#' @description Add a line to an existing chart (bar, scatter and line types supported).
|
||||
#' On scatter charts you can also add a smooth line.
|
||||
#'
|
||||
#' @param ax An \code{\link{apex}} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param mapping Default list of aesthetic mappings to use for chart.
|
||||
#' @param data A \code{data.frame} to use to add a line, if \code{NULL} (default),
|
||||
#' the \code{data.frame} provided in \code{apex()} will be used.
|
||||
#' @param type Type of line.
|
||||
#' @param serie_name Name for the serie displayed in tooltip and legend.
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @export
|
||||
#'
|
||||
#'
|
||||
#' @name add-line
|
||||
#'
|
||||
#' @example examples/mixed-charts.R
|
||||
add_line <- function(ax,
|
||||
mapping,
|
||||
add_line <- function(ax,
|
||||
mapping,
|
||||
data = NULL,
|
||||
type = c("line", "spline"),
|
||||
type = c("line", "spline"),
|
||||
serie_name = NULL) {
|
||||
type <- match.arg(type)
|
||||
if (!inherits(ax, "apex"))
|
||||
|
@ -31,9 +30,10 @@ add_line <- function(ax,
|
|||
} else {
|
||||
apex_type <- ax$x$mixed_type
|
||||
}
|
||||
if (!isTRUE(apex_type %in% c("line", "bar", "scatter", "candlestick")))
|
||||
if (!isTRUE(apex_type %in% c("line", "bar", "scatter", "candlestick", "rangeArea")))
|
||||
stop("add_line: apex() must be a column, scatter or candlestick chart.", call. = FALSE)
|
||||
ax$x$ax_opts$chart$type <- "line"
|
||||
if (!identical(apex_type, "rangeArea"))
|
||||
ax$x$ax_opts$chart$type <- "line"
|
||||
if (is.null(data))
|
||||
data <- ax$x$data
|
||||
data <- as.data.frame(data)
|
||||
|
@ -42,6 +42,12 @@ add_line <- function(ax,
|
|||
ax$x$ax_opts$series,
|
||||
make_series(mapdata, mapping, type, serie_name, force_datetime_names = c("x", "y"))
|
||||
)
|
||||
ax$x$add_line <- list(
|
||||
data = data,
|
||||
mapping = mapping,
|
||||
type = type,
|
||||
serie_name = serie_name
|
||||
)
|
||||
if (identical(apex_type, "scatter")) {
|
||||
if (is.null(ax$x$ax_opts$markers$size)) {
|
||||
ax$x$ax_opts$markers$size <- c(6, 0)
|
||||
|
@ -78,14 +84,14 @@ add_line <- function(ax,
|
|||
#' @param model Model to use between \code{\link{lm}} or \code{\link{loess}}.
|
||||
#' @param n Number of points used for predictions.
|
||||
#' @param ... Arguments passed to \code{model}.
|
||||
#'
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
#'
|
||||
#' @importFrom stats lm loess predict
|
||||
#' @importFrom rlang !! sym
|
||||
#'
|
||||
#'
|
||||
#' @name add-line
|
||||
add_smooth_line <- function(ax,
|
||||
add_smooth_line <- function(ax,
|
||||
formula = y ~ x,
|
||||
model = c("lm", "loess"),
|
||||
n = 100,
|
||||
|
@ -115,14 +121,14 @@ add_smooth_line <- function(ax,
|
|||
}
|
||||
new_data <- data.frame(x = seq(
|
||||
from = min(mapdata$x, na.rm = TRUE),
|
||||
to = max(mapdata$x, na.rm = TRUE),
|
||||
to = max(mapdata$x, na.rm = TRUE),
|
||||
length.out = n
|
||||
))
|
||||
new_data$smooth <- predict(model_results, new_data)
|
||||
add_line(
|
||||
ax = ax,
|
||||
mapping = aes(x = `!!`(sym("x")), y = `!!`(sym("smooth"))),
|
||||
data = new_data,
|
||||
mapping = aes(x = `!!`(sym("x")), y = `!!`(sym("smooth"))),
|
||||
data = new_data,
|
||||
type = type,
|
||||
serie_name = serie_name
|
||||
)
|
||||
|
|
|
@ -110,6 +110,44 @@ parse_timeline_data <- function(.list) {
|
|||
}
|
||||
|
||||
|
||||
parse_dumbbell_data <- function(.list) {
|
||||
if (is.null(.list$group)) {
|
||||
lapply(
|
||||
X = seq_len(length(.list[[1]])),
|
||||
FUN = function(i) {
|
||||
val <- lapply(.list, `[[`, i)
|
||||
l <- list(
|
||||
x = as.character(val$y),
|
||||
y = list(val$x, val$xend)
|
||||
)
|
||||
if (!is.null(val$fill)) {
|
||||
l$fillColor <- val$fill
|
||||
}
|
||||
l
|
||||
}
|
||||
)
|
||||
} else {
|
||||
grouped <- as.data.frame(.list, stringsAsFactors = FALSE)
|
||||
grouped$group <- NULL
|
||||
grouped <- split(
|
||||
x = grouped,
|
||||
f = .list$group
|
||||
)
|
||||
grouped <- lapply(grouped, as.list)
|
||||
lapply(
|
||||
X = names(grouped),
|
||||
FUN = function(name) {
|
||||
list(
|
||||
name = name,
|
||||
data = parse_dumbbell_data(grouped[[name]])
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
parse_candlestick_data <- function(.list) {
|
||||
list(list(
|
||||
type = "candlestick",
|
||||
|
@ -127,3 +165,30 @@ parse_candlestick_data <- function(.list) {
|
|||
))
|
||||
}
|
||||
|
||||
|
||||
#' @importFrom graphics boxplot
|
||||
parse_boxplot_data <- function(.list, serie_name = NULL) {
|
||||
if (!is.numeric(.list$y) & is.numeric(.list$x)) {
|
||||
.list[c("x", "y")] <- .list[c("y", "x")]
|
||||
}
|
||||
boxed <- boxplot(y ~ x, data = .list, plot = FALSE)
|
||||
list(dropNulls(list(
|
||||
serie_name = serie_name,
|
||||
type = "boxPlot",
|
||||
data = lapply(
|
||||
X = seq_along(boxed$names),
|
||||
FUN = function(i) {
|
||||
list(
|
||||
x = boxed$names[i],
|
||||
y = c(
|
||||
boxed$stats[1, i],
|
||||
boxed$stats[2, i],
|
||||
boxed$stats[3, i],
|
||||
boxed$stats[4, i],
|
||||
boxed$stats[5, i]
|
||||
)
|
||||
)
|
||||
}
|
||||
)
|
||||
)))
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#' with size > 0 and set tooltip's options `intersect = TRUE` and `shared = FALSE`.
|
||||
#' * **scatter:** retrieve XY coordinates.
|
||||
#'
|
||||
#' @param ax An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param inputId The id that will be used server-side for retrieving click.
|
||||
#' @param multiple Allow multiple selection: \code{TRUE} or \code{FALSE} (default).
|
||||
#' @param effect_type Type of effect for selected element, default is to use lightly darken color.
|
||||
|
@ -17,7 +17,6 @@
|
|||
#'
|
||||
#' @note If x-axis is of type datetime, value retrieved is of class \code{POSIXct}.
|
||||
#'
|
||||
#' @return An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @export
|
||||
#'
|
||||
#' @importFrom shiny getDefaultReactiveDomain
|
||||
|
@ -67,13 +66,12 @@ set_input_click <- function(ax, inputId, multiple = FALSE,
|
|||
|
||||
#' Retrieve zoom information in Shiny
|
||||
#'
|
||||
#' @param ax An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param inputId The id that will be used server-side for retrieving zoom.
|
||||
#' @param session The Shiny session.
|
||||
#'
|
||||
#' @note If x-axis is of type datetime, value retrieved is of class \code{POSIXct}.
|
||||
#'
|
||||
#' @return An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @export
|
||||
#'
|
||||
#' @importFrom shiny getDefaultReactiveDomain
|
||||
|
@ -97,7 +95,7 @@ set_input_zoom <- function(ax, inputId,
|
|||
|
||||
#' Retrieve selection information in Shiny
|
||||
#'
|
||||
#' @param ax An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param inputId The id that will be used server-side for retrieving selection.
|
||||
#' @param type Allow selection either on x-axis, y-axis or on both axis.
|
||||
#' @param fill_color Background color of the selection rect which is drawn when user drags on the chart.
|
||||
|
@ -111,7 +109,6 @@ set_input_zoom <- function(ax, inputId,
|
|||
#' @param ymin,ymax Start value of y-axis. Both \code{min} and \code{max} must be provided.
|
||||
#' @param session The Shiny session.
|
||||
#'
|
||||
#' @return An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
|
@ -131,11 +128,19 @@ set_input_zoom <- function(ax, inputId,
|
|||
#' xmin = format_date("1980-01-01"),
|
||||
#' xmax = format_date("1985-01-01")
|
||||
#' )
|
||||
set_input_selection <- function(ax, inputId, type = c("x", "xy", "y"),
|
||||
fill_color = "#24292e", fill_opacity = 0.1,
|
||||
stroke_width = 1, stroke_dasharray = 3,
|
||||
stroke_color = "#24292e", stroke_opacity = 0.4,
|
||||
xmin = NULL, xmax = NULL, ymin = NULL, ymax = NULL,
|
||||
set_input_selection <- function(ax,
|
||||
inputId,
|
||||
type = c("x", "xy", "y"),
|
||||
fill_color = "#24292e",
|
||||
fill_opacity = 0.1,
|
||||
stroke_width = 1,
|
||||
stroke_dasharray = 3,
|
||||
stroke_color = "#24292e",
|
||||
stroke_opacity = 0.4,
|
||||
xmin = NULL,
|
||||
xmax = NULL,
|
||||
ymin = NULL,
|
||||
ymax = NULL,
|
||||
session = shiny::getDefaultReactiveDomain()) {
|
||||
type <- match.arg(type)
|
||||
if (is.null(session))
|
||||
|
@ -171,11 +176,10 @@ set_input_selection <- function(ax, inputId, type = c("x", "xy", "y"),
|
|||
|
||||
#' Retrieve chart's base64 dataURI.
|
||||
#'
|
||||
#' @param ax An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param inputId The id that will be used server-side for retrieving data.
|
||||
#' @param session The Shiny session.
|
||||
#'
|
||||
#' @return An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @export
|
||||
#'
|
||||
#' @example examples/export-2.R
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
|
||||
#' Fix tooltip
|
||||
#' Fixed tooltip
|
||||
#'
|
||||
#' @param ax An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param position Predefined position: \code{"topLeft"}, \code{"topRight"},
|
||||
#' \code{"bottomLeft"} or \code{"bottomRight"}.
|
||||
#' @param offsetX Sets the left offset for the tooltip container in fixed position.
|
||||
#' @param offsetY Sets the top offset for the tooltip container in fixed position.
|
||||
#'
|
||||
#' @return An \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @export
|
||||
#'
|
||||
#' @example examples/set_tooltip_fixed.R
|
||||
|
|
17
R/utils.R
17
R/utils.R
|
@ -5,17 +5,16 @@ null_or_empty <- function(x) {
|
|||
|
||||
|
||||
dropNullsOrEmpty <- function(x) {
|
||||
x[!vapply(x, null_or_empty, FUN.VALUE = logical(1))]
|
||||
clss <- class(x)
|
||||
x <- x[!vapply(x, null_or_empty, FUN.VALUE = logical(1))]
|
||||
class(x) <- clss
|
||||
return(x)
|
||||
}
|
||||
|
||||
dropNulls <- function(x) {
|
||||
x[!vapply(x, is.null, FUN.VALUE = logical(1))]
|
||||
}
|
||||
|
||||
`%||%` <- function(x, y) {
|
||||
if (!is.null(x)) x else y
|
||||
}
|
||||
|
||||
formatNoSci <- function(x) {
|
||||
if (is.null(x)) return(NULL)
|
||||
format(x, scientific = FALSE, digits = 15)
|
||||
|
@ -58,12 +57,10 @@ make_styles <- function(styles) {
|
|||
|
||||
#' Utility function to create ApexChart parameters JSON
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param name Slot's name to edit
|
||||
#' @param ... Arguments for the slot
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @importFrom utils modifyList
|
||||
#'
|
||||
#' @noRd
|
||||
|
@ -84,12 +81,10 @@ make_styles <- function(styles) {
|
|||
|
||||
#' Utility function to create ApexChart parameters JSON
|
||||
#'
|
||||
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||
#' @template ax-default
|
||||
#' @param name Slot's name to edit
|
||||
#' @param l List of arguments for the slot
|
||||
#'
|
||||
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||
#'
|
||||
#' @importFrom utils modifyList
|
||||
#'
|
||||
#' @noRd
|
||||
|
|
48
README.md
48
README.md
|
@ -1,32 +1,28 @@
|
|||
# apexcharter
|
||||
|
||||
> Htmlwidget for [apexcharts.js](https://github.com/apexcharts/apexcharts.js) : A modern JavaScript charting library to build interactive charts and visualizations with simple API. See the [online demo](https://dreamrs.github.io/apexcharter/) for examples.
|
||||
> Htmlwidget for [apexcharts.js](https://github.com/apexcharts/apexcharts.js) : A modern JavaScript charting library to build interactive charts and visualizations with simple API. See the [online documentation](https://dreamrs.github.io/apexcharter/) for examples.
|
||||
|
||||
<!-- badges: start -->
|
||||
[![version](http://www.r-pkg.org/badges/version/apexcharter)](https://CRAN.R-project.org/package=apexcharter)
|
||||
[![cran checks](https://cranchecks.info/badges/worst/apexcharter)](https://cranchecks.info/pkgs/apexcharter)
|
||||
[![R build status](https://github.com/dreamRs/apexcharter/workflows/R-CMD-check/badge.svg)](https://github.com/dreamRs/apexcharter/actions)
|
||||
[![Codecov test coverage](https://codecov.io/gh/dreamRs/apexcharter/branch/master/graph/badge.svg)](https://codecov.io/gh/dreamRs/apexcharter?branch=master)
|
||||
[![CRAN status](https://www.r-pkg.org/badges/version/apexcharter)](https://CRAN.R-project.org/package=apexcharter)
|
||||
[![cran checks](https://badges.cranchecks.info/worst/apexcharter.svg)](https://cran.r-project.org/web/checks/check_results_apexcharter.html)
|
||||
[![Codecov test coverage](https://codecov.io/gh/dreamRs/apexcharter/branch/master/graph/badge.svg)](https://app.codecov.io/gh/dreamRs/apexcharter?branch=master)
|
||||
[![R-CMD-check](https://github.com/dreamRs/apexcharter/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dreamRs/apexcharter/actions/workflows/R-CMD-check.yaml)
|
||||
<!-- badges: end -->
|
||||
|
||||
|
||||
:warning: Use RStudio >= 1.2 to properly display charts
|
||||
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Install from CRAN with:
|
||||
Install from [CRAN](https://CRAN.R-project.org/package=apexcharter) with:
|
||||
|
||||
```r
|
||||
install.packages("apexcharter")
|
||||
```
|
||||
|
||||
Or install the development version from [GitHub](https://github.com/) with:
|
||||
Or install the development version from [GitHub](https://github.com/dreamRs/apexcharter) with:
|
||||
|
||||
``` r
|
||||
# install.packages("devtools")
|
||||
devtools::install_github("dreamRs/apexcharter")
|
||||
```r
|
||||
# install.packages("remotes")
|
||||
remotes::install_github("dreamRs/apexcharter")
|
||||
```
|
||||
|
||||
|
||||
|
@ -141,3 +137,27 @@ apexchart(ax_opts = list(
|
|||
|
||||
![](man/figures/raw-api.png)
|
||||
|
||||
|
||||
|
||||
## Development
|
||||
|
||||
This package use [{packer}](https://github.com/JohnCoene/packer) to manage JavaScript assets, see packer's [documentation](https://packer.john-coene.com/#/) for more.
|
||||
|
||||
Install nodes modules with:
|
||||
|
||||
```r
|
||||
packer::npm_install()
|
||||
```
|
||||
|
||||
Modify `srcjs/widgets/apexcharter.js`, then run:
|
||||
|
||||
```r
|
||||
packer::bundle()
|
||||
```
|
||||
|
||||
Re-install R package and try `apexcharter()` or `apex()` functions.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
16
_pkgdown.yml
16
_pkgdown.yml
|
@ -1,9 +1,17 @@
|
|||
url: https://dreamrs.github.io/apexcharter/
|
||||
|
||||
template:
|
||||
package: dreamRs
|
||||
|
||||
toc:
|
||||
depth: 3
|
||||
bootstrap: 5
|
||||
bootswatch: zephyr
|
||||
bslib:
|
||||
base_font: {google: "Poppins"}
|
||||
primary: "#112446"
|
||||
navbar-dark-color: "#FFFFFF"
|
||||
secondary: "#DFDFDF"
|
||||
navbar-dark-active-color: "#DFDFDF"
|
||||
|
||||
navbar:
|
||||
bg: primary
|
||||
|
||||
authors:
|
||||
Victor Perrier:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Test environments
|
||||
* local OS Widows 10 install, R 4.0.3
|
||||
* ubuntu 16.04, Windows 10, macOS (on GitHub Actions), R 4.0.5
|
||||
* local Ubuntu 22.04 install, R 4.2.2
|
||||
* ubuntu 22.04, Windows 10, macOS (on GitHub Actions), R 4.2.2
|
||||
* win-builder (devel and release)
|
||||
|
||||
## R CMD check results
|
||||
|
|
|
@ -0,0 +1,131 @@
|
|||
# ------------------------------------------------------------------------
|
||||
#
|
||||
# eCO2mix data
|
||||
# https://www.rte-france.com/eco2mix
|
||||
#
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Packages ----------------------------------------------------------------
|
||||
|
||||
library(data.table)
|
||||
library(fasttime)
|
||||
|
||||
|
||||
complete <- function(data, vars, fill = list()) {
|
||||
data <- data[do.call(CJ, c(
|
||||
lapply(
|
||||
X = mget(vars),
|
||||
FUN = function(var) {
|
||||
if (inherits(var, "factor")) {
|
||||
if (anyNA(var)) {
|
||||
factor(c(levels(var), NA_character_), levels = levels(var), ordered = is.ordered(var))
|
||||
} else {
|
||||
factor(levels(var), levels = levels(var), ordered = is.ordered(var))
|
||||
}
|
||||
} else {
|
||||
unique(var)
|
||||
}
|
||||
}
|
||||
),
|
||||
list(sorted = FALSE)
|
||||
)), on = vars]
|
||||
if (length(fill) > 0 && all(nzchar(names(fill)))) {
|
||||
for (fillvar in names(fill)) {
|
||||
data[is.na(get(fillvar)), (fillvar) := fill[[fillvar]]]
|
||||
}
|
||||
}
|
||||
data[]
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Download data -----------------------------------------------------------
|
||||
|
||||
# Source: https://odre.opendatasoft.com/explore/dataset/eco2mix-national-cons-def/
|
||||
# and https://odre.opendatasoft.com/explore/dataset/eco2mix-national-tr
|
||||
|
||||
|
||||
# Read & transform data ---------------------------------------------------
|
||||
|
||||
# eco2mix <- fread(file = "data-raw/inputs/eco2mix-national-cons-def.csv")
|
||||
# eco2mix <- eco2mix[, c(5, 6, 9:17)]
|
||||
# setnames(eco2mix, c("datetime", "consumption", "fuel", "coal", "gas", "nuclear", "wind", "solar", "hydraulic", "pumping", "bioenergies"))
|
||||
|
||||
eco2mix_tr <- fread(file = "data-raw/inputs/eco2mix-national-tr.csv")
|
||||
eco2mix_tr <- eco2mix_tr[, c(5, 6, 9:17)]
|
||||
setnames(eco2mix_tr, c("datetime", "consumption", "fuel", "coal", "gas", "nuclear", "wind", "solar", "hydraulic", "pumping", "bioenergies"))
|
||||
|
||||
eco2mix <- copy(eco2mix_tr)
|
||||
# eco2mix <- rbind(eco2mix, eco2mix_tr)
|
||||
|
||||
eco2mix <- eco2mix[!is.na(consumption)]
|
||||
eco2mix[, consumption := NULL]
|
||||
# eco2mix[, date := as.Date(format(datetime, format = "%Y-%m-%d"))]
|
||||
# eco2mix[, datetime := NULL]
|
||||
# setcolorder(eco2mix, "date")
|
||||
eco2mix <- eco2mix[minute(datetime) != 15]
|
||||
eco2mix <- eco2mix[minute(datetime) != 45]
|
||||
eco2mix <- eco2mix[datetime >= (max(datetime) - 24*60*60*7)]
|
||||
eco2mix <- melt(
|
||||
data = eco2mix,
|
||||
id.vars = 1,
|
||||
variable.name = "source",
|
||||
value.name = "production",
|
||||
na.rm = TRUE,
|
||||
variable.factor = FALSE
|
||||
)
|
||||
eco2mix <- eco2mix[, list(production = round(mean(production))), by = list(datetime, source)]
|
||||
eco2mix[, source := factor(
|
||||
x = source,
|
||||
levels = c("pumping", "wind", "solar", "nuclear", "hydraulic", "gas", "coal", "fuel", "bioenergies"),
|
||||
ordered = TRUE
|
||||
)]
|
||||
eco2mix <- complete(eco2mix, c("datetime", "source"), list(production = 0))
|
||||
setorder(eco2mix, source, datetime)
|
||||
|
||||
eco2mix[]
|
||||
|
||||
|
||||
# Use data ----------------------------------------------------------------
|
||||
|
||||
setDF(eco2mix)
|
||||
usethis::use_data(eco2mix, internal = FALSE, overwrite = TRUE, compress = "xz")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Test example ------------------------------------------------------------
|
||||
|
||||
apex(eco2mix[source == "consumption"], aes(date, production), type = "line")
|
||||
|
||||
# data("eco2mix", package = "apexcharter")
|
||||
apex(eco2mix, aes(datetime, production, fill = source), type = "area") %>%
|
||||
ax_chart(animations = list(enabled = FALSE), stacked = TRUE) %>%
|
||||
ax_stroke(width = 1) %>%
|
||||
ax_fill(opacity = 1, type = "solid") %>%
|
||||
ax_tooltip(x = list(format = "dd MMM, HH:mm")) %>%
|
||||
ax_yaxis(labels = list(formatter = format_num("~", suffix = "MW"))) %>%
|
||||
ax_colors_manual(
|
||||
list(
|
||||
"bioenergies" = "#156956",
|
||||
"fuel" = "#80549f",
|
||||
"coal" = "#a68832",
|
||||
"solar" = "#d66b0d",
|
||||
"gas" = "#f20809",
|
||||
"wind" = "#72cbb7",
|
||||
"hydraulic" = "#2672b0",
|
||||
"nuclear" = "#e4a701",
|
||||
"pumping" = "#0e4269"
|
||||
)
|
||||
) %>%
|
||||
ax_labs(
|
||||
title = "Electricity generation by sector in France",
|
||||
subtitle = "Data from \u00e9CO\u2082mix"
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
|
||||
|
||||
# Package -----------------------------------------------------------------
|
||||
|
||||
library(data.table)
|
||||
library(gapminder)
|
||||
|
||||
|
||||
|
||||
# Data --------------------------------------------------------------------
|
||||
|
||||
life_expec_long <- as.data.table(gapminder::gapminder)
|
||||
life_expec_long <- life_expec_long[year %in% c(1972, 2007), list(country, year, lifeExp)]
|
||||
|
||||
# life_expec <- life_expec[country %in% sample(unique(country), 10)]
|
||||
life_expec_long <- life_expec_long[country %in% c("Botswana", "Ghana", "Iran", "Liberia", "Malaysia", "Mexico",
|
||||
"Nigeria", "Pakistan", "Philippines", "Zambia")]
|
||||
life_expec_long[, country := as.character(country)]
|
||||
life_expec <- dcast(life_expec_long, country ~ year, value.var = "lifeExp")
|
||||
life_expec[, type := fifelse(`1972` > `2007`, "decreased", "increased")]
|
||||
|
||||
|
||||
|
||||
# Use data ----------------------------------------------------------------
|
||||
|
||||
setDF(life_expec)
|
||||
usethis::use_data(life_expec, internal = FALSE, overwrite = TRUE, compress = "xz")
|
||||
|
||||
setDF(life_expec_long)
|
||||
usethis::use_data(life_expec_long, internal = FALSE, overwrite = TRUE, compress = "xz")
|
||||
|
||||
|
||||
|
||||
|
||||
# Test example ------------------------------------------------------------
|
||||
|
||||
|
||||
pkgload::load_all()
|
||||
|
||||
apex(life_expec, aes(country, x = `1972`, xend = `2007`), type = "dumbbell") %>%
|
||||
ax_plotOptions(
|
||||
bar = bar_opts(
|
||||
dumbbellColors = list(list("#3d85c6", "#fb6003"))
|
||||
)
|
||||
) %>%
|
||||
ax_colors("#BABABA") %>%
|
||||
ax_labs(
|
||||
title = "Life expectancy : 1972 vs. 2007",
|
||||
subtitle = "Data from Gapminder dataset",
|
||||
x = "Life expectancy at birth, in years"
|
||||
)
|
||||
|
||||
|
||||
|
||||
apex(life_expec, aes(country, x = `1972`, xend = `2007`, group = type), type = "dumbbell") %>%
|
||||
ax_xaxis(type = "category", categories = unique(life_expec$country)) %>%
|
||||
ax_plotOptions(
|
||||
bar = bar_opts(
|
||||
dumbbellColors = list(list("#3d85c6", "#fb6003"), list("#3d85c6", "#fb6003"))
|
||||
)
|
||||
) %>%
|
||||
ax_colors(c("#3d85c6", "#fb6003")) %>%
|
||||
ax_labs(
|
||||
title = "Life expectancy : 1972 vs. 2007",
|
||||
subtitle = "Data from Gapminder dataset",
|
||||
x = "Life expectancy at birth, in years"
|
||||
)
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
# ------------------------------------------------------------------------
|
||||
#
|
||||
# temperature data for France
|
||||
# https://data.enedis.fr/explore/dataset/donnees-de-temperature-et-de-pseudo-rayonnement
|
||||
#
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Packages ----------------------------------------------------------------
|
||||
|
||||
library(data.table)
|
||||
library(fasttime)
|
||||
|
||||
|
||||
# Data --------------------------------------------------------------------
|
||||
|
||||
temperatures <- fread(file = "data-raw/inputs/donnees-de-temperature-et-de-pseudo-rayonnement.csv")
|
||||
temperatures <- temperatures[, c(6, 7, 8, 2)]
|
||||
setnames(temperatures, c("year", "month", "day", "temperature"))
|
||||
temperatures <- temperatures[year > 2017]
|
||||
temperatures <- temperatures[, list(temperature = round(mean(temperature, na.rm = TRUE), 1)), by = c("year", "month", "day")]
|
||||
temperatures <- dcast(data = temperatures, formula = month + day ~ year, value.var = "temperature")
|
||||
temperatures <- temperatures[!(month == 2 & day == 29)]
|
||||
|
||||
temperatures[, low := do.call(pmin, c(as.list(.SD), na.rm = TRUE)), .SDcols = as.character(2018:2021)]
|
||||
temperatures[, high := do.call(pmax, c(as.list(.SD), na.rm = TRUE)), .SDcols = as.character(2018:2021)]
|
||||
temperatures[, average := rowMeans(.SD, na.rm = TRUE), .SDcols = as.character(2018:2021)]
|
||||
temperatures[, (as.character(2018:2021)) := NULL]
|
||||
# setnames(temperatures, "2022", "temperature")
|
||||
|
||||
temperatures[, date := as.Date("2022-01-01") + (seq_len(.N) - 1)]
|
||||
temperatures[, (c("month", "day")) := NULL]
|
||||
setcolorder(temperatures, "date")
|
||||
|
||||
temperatures[]
|
||||
|
||||
|
||||
# Save --------------------------------------------------------------------
|
||||
|
||||
setDF(temperatures)
|
||||
usethis::use_data(temperatures, internal = FALSE, overwrite = TRUE, compress = "xz")
|
||||
|
||||
|
||||
|
||||
# Test example ------------------------------------------------------------
|
||||
|
||||
|
||||
pkgload::load_all()
|
||||
|
||||
apex(temperatures, aes(x = date, ymin = low, ymax = high), type = "rangeArea", serie_name = "Low/High (2018-2021)") %>%
|
||||
add_line(aes(date, `2023`)) %>%
|
||||
ax_chart(animations = list(enabled = FALSE)) %>%
|
||||
ax_yaxis(tickAmount = 7, labels = list(formatter = format_num("~", suffix = "°C"))) %>%
|
||||
ax_colors(c("#8485854D", "#FF0000")) %>%
|
||||
ax_stroke(width = c(1, 2)) %>%
|
||||
ax_fill(opacity = 1, type = "solid") %>%
|
||||
ax_labs(
|
||||
title = "Temperatures in 2023 with range from 2018 to 2021",
|
||||
subtitle = "Data from ENEDIS"
|
||||
)
|
||||
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,120 +0,0 @@
|
|||
|
||||
|
||||
|
||||
# Parsing options ---------------------------------------------------------
|
||||
|
||||
cx <- V8::v8()
|
||||
cx$source(file = "inst/htmlwidgets/lib/apexcharts-1.0.4/Options.js")
|
||||
ApexOpts <- cx$get("Options")
|
||||
|
||||
names(ApexOpts)
|
||||
str(ApexOpts$chart, max.level = 1)
|
||||
str(ApexOpts$chart$animations, max.level = 1)
|
||||
|
||||
|
||||
|
||||
# Utils -------------------------------------------------------------------
|
||||
|
||||
make_fun <- function(opts, name, file = "") {
|
||||
args <- names(opts[[name]])
|
||||
if (is.null(args)) {
|
||||
args <- "..."
|
||||
} else {
|
||||
args <- sprintf("%s = NULL", args)
|
||||
args <- paste(args, collapse = ",\n")
|
||||
args <- paste0(args, ", ...")
|
||||
}
|
||||
body <- paste(
|
||||
"\nparams <- c(as.list(environment()), list(...))[-1]",
|
||||
paste0(".ax_opt2(ax, \"", name, "\", l = dropNulls(params))\n"),
|
||||
sep = "\n"
|
||||
)
|
||||
res <- paste0("ax_", name, " <- function(ax, ", args, ") {", body, "}\n\n\n")
|
||||
cat(res, file = file, append = TRUE)
|
||||
return(invisible(res))
|
||||
}
|
||||
|
||||
make_opts <- function(opts, name, file = "") {
|
||||
args <- names(opts[[name]])
|
||||
if (is.null(args)) {
|
||||
args <- "..."
|
||||
body <- "list(...)"
|
||||
} else {
|
||||
body <- sprintf("%s = %s", args, args)
|
||||
body <- paste(body, collapse = ",\n")
|
||||
body <- paste0("c(list(", body, "), list(...))")
|
||||
args <- sprintf("%s = NULL", args)
|
||||
args <- paste(args, collapse = ",\n")
|
||||
args <- paste0(args, ", ...")
|
||||
}
|
||||
body <- paste0("dropNulls(", body, ")")
|
||||
res <- paste0(name, "Opts", " <- function(", args, ") {", body, "}\n\n\n")
|
||||
cat(res, file = file, append = TRUE)
|
||||
return(invisible(res))
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# chart -------------------------------------------------------------------
|
||||
|
||||
make_fun(ApexOpts, "chart")
|
||||
|
||||
|
||||
|
||||
# plotOptions -------------------------------------------------------------
|
||||
|
||||
make_fun(ApexOpts, "plotOptions")
|
||||
|
||||
|
||||
|
||||
|
||||
# ALL ---------------------------------------------------------------------
|
||||
|
||||
lapply(
|
||||
X = names(ApexOpts),
|
||||
FUN = make_fun, opts = ApexOpts, file = "R/apex-utils.R"
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Options -----------------------------------------------------------------
|
||||
|
||||
# scroller
|
||||
str(ApexOpts$chart$scroller)
|
||||
|
||||
make_opts(ApexOpts$chart, "scroller")
|
||||
|
||||
# plotOptions -- bar
|
||||
make_opts(ApexOpts$plotOptions, "bar")
|
||||
|
||||
|
||||
|
||||
|
||||
### write funs
|
||||
|
||||
# chart
|
||||
str(ApexOpts$chart, max.level = 1)
|
||||
make_opts(ApexOpts$chart, "scroller", file = "R/apex-options.R")
|
||||
make_opts(ApexOpts$chart, "events", file = "R/apex-options.R")
|
||||
make_opts(ApexOpts$chart, "selection", file = "R/apex-options.R")
|
||||
|
||||
|
||||
# plotOptions
|
||||
str(ApexOpts$plotOptions, max.level = 1)
|
||||
make_opts(ApexOpts$plotOptions, "bar", file = "R/apex-options.R")
|
||||
make_opts(ApexOpts$plotOptions, "heatmap", file = "R/apex-options.R")
|
||||
make_opts(ApexOpts$plotOptions, "radialBar", file = "R/apex-options.R")
|
||||
make_opts(ApexOpts$plotOptions, "pie", file = "R/apex-options.R")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
|
||||
|
||||
# apexcharts.js raw api ---------------------------------------------------
|
||||
|
||||
|
||||
library(apexcharter)
|
||||
library(ggplot2) # for data
|
||||
library(dplyr)
|
||||
|
||||
|
||||
# bar ----
|
||||
|
||||
data(mpg)
|
||||
dat <- count(mpg, manufacturer)
|
||||
|
||||
apexchart(ax_opts = list(
|
||||
chart = list(type = "bar"),
|
||||
plotOptions = list(
|
||||
bar = list(
|
||||
horizontal = FALSE,
|
||||
endingShape = "flat",
|
||||
columnWidth = "70%",
|
||||
dataLabels = list(
|
||||
position = "top"
|
||||
)
|
||||
)
|
||||
),
|
||||
colors = list("#112446"),
|
||||
grid = list(
|
||||
show = TRUE,
|
||||
position = "front"
|
||||
),
|
||||
series = list(list(
|
||||
name = "Count",
|
||||
data = dat$n
|
||||
)),
|
||||
xaxis = list(categories = dat$manufacturer)
|
||||
))
|
||||
|
||||
|
||||
|
||||
# line ----
|
||||
|
||||
# recreating (mostly): https://apexcharts.com/javascript-chart-demos/line-charts/data-labels/
|
||||
|
||||
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\';}")
|
||||
)
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
262
docs/404.html
262
docs/404.html
|
@ -1,262 +0,0 @@
|
|||
<!-- Generated by pkgdown: do not edit by hand -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Page not found (404) • apexcharter</title>
|
||||
|
||||
|
||||
<!-- jquery -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="css/theme.css" rel="stylesheet">
|
||||
<style>
|
||||
#pkgdown-sidebar {
|
||||
z-index: 100;
|
||||
background: #FFF;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
<!-- Font -->
|
||||
<link href="css/montserrat.css" rel="stylesheet">
|
||||
<style>body {font-family: 'Montserrat', sans-serif;}</style>
|
||||
|
||||
|
||||
<!-- bootstrap-toc -->
|
||||
<link rel="stylesheet" href="bootstrap-toc.css">
|
||||
<script src="bootstrap-toc.js"></script>
|
||||
|
||||
<!-- Font Awesome icons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
|
||||
|
||||
<!-- clipboard.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- headroom.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- pkgdown -->
|
||||
<link href="pkgdown.css" rel="stylesheet">
|
||||
<script src="pkgdown.js"></script>
|
||||
|
||||
|
||||
<!-- Particles -->
|
||||
<script src="js/particles.min.js"></script>
|
||||
|
||||
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.contents {
|
||||
opacity: 1;
|
||||
background-color: #FFF;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
opacity: 1;
|
||||
background-color: #FFF;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
footer {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#particles {
|
||||
position: fixed;
|
||||
display: block;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.background {
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<!-- Font Awesome icons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
|
||||
|
||||
<!-- clipboard.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- headroom.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- pkgdown -->
|
||||
<link href="pkgdown.css" rel="stylesheet">
|
||||
<script src="pkgdown.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="Page not found (404)" />
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- mathjax -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body id="body">
|
||||
<div class="container template-title-body">
|
||||
<header>
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand hidden-xs hidden-sm" style="padding: 10px 15px !important;">
|
||||
<img src="https://github.com/dreamRs.png" class="hidden-xs hidden-sm" style="height: 50px;display: inline;vertical-align: middle;">
|
||||
<a class="navbar-link" href="index.html">apexcharter</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
|
||||
</span>
|
||||
<span class="navbar-brand hidden-md hidden-lg">
|
||||
<a class="navbar-link" href="index.html">apexcharter</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="index.html">
|
||||
<span class="fas fa-home fa-lg"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/apexcharter.html">Get started</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="reference/index.html">Reference</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
Articles
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="articles/articles/advanced-configuration.html">Advanced configuration examples</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/chart-options.html">Chart options</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/facets.html">Facets: grid of charts</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/shiny-integration.html">Shiny integration</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/spark-box.html">Spark boxes</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/sync-charts.html">Syncing charts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="news/index.html">Changelog</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://github.com/dreamRs/apexcharter/">
|
||||
<span class="fab fa-github fa-lg"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div><!--/.nav-collapse -->
|
||||
</div><!--/.container -->
|
||||
</div><!--/.navbar -->
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="contents col-md-9">
|
||||
<div class="page-header">
|
||||
<h1>Page not found (404)</h1>
|
||||
</div>
|
||||
|
||||
Content not found. Please use links in the navbar.
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="copyright">
|
||||
<p>Developed by <a href='https://twitter.com/_pvictorr'><img src="https://pbs.twimg.com/profile_images/844237339404722177/E1U61aM8_normal.jpg"/> Victor Perrier</a>, <a href='https://twitter.com/_mfaan'><img src="https://pbs.twimg.com/profile_images/912313931326218240/o1-wvA18_normal.jpg" /> Fanny Meyer</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="particles"></div>
|
||||
|
||||
<script>
|
||||
window.onload = function() {
|
||||
var config = {"particles":{"number":{"value":90,"density":{"enable":true,"value_area":1200}},"color":{"value":"#112446"},"shape":{"type":"circle","stroke":{"width":0,"color":"#000000"},"polygon":{"nb_sides":5},"image":{"src":"img/github.svg","width":100,"height":100}},"opacity":{"value":0.8,"random":false,"anim":{"enable":false,"speed":1,"opacity_min":0.1,"sync":false}},"size":{"value":3,"random":true,"anim":{"enable":false,"speed":40,"size_min":0.1,"sync":false}},"line_linked":{"enable":true,"distance":150,"color":"#112446","opacity":0.6,"width":1},"move":{"enable":true,"speed":5,"direction":"none","random":false,"straight":false,"out_mode":"out","bounce":false,"attract":{"enable":false,"rotateX":600,"rotateY":1200}}},"interactivity":{"detect_on":"canvas","events":{"onhover":{"enable":true,"mode":"repulse"},"onclick":{"enable":true,"mode":"push"},"resize":true}},"modes":{"grab":{"distance":400,"line_linked":{"opacity":1}},"bubble":{"distance":400,"size":40,"duration":2,"opacity":8,"speed":3},"repulse":{"distance":200,"duration":0.4},"push":{"particles_nb":4},"remove":{"particles_nb":2}},"retina_detect":true} ;
|
||||
particlesJS("particles", config);
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -1,264 +0,0 @@
|
|||
<!-- Generated by pkgdown: do not edit by hand -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>License • apexcharter</title>
|
||||
|
||||
|
||||
<!-- jquery -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="css/theme.css" rel="stylesheet">
|
||||
<style>
|
||||
#pkgdown-sidebar {
|
||||
z-index: 100;
|
||||
background: #FFF;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
<!-- Font -->
|
||||
<link href="css/montserrat.css" rel="stylesheet">
|
||||
<style>body {font-family: 'Montserrat', sans-serif;}</style>
|
||||
|
||||
|
||||
<!-- bootstrap-toc -->
|
||||
<link rel="stylesheet" href="bootstrap-toc.css">
|
||||
<script src="bootstrap-toc.js"></script>
|
||||
|
||||
<!-- Font Awesome icons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
|
||||
|
||||
<!-- clipboard.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- headroom.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- pkgdown -->
|
||||
<link href="pkgdown.css" rel="stylesheet">
|
||||
<script src="pkgdown.js"></script>
|
||||
|
||||
|
||||
<!-- Particles -->
|
||||
<script src="js/particles.min.js"></script>
|
||||
|
||||
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.contents {
|
||||
opacity: 1;
|
||||
background-color: #FFF;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
opacity: 1;
|
||||
background-color: #FFF;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
footer {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#particles {
|
||||
position: fixed;
|
||||
display: block;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.background {
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<!-- Font Awesome icons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
|
||||
|
||||
<!-- clipboard.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- headroom.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- pkgdown -->
|
||||
<link href="pkgdown.css" rel="stylesheet">
|
||||
<script src="pkgdown.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="License" />
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- mathjax -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body id="body">
|
||||
<div class="container template-title-body">
|
||||
<header>
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand hidden-xs hidden-sm" style="padding: 10px 15px !important;">
|
||||
<img src="https://github.com/dreamRs.png" class="hidden-xs hidden-sm" style="height: 50px;display: inline;vertical-align: middle;">
|
||||
<a class="navbar-link" href="index.html">apexcharter</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
|
||||
</span>
|
||||
<span class="navbar-brand hidden-md hidden-lg">
|
||||
<a class="navbar-link" href="index.html">apexcharter</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="index.html">
|
||||
<span class="fas fa-home fa-lg"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/apexcharter.html">Get started</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="reference/index.html">Reference</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
Articles
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="articles/articles/advanced-configuration.html">Advanced configuration examples</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/chart-options.html">Chart options</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/facets.html">Facets: grid of charts</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/shiny-integration.html">Shiny integration</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/spark-box.html">Spark boxes</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/sync-charts.html">Syncing charts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="news/index.html">Changelog</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://github.com/dreamRs/apexcharter/">
|
||||
<span class="fab fa-github fa-lg"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div><!--/.nav-collapse -->
|
||||
</div><!--/.container -->
|
||||
</div><!--/.navbar -->
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="contents col-md-9">
|
||||
<div class="page-header">
|
||||
<h1>License</h1>
|
||||
</div>
|
||||
|
||||
<pre>YEAR: 2020
|
||||
COPYRIGHT HOLDER: Victor Perrier
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="copyright">
|
||||
<p>Developed by <a href='https://twitter.com/_pvictorr'><img src="https://pbs.twimg.com/profile_images/844237339404722177/E1U61aM8_normal.jpg"/> Victor Perrier</a>, <a href='https://twitter.com/_mfaan'><img src="https://pbs.twimg.com/profile_images/912313931326218240/o1-wvA18_normal.jpg" /> Fanny Meyer</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="particles"></div>
|
||||
|
||||
<script>
|
||||
window.onload = function() {
|
||||
var config = {"particles":{"number":{"value":90,"density":{"enable":true,"value_area":1200}},"color":{"value":"#112446"},"shape":{"type":"circle","stroke":{"width":0,"color":"#000000"},"polygon":{"nb_sides":5},"image":{"src":"img/github.svg","width":100,"height":100}},"opacity":{"value":0.8,"random":false,"anim":{"enable":false,"speed":1,"opacity_min":0.1,"sync":false}},"size":{"value":3,"random":true,"anim":{"enable":false,"speed":40,"size_min":0.1,"sync":false}},"line_linked":{"enable":true,"distance":150,"color":"#112446","opacity":0.6,"width":1},"move":{"enable":true,"speed":5,"direction":"none","random":false,"straight":false,"out_mode":"out","bounce":false,"attract":{"enable":false,"rotateX":600,"rotateY":1200}}},"interactivity":{"detect_on":"canvas","events":{"onhover":{"enable":true,"mode":"repulse"},"onclick":{"enable":true,"mode":"push"},"resize":true}},"modes":{"grab":{"distance":400,"line_linked":{"opacity":1}},"bubble":{"distance":400,"size":40,"duration":2,"opacity":8,"speed":3},"repulse":{"distance":200,"duration":0.4},"push":{"particles_nb":4},"remove":{"particles_nb":2}},"retina_detect":true} ;
|
||||
particlesJS("particles", config);
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -1,268 +0,0 @@
|
|||
<!-- Generated by pkgdown: do not edit by hand -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>MIT License • apexcharter</title>
|
||||
|
||||
|
||||
<!-- jquery -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="css/theme.css" rel="stylesheet">
|
||||
<style>
|
||||
#pkgdown-sidebar {
|
||||
z-index: 100;
|
||||
background: #FFF;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
<!-- Font -->
|
||||
<link href="css/montserrat.css" rel="stylesheet">
|
||||
<style>body {font-family: 'Montserrat', sans-serif;}</style>
|
||||
|
||||
|
||||
<!-- bootstrap-toc -->
|
||||
<link rel="stylesheet" href="bootstrap-toc.css">
|
||||
<script src="bootstrap-toc.js"></script>
|
||||
|
||||
<!-- Font Awesome icons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
|
||||
|
||||
<!-- clipboard.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- headroom.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- pkgdown -->
|
||||
<link href="pkgdown.css" rel="stylesheet">
|
||||
<script src="pkgdown.js"></script>
|
||||
|
||||
|
||||
<!-- Particles -->
|
||||
<script src="js/particles.min.js"></script>
|
||||
|
||||
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.contents {
|
||||
opacity: 1;
|
||||
background-color: #FFF;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
opacity: 1;
|
||||
background-color: #FFF;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
footer {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#particles {
|
||||
position: fixed;
|
||||
display: block;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.background {
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<!-- Font Awesome icons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
|
||||
|
||||
<!-- clipboard.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- headroom.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- pkgdown -->
|
||||
<link href="pkgdown.css" rel="stylesheet">
|
||||
<script src="pkgdown.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<meta property="og:title" content="MIT License" />
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- mathjax -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body id="body">
|
||||
<div class="container template-title-body">
|
||||
<header>
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand hidden-xs hidden-sm" style="padding: 10px 15px !important;">
|
||||
<img src="https://github.com/dreamRs.png" class="hidden-xs hidden-sm" style="height: 50px;display: inline;vertical-align: middle;">
|
||||
<a class="navbar-link" href="index.html">apexcharter</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
|
||||
</span>
|
||||
<span class="navbar-brand hidden-md hidden-lg">
|
||||
<a class="navbar-link" href="index.html">apexcharter</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="index.html">
|
||||
<span class="fas fa-home fa-lg"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/apexcharter.html">Get started</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="reference/index.html">Reference</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
Articles
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="articles/articles/advanced-configuration.html">Advanced configuration examples</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/chart-options.html">Chart options</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/facets.html">Facets: grid of charts</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/shiny-integration.html">Shiny integration</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/spark-box.html">Spark boxes</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/sync-charts.html">Syncing charts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="news/index.html">Changelog</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://github.com/dreamRs/apexcharter/">
|
||||
<span class="fab fa-github fa-lg"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div><!--/.nav-collapse -->
|
||||
</div><!--/.container -->
|
||||
</div><!--/.navbar -->
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="contents col-md-9">
|
||||
<div class="page-header">
|
||||
<h1>MIT License</h1>
|
||||
</div>
|
||||
|
||||
<div id="mit-license" class="section level1">
|
||||
|
||||
<p>Copyright (c) 2020 Victor Perrier</p>
|
||||
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
|
||||
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
|
||||
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="copyright">
|
||||
<p>Developed by <a href='https://twitter.com/_pvictorr'><img src="https://pbs.twimg.com/profile_images/844237339404722177/E1U61aM8_normal.jpg"/> Victor Perrier</a>, <a href='https://twitter.com/_mfaan'><img src="https://pbs.twimg.com/profile_images/912313931326218240/o1-wvA18_normal.jpg" /> Fanny Meyer</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="particles"></div>
|
||||
|
||||
<script>
|
||||
window.onload = function() {
|
||||
var config = {"particles":{"number":{"value":90,"density":{"enable":true,"value_area":1200}},"color":{"value":"#112446"},"shape":{"type":"circle","stroke":{"width":0,"color":"#000000"},"polygon":{"nb_sides":5},"image":{"src":"img/github.svg","width":100,"height":100}},"opacity":{"value":0.8,"random":false,"anim":{"enable":false,"speed":1,"opacity_min":0.1,"sync":false}},"size":{"value":3,"random":true,"anim":{"enable":false,"speed":40,"size_min":0.1,"sync":false}},"line_linked":{"enable":true,"distance":150,"color":"#112446","opacity":0.6,"width":1},"move":{"enable":true,"speed":5,"direction":"none","random":false,"straight":false,"out_mode":"out","bounce":false,"attract":{"enable":false,"rotateX":600,"rotateY":1200}}},"interactivity":{"detect_on":"canvas","events":{"onhover":{"enable":true,"mode":"repulse"},"onclick":{"enable":true,"mode":"push"},"resize":true}},"modes":{"grab":{"distance":400,"line_linked":{"opacity":1}},"bubble":{"distance":400,"size":40,"duration":2,"opacity":8,"speed":3},"repulse":{"distance":200,"duration":0.4},"push":{"particles_nb":4},"remove":{"particles_nb":2}},"retina_detect":true} ;
|
||||
particlesJS("particles", config);
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -1,15 +0,0 @@
|
|||
// Hide empty <a> tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) -->
|
||||
// v0.0.1
|
||||
// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020.
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const codeList = document.getElementsByClassName("sourceCode");
|
||||
for (var i = 0; i < codeList.length; i++) {
|
||||
var linkList = codeList[i].getElementsByTagName('a');
|
||||
for (var j = 0; j < linkList.length; j++) {
|
||||
if (linkList[j].innerHTML === "") {
|
||||
linkList[j].setAttribute('aria-hidden', 'true');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
|
@ -1,356 +0,0 @@
|
|||
/*!
|
||||
*
|
||||
* htmlwidgets bindings for ApexCharts
|
||||
* https://github.com/dreamRs/apexcharter
|
||||
*
|
||||
*/
|
||||
|
||||
/*global HTMLWidgets, ApexCharts, Shiny */
|
||||
|
||||
/// Functions
|
||||
|
||||
// From Friss tuto (https://github.com/FrissAnalytics/shinyJsTutorials/blob/master/tutorials/tutorial_03.Rmd)
|
||||
var apexcharter = {
|
||||
getWidget: function(id) {
|
||||
var htmlWidgetsObj = HTMLWidgets.find("#" + id);
|
||||
var widgetObj;
|
||||
if (typeof htmlWidgetsObj !== "undefined") {
|
||||
widgetObj = htmlWidgetsObj.getChart();
|
||||
}
|
||||
return widgetObj;
|
||||
},
|
||||
|
||||
isSingleSerie: function(options) {
|
||||
var typeLabels = ["pie", "radialBar", "donut"];
|
||||
var lab = typeLabels.indexOf(options.w.config.chart.type) > -1;
|
||||
var single = options.w.config.series.length === 1;
|
||||
return lab | single;
|
||||
},
|
||||
|
||||
isDatetimeAxis: function(chartContext) {
|
||||
if (
|
||||
chartContext.hasOwnProperty("w") &&
|
||||
chartContext.w.hasOwnProperty("config") &&
|
||||
chartContext.w.config.hasOwnProperty("xaxis") &&
|
||||
chartContext.w.config.xaxis.hasOwnProperty("type")
|
||||
) {
|
||||
return chartContext.w.config.xaxis.type == "datetime";
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
getSelection: function(chartContext, selectedDataPoints, serieIndex) {
|
||||
var typeLabels = ["pie", "radialBar", "donut"];
|
||||
var typeXY = ["scatter", "bubble"];
|
||||
var selected;
|
||||
if (typeLabels.indexOf(chartContext.opts.chart.type) > -1) {
|
||||
var labels = chartContext.opts.labels;
|
||||
selected = selectedDataPoints[serieIndex].map(function(index) {
|
||||
return labels[index];
|
||||
});
|
||||
} else {
|
||||
var data = chartContext.opts.series[serieIndex].data;
|
||||
selected = selectedDataPoints[serieIndex].map(function(index) {
|
||||
var val = data[index];
|
||||
if (typeXY.indexOf(chartContext.opts.chart.type) < 0) {
|
||||
if (val.hasOwnProperty("x")) {
|
||||
val = val.x;
|
||||
} else {
|
||||
val = val[0];
|
||||
}
|
||||
}
|
||||
return val;
|
||||
});
|
||||
}
|
||||
//console.log(selected);
|
||||
if (typeXY.indexOf(chartContext.opts.chart.type) > -1) {
|
||||
selected = {
|
||||
x: selected.map(function(obj) {
|
||||
return obj.x;
|
||||
}),
|
||||
y: selected.map(function(obj) {
|
||||
return obj.y;
|
||||
})
|
||||
};
|
||||
}
|
||||
if (typeof selected == "undefined") {
|
||||
selected = null;
|
||||
}
|
||||
return selected;
|
||||
},
|
||||
|
||||
getYaxis: function(axis) {
|
||||
var yzoom = { min: null, max: null };
|
||||
if (typeof axis.yaxis !== "undefined" && axis.yaxis !== null) {
|
||||
var y_axis;
|
||||
if (axis.yaxis.hasOwnProperty("min")) {
|
||||
y_axis = axis.yaxis;
|
||||
} else {
|
||||
y_axis = axis.yaxis[0];
|
||||
}
|
||||
if (y_axis.hasOwnProperty("min") && typeof y_axis.min !== "undefined") {
|
||||
yzoom.min = y_axis.min;
|
||||
}
|
||||
if (y_axis.hasOwnProperty("max") && typeof y_axis.max !== "undefined") {
|
||||
yzoom.max = y_axis.max;
|
||||
}
|
||||
}
|
||||
return yzoom;
|
||||
},
|
||||
|
||||
getXaxis: function(axis) {
|
||||
var xzoom = { min: null, max: null };
|
||||
if (typeof axis.xaxis !== "undefined") {
|
||||
var x_axis = axis.xaxis;
|
||||
if (x_axis.hasOwnProperty("min") && typeof x_axis.min !== "undefined") {
|
||||
xzoom.min = x_axis.min;
|
||||
}
|
||||
if (x_axis.hasOwnProperty("max") && typeof x_axis.max !== "undefined") {
|
||||
xzoom.max = x_axis.max;
|
||||
}
|
||||
}
|
||||
return xzoom;
|
||||
},
|
||||
|
||||
exportChart: function(x, chart) {
|
||||
if (x.hasOwnProperty("shinyEvents") & HTMLWidgets.shinyMode) {
|
||||
if (x.shinyEvents.hasOwnProperty("export")) {
|
||||
setTimeout(function() {
|
||||
chart.dataURI().then(function(imgURI) {
|
||||
Shiny.setInputValue(x.shinyEvents.export.inputId, imgURI);
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/// Widget
|
||||
|
||||
HTMLWidgets.widget({
|
||||
name: "apexcharter",
|
||||
|
||||
type: "output",
|
||||
|
||||
factory: function(el, width, height) {
|
||||
var axOpts;
|
||||
var apexchart = null;
|
||||
|
||||
return {
|
||||
renderValue: function(x) {
|
||||
// Global options
|
||||
axOpts = x.ax_opts;
|
||||
|
||||
if (x.sparkbox) {
|
||||
el.style.background = x.sparkbox.background;
|
||||
el.classList.add("apexcharter-spark-box");
|
||||
}
|
||||
|
||||
// Sizing
|
||||
if (typeof axOpts.chart === "undefined") {
|
||||
axOpts.chart = {};
|
||||
}
|
||||
axOpts.chart.width = el.clientWidth;
|
||||
axOpts.chart.height = el.clientHeight;
|
||||
if (!axOpts.chart.hasOwnProperty("id")) {
|
||||
axOpts.chart.id = el.id;
|
||||
}
|
||||
if (!axOpts.chart.hasOwnProperty("parentHeightOffset")) {
|
||||
axOpts.chart.parentHeightOffset = 0;
|
||||
}
|
||||
|
||||
// added events to remove minheight container
|
||||
if (!axOpts.chart.hasOwnProperty("events")) {
|
||||
axOpts.chart.events = {};
|
||||
}
|
||||
if (!axOpts.chart.events.hasOwnProperty("mounted")) {
|
||||
axOpts.chart.events.mounted = function(chartContext, config) {
|
||||
el.style.minHeight = 0;
|
||||
};
|
||||
}
|
||||
if (!axOpts.chart.events.hasOwnProperty("updated")) {
|
||||
axOpts.chart.events.updated = function(chartContext, config) {
|
||||
el.style.minHeight = 0;
|
||||
};
|
||||
}
|
||||
|
||||
if (x.hasOwnProperty("shinyEvents") & HTMLWidgets.shinyMode) {
|
||||
if (!axOpts.hasOwnProperty("chart")) {
|
||||
axOpts.chart = {};
|
||||
}
|
||||
if (!axOpts.chart.hasOwnProperty("events")) {
|
||||
axOpts.chart.events = {};
|
||||
}
|
||||
if (x.shinyEvents.hasOwnProperty("click")) {
|
||||
axOpts.chart.events.dataPointSelection = function(
|
||||
event,
|
||||
chartContext,
|
||||
opts
|
||||
) {
|
||||
var options = opts;
|
||||
var nonEmpty = opts.selectedDataPoints.filter(function(el) {
|
||||
return el !== null && el.length > 0;
|
||||
});
|
||||
if (nonEmpty.length > 0) {
|
||||
var select = {};
|
||||
for (var i = 0; i < opts.selectedDataPoints.length; i++) {
|
||||
if (typeof opts.selectedDataPoints[i] === "undefined") {
|
||||
continue;
|
||||
}
|
||||
var selection = apexcharter.getSelection(
|
||||
chartContext,
|
||||
options.selectedDataPoints,
|
||||
i
|
||||
);
|
||||
if (selection !== null) {
|
||||
if (opts.w.config.series[i].hasOwnProperty("name")) {
|
||||
var name = opts.w.config.series[i].name;
|
||||
select[name] = selection;
|
||||
} else {
|
||||
select[i] = selection;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (apexcharter.isSingleSerie(options)) {
|
||||
select = select[Object.keys(select)[0]];
|
||||
}
|
||||
Shiny.setInputValue(
|
||||
x.shinyEvents.click.inputId + ":apex_click",
|
||||
{ value: select, datetime: apexcharter.isDatetimeAxis(chartContext) }
|
||||
);
|
||||
} else {
|
||||
Shiny.setInputValue(x.shinyEvents.click.inputId, null);
|
||||
}
|
||||
};
|
||||
}
|
||||
if (x.shinyEvents.hasOwnProperty("zoomed")) {
|
||||
axOpts.chart.events.zoomed = function(chartContext, xaxis, yaxis) {
|
||||
var id = x.shinyEvents.zoomed.inputId;
|
||||
if (apexcharter.isDatetimeAxis(chartContext)) {
|
||||
id = id + ":apex_datetime";
|
||||
}
|
||||
Shiny.setInputValue(id, {
|
||||
x: apexcharter.getXaxis(xaxis),
|
||||
y: apexcharter.getYaxis(xaxis)
|
||||
});
|
||||
};
|
||||
}
|
||||
if (x.shinyEvents.hasOwnProperty("selection")) {
|
||||
axOpts.chart.events.selection = function(
|
||||
chartContext,
|
||||
xaxis,
|
||||
yaxis
|
||||
) {
|
||||
var id = x.shinyEvents.selection.inputId;
|
||||
if (apexcharter.isDatetimeAxis(chartContext)) {
|
||||
id = id + ":apex_datetime";
|
||||
}
|
||||
var selectionValue;
|
||||
if (x.shinyEvents.selection.type === "x") {
|
||||
selectionValue = { x: xaxis.xaxis };
|
||||
} else if (x.shinyEvents.selection.type === "xy") {
|
||||
selectionValue = { x: xaxis.xaxis, y: apexcharter.getYaxis(xaxis) };
|
||||
} else if (x.shinyEvents.selection.type === "y") {
|
||||
selectionValue = { y: apexcharter.getYaxis(xaxis) };
|
||||
}
|
||||
Shiny.setInputValue(id, selectionValue);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Generate or update chart
|
||||
if (apexchart === null) {
|
||||
apexchart = new ApexCharts(el, axOpts);
|
||||
apexchart.render().then(function() {
|
||||
apexcharter.exportChart(x, apexchart);
|
||||
});
|
||||
} else {
|
||||
if (x.auto_update) {
|
||||
//console.log(x.auto_update);
|
||||
if (x.auto_update.update_options) {
|
||||
var options = Object.assign({}, axOpts);
|
||||
delete options.series;
|
||||
delete options.chart.width;
|
||||
delete options.chart.height;
|
||||
apexchart
|
||||
.updateOptions(
|
||||
options,
|
||||
x.auto_update.options_redrawPaths,
|
||||
x.auto_update.options_animate,
|
||||
x.auto_update.update_synced_charts
|
||||
);
|
||||
}
|
||||
apexchart
|
||||
.updateSeries(axOpts.series, x.auto_update.series_animate)
|
||||
.then(function(chart) {
|
||||
apexcharter.exportChart(x, chart);
|
||||
});
|
||||
} else {
|
||||
apexchart.destroy();
|
||||
apexchart = new ApexCharts(el, axOpts);
|
||||
apexchart.render().then(function() {
|
||||
apexcharter.exportChart(x, apexchart);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getChart: function() {
|
||||
return apexchart;
|
||||
},
|
||||
|
||||
resize: function(width, height) {
|
||||
apexchart.updateOptions({
|
||||
chart: {
|
||||
width: width,
|
||||
height: height
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
if (HTMLWidgets.shinyMode) {
|
||||
// update serie
|
||||
Shiny.addCustomMessageHandler("update-apexchart-series", function(obj) {
|
||||
var chart = apexcharter.getWidget(obj.id);
|
||||
if (typeof chart != "undefined") {
|
||||
chart.updateSeries(
|
||||
[
|
||||
{
|
||||
data: obj.data.newSeries
|
||||
}
|
||||
],
|
||||
obj.data.animate
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// update options
|
||||
Shiny.addCustomMessageHandler("update-apexchart-options", function(obj) {
|
||||
var chart = apexcharter.getWidget(obj.id);
|
||||
if (typeof chart != "undefined") {
|
||||
var options = obj.data.options;
|
||||
var evals = obj.data.evals;
|
||||
if (!(evals instanceof Array)) evals = [evals];
|
||||
for (var k = 0; evals && k < evals.length; k++) {
|
||||
window.HTMLWidgets.evaluateStringMember(options, evals[k]);
|
||||
}
|
||||
chart.updateOptions(options);
|
||||
}
|
||||
});
|
||||
|
||||
// toggle series
|
||||
Shiny.addCustomMessageHandler("update-apexchart-toggle-series", function(obj) {
|
||||
var chart = apexcharter.getWidget(obj.id);
|
||||
if (typeof chart != "undefined") {
|
||||
var seriesName = obj.data.seriesName;
|
||||
for(var i = 0; i < seriesName.length; i++) {
|
||||
chart.toggleSeries(seriesName[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1,356 +0,0 @@
|
|||
/*!
|
||||
*
|
||||
* htmlwidgets bindings for ApexCharts
|
||||
* https://github.com/dreamRs/apexcharter
|
||||
*
|
||||
*/
|
||||
|
||||
/*global HTMLWidgets, ApexCharts, Shiny */
|
||||
|
||||
/// Functions
|
||||
|
||||
// From Friss tuto (https://github.com/FrissAnalytics/shinyJsTutorials/blob/master/tutorials/tutorial_03.Rmd)
|
||||
var apexcharter = {
|
||||
getWidget: function(id) {
|
||||
var htmlWidgetsObj = HTMLWidgets.find("#" + id);
|
||||
var widgetObj;
|
||||
if (typeof htmlWidgetsObj !== "undefined") {
|
||||
widgetObj = htmlWidgetsObj.getChart();
|
||||
}
|
||||
return widgetObj;
|
||||
},
|
||||
|
||||
isSingleSerie: function(options) {
|
||||
var typeLabels = ["pie", "radialBar", "donut"];
|
||||
var lab = typeLabels.indexOf(options.w.config.chart.type) > -1;
|
||||
var single = options.w.config.series.length === 1;
|
||||
return lab | single;
|
||||
},
|
||||
|
||||
isDatetimeAxis: function(chartContext) {
|
||||
if (
|
||||
chartContext.hasOwnProperty("w") &&
|
||||
chartContext.w.hasOwnProperty("config") &&
|
||||
chartContext.w.config.hasOwnProperty("xaxis") &&
|
||||
chartContext.w.config.xaxis.hasOwnProperty("type")
|
||||
) {
|
||||
return chartContext.w.config.xaxis.type == "datetime";
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
getSelection: function(chartContext, selectedDataPoints, serieIndex) {
|
||||
var typeLabels = ["pie", "radialBar", "donut"];
|
||||
var typeXY = ["scatter", "bubble"];
|
||||
var selected;
|
||||
if (typeLabels.indexOf(chartContext.opts.chart.type) > -1) {
|
||||
var labels = chartContext.opts.labels;
|
||||
selected = selectedDataPoints[serieIndex].map(function(index) {
|
||||
return labels[index];
|
||||
});
|
||||
} else {
|
||||
var data = chartContext.opts.series[serieIndex].data;
|
||||
selected = selectedDataPoints[serieIndex].map(function(index) {
|
||||
var val = data[index];
|
||||
if (typeXY.indexOf(chartContext.opts.chart.type) < 0) {
|
||||
if (val.hasOwnProperty("x")) {
|
||||
val = val.x;
|
||||
} else {
|
||||
val = val[0];
|
||||
}
|
||||
}
|
||||
return val;
|
||||
});
|
||||
}
|
||||
//console.log(selected);
|
||||
if (typeXY.indexOf(chartContext.opts.chart.type) > -1) {
|
||||
selected = {
|
||||
x: selected.map(function(obj) {
|
||||
return obj.x;
|
||||
}),
|
||||
y: selected.map(function(obj) {
|
||||
return obj.y;
|
||||
})
|
||||
};
|
||||
}
|
||||
if (typeof selected == "undefined") {
|
||||
selected = null;
|
||||
}
|
||||
return selected;
|
||||
},
|
||||
|
||||
getYaxis: function(axis) {
|
||||
var yzoom = { min: null, max: null };
|
||||
if (typeof axis.yaxis !== "undefined" && axis.yaxis !== null) {
|
||||
var y_axis;
|
||||
if (axis.yaxis.hasOwnProperty("min")) {
|
||||
y_axis = axis.yaxis;
|
||||
} else {
|
||||
y_axis = axis.yaxis[0];
|
||||
}
|
||||
if (y_axis.hasOwnProperty("min") && typeof y_axis.min !== "undefined") {
|
||||
yzoom.min = y_axis.min;
|
||||
}
|
||||
if (y_axis.hasOwnProperty("max") && typeof y_axis.max !== "undefined") {
|
||||
yzoom.max = y_axis.max;
|
||||
}
|
||||
}
|
||||
return yzoom;
|
||||
},
|
||||
|
||||
getXaxis: function(axis) {
|
||||
var xzoom = { min: null, max: null };
|
||||
if (typeof axis.xaxis !== "undefined") {
|
||||
var x_axis = axis.xaxis;
|
||||
if (x_axis.hasOwnProperty("min") && typeof x_axis.min !== "undefined") {
|
||||
xzoom.min = x_axis.min;
|
||||
}
|
||||
if (x_axis.hasOwnProperty("max") && typeof x_axis.max !== "undefined") {
|
||||
xzoom.max = x_axis.max;
|
||||
}
|
||||
}
|
||||
return xzoom;
|
||||
},
|
||||
|
||||
exportChart: function(x, chart) {
|
||||
if (x.hasOwnProperty("shinyEvents") & HTMLWidgets.shinyMode) {
|
||||
if (x.shinyEvents.hasOwnProperty("export")) {
|
||||
setTimeout(function() {
|
||||
chart.dataURI().then(function(imgURI) {
|
||||
Shiny.setInputValue(x.shinyEvents.export.inputId, imgURI);
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/// Widget
|
||||
|
||||
HTMLWidgets.widget({
|
||||
name: "apexcharter",
|
||||
|
||||
type: "output",
|
||||
|
||||
factory: function(el, width, height) {
|
||||
var axOpts;
|
||||
var apexchart = null;
|
||||
|
||||
return {
|
||||
renderValue: function(x) {
|
||||
// Global options
|
||||
axOpts = x.ax_opts;
|
||||
|
||||
if (x.sparkbox) {
|
||||
el.style.background = x.sparkbox.background;
|
||||
el.classList.add("apexcharter-spark-box");
|
||||
}
|
||||
|
||||
// Sizing
|
||||
if (typeof axOpts.chart === "undefined") {
|
||||
axOpts.chart = {};
|
||||
}
|
||||
axOpts.chart.width = el.clientWidth;
|
||||
axOpts.chart.height = el.clientHeight;
|
||||
if (!axOpts.chart.hasOwnProperty("id")) {
|
||||
axOpts.chart.id = el.id;
|
||||
}
|
||||
if (!axOpts.chart.hasOwnProperty("parentHeightOffset")) {
|
||||
axOpts.chart.parentHeightOffset = 0;
|
||||
}
|
||||
|
||||
// added events to remove minheight container
|
||||
if (!axOpts.chart.hasOwnProperty("events")) {
|
||||
axOpts.chart.events = {};
|
||||
}
|
||||
if (!axOpts.chart.events.hasOwnProperty("mounted")) {
|
||||
axOpts.chart.events.mounted = function(chartContext, config) {
|
||||
el.style.minHeight = 0;
|
||||
};
|
||||
}
|
||||
if (!axOpts.chart.events.hasOwnProperty("updated")) {
|
||||
axOpts.chart.events.updated = function(chartContext, config) {
|
||||
el.style.minHeight = 0;
|
||||
};
|
||||
}
|
||||
|
||||
if (x.hasOwnProperty("shinyEvents") & HTMLWidgets.shinyMode) {
|
||||
if (!axOpts.hasOwnProperty("chart")) {
|
||||
axOpts.chart = {};
|
||||
}
|
||||
if (!axOpts.chart.hasOwnProperty("events")) {
|
||||
axOpts.chart.events = {};
|
||||
}
|
||||
if (x.shinyEvents.hasOwnProperty("click")) {
|
||||
axOpts.chart.events.dataPointSelection = function(
|
||||
event,
|
||||
chartContext,
|
||||
opts
|
||||
) {
|
||||
var options = opts;
|
||||
var nonEmpty = opts.selectedDataPoints.filter(function(el) {
|
||||
return el !== null && el.length > 0;
|
||||
});
|
||||
if (nonEmpty.length > 0) {
|
||||
var select = {};
|
||||
for (var i = 0; i < opts.selectedDataPoints.length; i++) {
|
||||
if (typeof opts.selectedDataPoints[i] === "undefined") {
|
||||
continue;
|
||||
}
|
||||
var selection = apexcharter.getSelection(
|
||||
chartContext,
|
||||
options.selectedDataPoints,
|
||||
i
|
||||
);
|
||||
if (selection !== null) {
|
||||
if (opts.w.config.series[i].hasOwnProperty("name")) {
|
||||
var name = opts.w.config.series[i].name;
|
||||
select[name] = selection;
|
||||
} else {
|
||||
select[i] = selection;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (apexcharter.isSingleSerie(options)) {
|
||||
select = select[Object.keys(select)[0]];
|
||||
}
|
||||
Shiny.setInputValue(
|
||||
x.shinyEvents.click.inputId + ":apex_click",
|
||||
{ value: select, datetime: apexcharter.isDatetimeAxis(chartContext) }
|
||||
);
|
||||
} else {
|
||||
Shiny.setInputValue(x.shinyEvents.click.inputId, null);
|
||||
}
|
||||
};
|
||||
}
|
||||
if (x.shinyEvents.hasOwnProperty("zoomed")) {
|
||||
axOpts.chart.events.zoomed = function(chartContext, xaxis, yaxis) {
|
||||
var id = x.shinyEvents.zoomed.inputId;
|
||||
if (apexcharter.isDatetimeAxis(chartContext)) {
|
||||
id = id + ":apex_datetime";
|
||||
}
|
||||
Shiny.setInputValue(id, {
|
||||
x: apexcharter.getXaxis(xaxis),
|
||||
y: apexcharter.getYaxis(xaxis)
|
||||
});
|
||||
};
|
||||
}
|
||||
if (x.shinyEvents.hasOwnProperty("selection")) {
|
||||
axOpts.chart.events.selection = function(
|
||||
chartContext,
|
||||
xaxis,
|
||||
yaxis
|
||||
) {
|
||||
var id = x.shinyEvents.selection.inputId;
|
||||
if (apexcharter.isDatetimeAxis(chartContext)) {
|
||||
id = id + ":apex_datetime";
|
||||
}
|
||||
var selectionValue;
|
||||
if (x.shinyEvents.selection.type === "x") {
|
||||
selectionValue = { x: xaxis.xaxis };
|
||||
} else if (x.shinyEvents.selection.type === "xy") {
|
||||
selectionValue = { x: xaxis.xaxis, y: apexcharter.getYaxis(xaxis) };
|
||||
} else if (x.shinyEvents.selection.type === "y") {
|
||||
selectionValue = { y: apexcharter.getYaxis(xaxis) };
|
||||
}
|
||||
Shiny.setInputValue(id, selectionValue);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Generate or update chart
|
||||
if (apexchart === null) {
|
||||
apexchart = new ApexCharts(el, axOpts);
|
||||
apexchart.render().then(function() {
|
||||
apexcharter.exportChart(x, apexchart);
|
||||
});
|
||||
} else {
|
||||
if (x.auto_update) {
|
||||
//console.log(x.auto_update);
|
||||
if (x.auto_update.update_options) {
|
||||
var options = Object.assign({}, axOpts);
|
||||
delete options.series;
|
||||
delete options.chart.width;
|
||||
delete options.chart.height;
|
||||
apexchart
|
||||
.updateOptions(
|
||||
options,
|
||||
x.auto_update.options_redrawPaths,
|
||||
x.auto_update.options_animate,
|
||||
x.auto_update.update_synced_charts
|
||||
);
|
||||
}
|
||||
apexchart
|
||||
.updateSeries(axOpts.series, x.auto_update.series_animate)
|
||||
.then(function(chart) {
|
||||
apexcharter.exportChart(x, chart);
|
||||
});
|
||||
} else {
|
||||
apexchart.destroy();
|
||||
apexchart = new ApexCharts(el, axOpts);
|
||||
apexchart.render().then(function() {
|
||||
apexcharter.exportChart(x, apexchart);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getChart: function() {
|
||||
return apexchart;
|
||||
},
|
||||
|
||||
resize: function(width, height) {
|
||||
apexchart.updateOptions({
|
||||
chart: {
|
||||
width: width,
|
||||
height: height
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
if (HTMLWidgets.shinyMode) {
|
||||
// update serie
|
||||
Shiny.addCustomMessageHandler("update-apexchart-series", function(obj) {
|
||||
var chart = apexcharter.getWidget(obj.id);
|
||||
if (typeof chart != "undefined") {
|
||||
chart.updateSeries(
|
||||
[
|
||||
{
|
||||
data: obj.data.newSeries
|
||||
}
|
||||
],
|
||||
obj.data.animate
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// update options
|
||||
Shiny.addCustomMessageHandler("update-apexchart-options", function(obj) {
|
||||
var chart = apexcharter.getWidget(obj.id);
|
||||
if (typeof chart != "undefined") {
|
||||
var options = obj.data.options;
|
||||
var evals = obj.data.evals;
|
||||
if (!(evals instanceof Array)) evals = [evals];
|
||||
for (var k = 0; evals && k < evals.length; k++) {
|
||||
window.HTMLWidgets.evaluateStringMember(options, evals[k]);
|
||||
}
|
||||
chart.updateOptions(options);
|
||||
}
|
||||
});
|
||||
|
||||
// toggle series
|
||||
Shiny.addCustomMessageHandler("update-apexchart-toggle-series", function(obj) {
|
||||
var chart = apexcharter.getWidget(obj.id);
|
||||
if (typeof chart != "undefined") {
|
||||
var seriesName = obj.data.seriesName;
|
||||
for(var i = 0; i < seriesName.length; i++) {
|
||||
chart.toggleSeries(seriesName[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1,356 +0,0 @@
|
|||
/*!
|
||||
*
|
||||
* htmlwidgets bindings for ApexCharts
|
||||
* https://github.com/dreamRs/apexcharter
|
||||
*
|
||||
*/
|
||||
|
||||
/*global HTMLWidgets, ApexCharts, Shiny */
|
||||
|
||||
/// Functions
|
||||
|
||||
// From Friss tuto (https://github.com/FrissAnalytics/shinyJsTutorials/blob/master/tutorials/tutorial_03.Rmd)
|
||||
var apexcharter = {
|
||||
getWidget: function(id) {
|
||||
var htmlWidgetsObj = HTMLWidgets.find("#" + id);
|
||||
var widgetObj;
|
||||
if (typeof htmlWidgetsObj !== "undefined") {
|
||||
widgetObj = htmlWidgetsObj.getChart();
|
||||
}
|
||||
return widgetObj;
|
||||
},
|
||||
|
||||
isSingleSerie: function(options) {
|
||||
var typeLabels = ["pie", "radialBar", "donut"];
|
||||
var lab = typeLabels.indexOf(options.w.config.chart.type) > -1;
|
||||
var single = options.w.config.series.length === 1;
|
||||
return lab | single;
|
||||
},
|
||||
|
||||
isDatetimeAxis: function(chartContext) {
|
||||
if (
|
||||
chartContext.hasOwnProperty("w") &&
|
||||
chartContext.w.hasOwnProperty("config") &&
|
||||
chartContext.w.config.hasOwnProperty("xaxis") &&
|
||||
chartContext.w.config.xaxis.hasOwnProperty("type")
|
||||
) {
|
||||
return chartContext.w.config.xaxis.type == "datetime";
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
getSelection: function(chartContext, selectedDataPoints, serieIndex) {
|
||||
var typeLabels = ["pie", "radialBar", "donut"];
|
||||
var typeXY = ["scatter", "bubble"];
|
||||
var selected;
|
||||
if (typeLabels.indexOf(chartContext.opts.chart.type) > -1) {
|
||||
var labels = chartContext.opts.labels;
|
||||
selected = selectedDataPoints[serieIndex].map(function(index) {
|
||||
return labels[index];
|
||||
});
|
||||
} else {
|
||||
var data = chartContext.opts.series[serieIndex].data;
|
||||
selected = selectedDataPoints[serieIndex].map(function(index) {
|
||||
var val = data[index];
|
||||
if (typeXY.indexOf(chartContext.opts.chart.type) < 0) {
|
||||
if (val.hasOwnProperty("x")) {
|
||||
val = val.x;
|
||||
} else {
|
||||
val = val[0];
|
||||
}
|
||||
}
|
||||
return val;
|
||||
});
|
||||
}
|
||||
//console.log(selected);
|
||||
if (typeXY.indexOf(chartContext.opts.chart.type) > -1) {
|
||||
selected = {
|
||||
x: selected.map(function(obj) {
|
||||
return obj.x;
|
||||
}),
|
||||
y: selected.map(function(obj) {
|
||||
return obj.y;
|
||||
})
|
||||
};
|
||||
}
|
||||
if (typeof selected == "undefined") {
|
||||
selected = null;
|
||||
}
|
||||
return selected;
|
||||
},
|
||||
|
||||
getYaxis: function(axis) {
|
||||
var yzoom = { min: null, max: null };
|
||||
if (typeof axis.yaxis !== "undefined" && axis.yaxis !== null) {
|
||||
var y_axis;
|
||||
if (axis.yaxis.hasOwnProperty("min")) {
|
||||
y_axis = axis.yaxis;
|
||||
} else {
|
||||
y_axis = axis.yaxis[0];
|
||||
}
|
||||
if (y_axis.hasOwnProperty("min") && typeof y_axis.min !== "undefined") {
|
||||
yzoom.min = y_axis.min;
|
||||
}
|
||||
if (y_axis.hasOwnProperty("max") && typeof y_axis.max !== "undefined") {
|
||||
yzoom.max = y_axis.max;
|
||||
}
|
||||
}
|
||||
return yzoom;
|
||||
},
|
||||
|
||||
getXaxis: function(axis) {
|
||||
var xzoom = { min: null, max: null };
|
||||
if (typeof axis.xaxis !== "undefined") {
|
||||
var x_axis = axis.xaxis;
|
||||
if (x_axis.hasOwnProperty("min") && typeof x_axis.min !== "undefined") {
|
||||
xzoom.min = x_axis.min;
|
||||
}
|
||||
if (x_axis.hasOwnProperty("max") && typeof x_axis.max !== "undefined") {
|
||||
xzoom.max = x_axis.max;
|
||||
}
|
||||
}
|
||||
return xzoom;
|
||||
},
|
||||
|
||||
exportChart: function(x, chart) {
|
||||
if (x.hasOwnProperty("shinyEvents") & HTMLWidgets.shinyMode) {
|
||||
if (x.shinyEvents.hasOwnProperty("export")) {
|
||||
setTimeout(function() {
|
||||
chart.dataURI().then(function(imgURI) {
|
||||
Shiny.setInputValue(x.shinyEvents.export.inputId, imgURI);
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/// Widget
|
||||
|
||||
HTMLWidgets.widget({
|
||||
name: "apexcharter",
|
||||
|
||||
type: "output",
|
||||
|
||||
factory: function(el, width, height) {
|
||||
var axOpts;
|
||||
var apexchart = null;
|
||||
|
||||
return {
|
||||
renderValue: function(x) {
|
||||
// Global options
|
||||
axOpts = x.ax_opts;
|
||||
|
||||
if (x.sparkbox) {
|
||||
el.style.background = x.sparkbox.background;
|
||||
el.classList.add("apexcharter-spark-box");
|
||||
}
|
||||
|
||||
// Sizing
|
||||
if (typeof axOpts.chart === "undefined") {
|
||||
axOpts.chart = {};
|
||||
}
|
||||
axOpts.chart.width = el.clientWidth;
|
||||
axOpts.chart.height = el.clientHeight;
|
||||
if (!axOpts.chart.hasOwnProperty("id")) {
|
||||
axOpts.chart.id = el.id;
|
||||
}
|
||||
if (!axOpts.chart.hasOwnProperty("parentHeightOffset")) {
|
||||
axOpts.chart.parentHeightOffset = 0;
|
||||
}
|
||||
|
||||
// added events to remove minheight container
|
||||
if (!axOpts.chart.hasOwnProperty("events")) {
|
||||
axOpts.chart.events = {};
|
||||
}
|
||||
if (!axOpts.chart.events.hasOwnProperty("mounted")) {
|
||||
axOpts.chart.events.mounted = function(chartContext, config) {
|
||||
el.style.minHeight = 0;
|
||||
};
|
||||
}
|
||||
if (!axOpts.chart.events.hasOwnProperty("updated")) {
|
||||
axOpts.chart.events.updated = function(chartContext, config) {
|
||||
el.style.minHeight = 0;
|
||||
};
|
||||
}
|
||||
|
||||
if (x.hasOwnProperty("shinyEvents") & HTMLWidgets.shinyMode) {
|
||||
if (!axOpts.hasOwnProperty("chart")) {
|
||||
axOpts.chart = {};
|
||||
}
|
||||
if (!axOpts.chart.hasOwnProperty("events")) {
|
||||
axOpts.chart.events = {};
|
||||
}
|
||||
if (x.shinyEvents.hasOwnProperty("click")) {
|
||||
axOpts.chart.events.dataPointSelection = function(
|
||||
event,
|
||||
chartContext,
|
||||
opts
|
||||
) {
|
||||
var options = opts;
|
||||
var nonEmpty = opts.selectedDataPoints.filter(function(el) {
|
||||
return el !== null && el.length > 0;
|
||||
});
|
||||
if (nonEmpty.length > 0) {
|
||||
var select = {};
|
||||
for (var i = 0; i < opts.selectedDataPoints.length; i++) {
|
||||
if (typeof opts.selectedDataPoints[i] === "undefined") {
|
||||
continue;
|
||||
}
|
||||
var selection = apexcharter.getSelection(
|
||||
chartContext,
|
||||
options.selectedDataPoints,
|
||||
i
|
||||
);
|
||||
if (selection !== null) {
|
||||
if (opts.w.config.series[i].hasOwnProperty("name")) {
|
||||
var name = opts.w.config.series[i].name;
|
||||
select[name] = selection;
|
||||
} else {
|
||||
select[i] = selection;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (apexcharter.isSingleSerie(options)) {
|
||||
select = select[Object.keys(select)[0]];
|
||||
}
|
||||
Shiny.setInputValue(
|
||||
x.shinyEvents.click.inputId + ":apex_click",
|
||||
{ value: select, datetime: apexcharter.isDatetimeAxis(chartContext) }
|
||||
);
|
||||
} else {
|
||||
Shiny.setInputValue(x.shinyEvents.click.inputId, null);
|
||||
}
|
||||
};
|
||||
}
|
||||
if (x.shinyEvents.hasOwnProperty("zoomed")) {
|
||||
axOpts.chart.events.zoomed = function(chartContext, xaxis, yaxis) {
|
||||
var id = x.shinyEvents.zoomed.inputId;
|
||||
if (apexcharter.isDatetimeAxis(chartContext)) {
|
||||
id = id + ":apex_datetime";
|
||||
}
|
||||
Shiny.setInputValue(id, {
|
||||
x: apexcharter.getXaxis(xaxis),
|
||||
y: apexcharter.getYaxis(xaxis)
|
||||
});
|
||||
};
|
||||
}
|
||||
if (x.shinyEvents.hasOwnProperty("selection")) {
|
||||
axOpts.chart.events.selection = function(
|
||||
chartContext,
|
||||
xaxis,
|
||||
yaxis
|
||||
) {
|
||||
var id = x.shinyEvents.selection.inputId;
|
||||
if (apexcharter.isDatetimeAxis(chartContext)) {
|
||||
id = id + ":apex_datetime";
|
||||
}
|
||||
var selectionValue;
|
||||
if (x.shinyEvents.selection.type === "x") {
|
||||
selectionValue = { x: xaxis.xaxis };
|
||||
} else if (x.shinyEvents.selection.type === "xy") {
|
||||
selectionValue = { x: xaxis.xaxis, y: apexcharter.getYaxis(xaxis) };
|
||||
} else if (x.shinyEvents.selection.type === "y") {
|
||||
selectionValue = { y: apexcharter.getYaxis(xaxis) };
|
||||
}
|
||||
Shiny.setInputValue(id, selectionValue);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Generate or update chart
|
||||
if (apexchart === null) {
|
||||
apexchart = new ApexCharts(el, axOpts);
|
||||
apexchart.render().then(function() {
|
||||
apexcharter.exportChart(x, apexchart);
|
||||
});
|
||||
} else {
|
||||
if (x.auto_update) {
|
||||
//console.log(x.auto_update);
|
||||
if (x.auto_update.update_options) {
|
||||
var options = Object.assign({}, axOpts);
|
||||
delete options.series;
|
||||
delete options.chart.width;
|
||||
delete options.chart.height;
|
||||
apexchart
|
||||
.updateOptions(
|
||||
options,
|
||||
x.auto_update.options_redrawPaths,
|
||||
x.auto_update.options_animate,
|
||||
x.auto_update.update_synced_charts
|
||||
);
|
||||
}
|
||||
apexchart
|
||||
.updateSeries(axOpts.series, x.auto_update.series_animate)
|
||||
.then(function(chart) {
|
||||
apexcharter.exportChart(x, chart);
|
||||
});
|
||||
} else {
|
||||
apexchart.destroy();
|
||||
apexchart = new ApexCharts(el, axOpts);
|
||||
apexchart.render().then(function() {
|
||||
apexcharter.exportChart(x, apexchart);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getChart: function() {
|
||||
return apexchart;
|
||||
},
|
||||
|
||||
resize: function(width, height) {
|
||||
apexchart.updateOptions({
|
||||
chart: {
|
||||
width: width,
|
||||
height: height
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
if (HTMLWidgets.shinyMode) {
|
||||
// update serie
|
||||
Shiny.addCustomMessageHandler("update-apexchart-series", function(obj) {
|
||||
var chart = apexcharter.getWidget(obj.id);
|
||||
if (typeof chart != "undefined") {
|
||||
chart.updateSeries(
|
||||
[
|
||||
{
|
||||
data: obj.data.newSeries
|
||||
}
|
||||
],
|
||||
obj.data.animate
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// update options
|
||||
Shiny.addCustomMessageHandler("update-apexchart-options", function(obj) {
|
||||
var chart = apexcharter.getWidget(obj.id);
|
||||
if (typeof chart != "undefined") {
|
||||
var options = obj.data.options;
|
||||
var evals = obj.data.evals;
|
||||
if (!(evals instanceof Array)) evals = [evals];
|
||||
for (var k = 0; evals && k < evals.length; k++) {
|
||||
window.HTMLWidgets.evaluateStringMember(options, evals[k]);
|
||||
}
|
||||
chart.updateOptions(options);
|
||||
}
|
||||
});
|
||||
|
||||
// toggle series
|
||||
Shiny.addCustomMessageHandler("update-apexchart-toggle-series", function(obj) {
|
||||
var chart = apexcharter.getWidget(obj.id);
|
||||
if (typeof chart != "undefined") {
|
||||
var seriesName = obj.data.seriesName;
|
||||
for(var i = 0; i < seriesName.length; i++) {
|
||||
chart.toggleSeries(seriesName[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1,356 +0,0 @@
|
|||
/*!
|
||||
*
|
||||
* htmlwidgets bindings for ApexCharts
|
||||
* https://github.com/dreamRs/apexcharter
|
||||
*
|
||||
*/
|
||||
|
||||
/*global HTMLWidgets, ApexCharts, Shiny */
|
||||
|
||||
/// Functions
|
||||
|
||||
// From Friss tuto (https://github.com/FrissAnalytics/shinyJsTutorials/blob/master/tutorials/tutorial_03.Rmd)
|
||||
var apexcharter = {
|
||||
getWidget: function(id) {
|
||||
var htmlWidgetsObj = HTMLWidgets.find("#" + id);
|
||||
var widgetObj;
|
||||
if (typeof htmlWidgetsObj !== "undefined") {
|
||||
widgetObj = htmlWidgetsObj.getChart();
|
||||
}
|
||||
return widgetObj;
|
||||
},
|
||||
|
||||
isSingleSerie: function(options) {
|
||||
var typeLabels = ["pie", "radialBar", "donut"];
|
||||
var lab = typeLabels.indexOf(options.w.config.chart.type) > -1;
|
||||
var single = options.w.config.series.length === 1;
|
||||
return lab | single;
|
||||
},
|
||||
|
||||
isDatetimeAxis: function(chartContext) {
|
||||
if (
|
||||
chartContext.hasOwnProperty("w") &&
|
||||
chartContext.w.hasOwnProperty("config") &&
|
||||
chartContext.w.config.hasOwnProperty("xaxis") &&
|
||||
chartContext.w.config.xaxis.hasOwnProperty("type")
|
||||
) {
|
||||
return chartContext.w.config.xaxis.type == "datetime";
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
getSelection: function(chartContext, selectedDataPoints, serieIndex) {
|
||||
var typeLabels = ["pie", "radialBar", "donut"];
|
||||
var typeXY = ["scatter", "bubble"];
|
||||
var selected;
|
||||
if (typeLabels.indexOf(chartContext.opts.chart.type) > -1) {
|
||||
var labels = chartContext.opts.labels;
|
||||
selected = selectedDataPoints[serieIndex].map(function(index) {
|
||||
return labels[index];
|
||||
});
|
||||
} else {
|
||||
var data = chartContext.opts.series[serieIndex].data;
|
||||
selected = selectedDataPoints[serieIndex].map(function(index) {
|
||||
var val = data[index];
|
||||
if (typeXY.indexOf(chartContext.opts.chart.type) < 0) {
|
||||
if (val.hasOwnProperty("x")) {
|
||||
val = val.x;
|
||||
} else {
|
||||
val = val[0];
|
||||
}
|
||||
}
|
||||
return val;
|
||||
});
|
||||
}
|
||||
//console.log(selected);
|
||||
if (typeXY.indexOf(chartContext.opts.chart.type) > -1) {
|
||||
selected = {
|
||||
x: selected.map(function(obj) {
|
||||
return obj.x;
|
||||
}),
|
||||
y: selected.map(function(obj) {
|
||||
return obj.y;
|
||||
})
|
||||
};
|
||||
}
|
||||
if (typeof selected == "undefined") {
|
||||
selected = null;
|
||||
}
|
||||
return selected;
|
||||
},
|
||||
|
||||
getYaxis: function(axis) {
|
||||
var yzoom = { min: null, max: null };
|
||||
if (typeof axis.yaxis !== "undefined" && axis.yaxis !== null) {
|
||||
var y_axis;
|
||||
if (axis.yaxis.hasOwnProperty("min")) {
|
||||
y_axis = axis.yaxis;
|
||||
} else {
|
||||
y_axis = axis.yaxis[0];
|
||||
}
|
||||
if (y_axis.hasOwnProperty("min") && typeof y_axis.min !== "undefined") {
|
||||
yzoom.min = y_axis.min;
|
||||
}
|
||||
if (y_axis.hasOwnProperty("max") && typeof y_axis.max !== "undefined") {
|
||||
yzoom.max = y_axis.max;
|
||||
}
|
||||
}
|
||||
return yzoom;
|
||||
},
|
||||
|
||||
getXaxis: function(axis) {
|
||||
var xzoom = { min: null, max: null };
|
||||
if (typeof axis.xaxis !== "undefined") {
|
||||
var x_axis = axis.xaxis;
|
||||
if (x_axis.hasOwnProperty("min") && typeof x_axis.min !== "undefined") {
|
||||
xzoom.min = x_axis.min;
|
||||
}
|
||||
if (x_axis.hasOwnProperty("max") && typeof x_axis.max !== "undefined") {
|
||||
xzoom.max = x_axis.max;
|
||||
}
|
||||
}
|
||||
return xzoom;
|
||||
},
|
||||
|
||||
exportChart: function(x, chart) {
|
||||
if (x.hasOwnProperty("shinyEvents") & HTMLWidgets.shinyMode) {
|
||||
if (x.shinyEvents.hasOwnProperty("export")) {
|
||||
setTimeout(function() {
|
||||
chart.dataURI().then(function(imgURI) {
|
||||
Shiny.setInputValue(x.shinyEvents.export.inputId, imgURI);
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/// Widget
|
||||
|
||||
HTMLWidgets.widget({
|
||||
name: "apexcharter",
|
||||
|
||||
type: "output",
|
||||
|
||||
factory: function(el, width, height) {
|
||||
var axOpts;
|
||||
var apexchart = null;
|
||||
|
||||
return {
|
||||
renderValue: function(x) {
|
||||
// Global options
|
||||
axOpts = x.ax_opts;
|
||||
|
||||
if (x.sparkbox) {
|
||||
el.style.background = x.sparkbox.background;
|
||||
el.classList.add("apexcharter-spark-box");
|
||||
}
|
||||
|
||||
// Sizing
|
||||
if (typeof axOpts.chart === "undefined") {
|
||||
axOpts.chart = {};
|
||||
}
|
||||
axOpts.chart.width = el.clientWidth;
|
||||
axOpts.chart.height = el.clientHeight;
|
||||
if (!axOpts.chart.hasOwnProperty("id")) {
|
||||
axOpts.chart.id = el.id;
|
||||
}
|
||||
if (!axOpts.chart.hasOwnProperty("parentHeightOffset")) {
|
||||
axOpts.chart.parentHeightOffset = 0;
|
||||
}
|
||||
|
||||
// added events to remove minheight container
|
||||
if (!axOpts.chart.hasOwnProperty("events")) {
|
||||
axOpts.chart.events = {};
|
||||
}
|
||||
if (!axOpts.chart.events.hasOwnProperty("mounted")) {
|
||||
axOpts.chart.events.mounted = function(chartContext, config) {
|
||||
el.style.minHeight = 0;
|
||||
};
|
||||
}
|
||||
if (!axOpts.chart.events.hasOwnProperty("updated")) {
|
||||
axOpts.chart.events.updated = function(chartContext, config) {
|
||||
el.style.minHeight = 0;
|
||||
};
|
||||
}
|
||||
|
||||
if (x.hasOwnProperty("shinyEvents") & HTMLWidgets.shinyMode) {
|
||||
if (!axOpts.hasOwnProperty("chart")) {
|
||||
axOpts.chart = {};
|
||||
}
|
||||
if (!axOpts.chart.hasOwnProperty("events")) {
|
||||
axOpts.chart.events = {};
|
||||
}
|
||||
if (x.shinyEvents.hasOwnProperty("click")) {
|
||||
axOpts.chart.events.dataPointSelection = function(
|
||||
event,
|
||||
chartContext,
|
||||
opts
|
||||
) {
|
||||
var options = opts;
|
||||
var nonEmpty = opts.selectedDataPoints.filter(function(el) {
|
||||
return el !== null && el.length > 0;
|
||||
});
|
||||
if (nonEmpty.length > 0) {
|
||||
var select = {};
|
||||
for (var i = 0; i < opts.selectedDataPoints.length; i++) {
|
||||
if (typeof opts.selectedDataPoints[i] === "undefined") {
|
||||
continue;
|
||||
}
|
||||
var selection = apexcharter.getSelection(
|
||||
chartContext,
|
||||
options.selectedDataPoints,
|
||||
i
|
||||
);
|
||||
if (selection !== null) {
|
||||
if (opts.w.config.series[i].hasOwnProperty("name")) {
|
||||
var name = opts.w.config.series[i].name;
|
||||
select[name] = selection;
|
||||
} else {
|
||||
select[i] = selection;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (apexcharter.isSingleSerie(options)) {
|
||||
select = select[Object.keys(select)[0]];
|
||||
}
|
||||
Shiny.setInputValue(
|
||||
x.shinyEvents.click.inputId + ":apex_click",
|
||||
{ value: select, datetime: apexcharter.isDatetimeAxis(chartContext) }
|
||||
);
|
||||
} else {
|
||||
Shiny.setInputValue(x.shinyEvents.click.inputId, null);
|
||||
}
|
||||
};
|
||||
}
|
||||
if (x.shinyEvents.hasOwnProperty("zoomed")) {
|
||||
axOpts.chart.events.zoomed = function(chartContext, xaxis, yaxis) {
|
||||
var id = x.shinyEvents.zoomed.inputId;
|
||||
if (apexcharter.isDatetimeAxis(chartContext)) {
|
||||
id = id + ":apex_datetime";
|
||||
}
|
||||
Shiny.setInputValue(id, {
|
||||
x: apexcharter.getXaxis(xaxis),
|
||||
y: apexcharter.getYaxis(xaxis)
|
||||
});
|
||||
};
|
||||
}
|
||||
if (x.shinyEvents.hasOwnProperty("selection")) {
|
||||
axOpts.chart.events.selection = function(
|
||||
chartContext,
|
||||
xaxis,
|
||||
yaxis
|
||||
) {
|
||||
var id = x.shinyEvents.selection.inputId;
|
||||
if (apexcharter.isDatetimeAxis(chartContext)) {
|
||||
id = id + ":apex_datetime";
|
||||
}
|
||||
var selectionValue;
|
||||
if (x.shinyEvents.selection.type === "x") {
|
||||
selectionValue = { x: xaxis.xaxis };
|
||||
} else if (x.shinyEvents.selection.type === "xy") {
|
||||
selectionValue = { x: xaxis.xaxis, y: apexcharter.getYaxis(xaxis) };
|
||||
} else if (x.shinyEvents.selection.type === "y") {
|
||||
selectionValue = { y: apexcharter.getYaxis(xaxis) };
|
||||
}
|
||||
Shiny.setInputValue(id, selectionValue);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Generate or update chart
|
||||
if (apexchart === null) {
|
||||
apexchart = new ApexCharts(el, axOpts);
|
||||
apexchart.render().then(function() {
|
||||
apexcharter.exportChart(x, apexchart);
|
||||
});
|
||||
} else {
|
||||
if (x.auto_update) {
|
||||
//console.log(x.auto_update);
|
||||
if (x.auto_update.update_options) {
|
||||
var options = Object.assign({}, axOpts);
|
||||
delete options.series;
|
||||
delete options.chart.width;
|
||||
delete options.chart.height;
|
||||
apexchart
|
||||
.updateOptions(
|
||||
options,
|
||||
x.auto_update.options_redrawPaths,
|
||||
x.auto_update.options_animate,
|
||||
x.auto_update.update_synced_charts
|
||||
);
|
||||
}
|
||||
apexchart
|
||||
.updateSeries(axOpts.series, x.auto_update.series_animate)
|
||||
.then(function(chart) {
|
||||
apexcharter.exportChart(x, chart);
|
||||
});
|
||||
} else {
|
||||
apexchart.destroy();
|
||||
apexchart = new ApexCharts(el, axOpts);
|
||||
apexchart.render().then(function() {
|
||||
apexcharter.exportChart(x, apexchart);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getChart: function() {
|
||||
return apexchart;
|
||||
},
|
||||
|
||||
resize: function(width, height) {
|
||||
apexchart.updateOptions({
|
||||
chart: {
|
||||
width: width,
|
||||
height: height
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
if (HTMLWidgets.shinyMode) {
|
||||
// update serie
|
||||
Shiny.addCustomMessageHandler("update-apexchart-series", function(obj) {
|
||||
var chart = apexcharter.getWidget(obj.id);
|
||||
if (typeof chart != "undefined") {
|
||||
chart.updateSeries(
|
||||
[
|
||||
{
|
||||
data: obj.data.newSeries
|
||||
}
|
||||
],
|
||||
obj.data.animate
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// update options
|
||||
Shiny.addCustomMessageHandler("update-apexchart-options", function(obj) {
|
||||
var chart = apexcharter.getWidget(obj.id);
|
||||
if (typeof chart != "undefined") {
|
||||
var options = obj.data.options;
|
||||
var evals = obj.data.evals;
|
||||
if (!(evals instanceof Array)) evals = [evals];
|
||||
for (var k = 0; evals && k < evals.length; k++) {
|
||||
window.HTMLWidgets.evaluateStringMember(options, evals[k]);
|
||||
}
|
||||
chart.updateOptions(options);
|
||||
}
|
||||
});
|
||||
|
||||
// toggle series
|
||||
Shiny.addCustomMessageHandler("update-apexchart-toggle-series", function(obj) {
|
||||
var chart = apexcharter.getWidget(obj.id);
|
||||
if (typeof chart != "undefined") {
|
||||
var seriesName = obj.data.seriesName;
|
||||
for(var i = 0; i < seriesName.length; i++) {
|
||||
chart.toggleSeries(seriesName[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
dependencies:
|
||||
- name: apexcharts
|
||||
version: 3.26.2
|
||||
src: htmlwidgets/assets/apexcharts-3.26
|
||||
script: apexcharts.min.js
|
||||
- name: apexcharter-css
|
||||
version: 0.1.0
|
||||
src: htmlwidgets
|
||||
stylesheet: apexcharter.css
|
||||
- name: d3-format
|
||||
version: 1.4.2
|
||||
src: htmlwidgets/assets/d3-format
|
||||
script: d3-format.min.js
|
||||
all_files: false
|
|
@ -1,24 +0,0 @@
|
|||
ApexCharts.js
|
||||
=============
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 ApexCharts
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
File diff suppressed because one or more lines are too long
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "ca",
|
||||
"options": {
|
||||
"months": [
|
||||
"Gener",
|
||||
"Febrer",
|
||||
"Març",
|
||||
"Abril",
|
||||
"Maig",
|
||||
"Juny",
|
||||
"Juliol",
|
||||
"Agost",
|
||||
"Setembre",
|
||||
"Octubre",
|
||||
"Novembre",
|
||||
"Desembre"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Gen.",
|
||||
"Febr.",
|
||||
"Març",
|
||||
"Abr.",
|
||||
"Maig",
|
||||
"Juny",
|
||||
"Jul.",
|
||||
"Ag.",
|
||||
"Set.",
|
||||
"Oct.",
|
||||
"Nov.",
|
||||
"Des."
|
||||
],
|
||||
"days": [
|
||||
"Diumenge",
|
||||
"Dilluns",
|
||||
"Dimarts",
|
||||
"Dimecres",
|
||||
"Dijous",
|
||||
"Divendres",
|
||||
"Dissabte"
|
||||
],
|
||||
"shortDays": ["Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Descarregar SVG",
|
||||
"exportToPNG": "Descarregar PNG",
|
||||
"exportToCSV": "Descarregar CSV",
|
||||
"menu": "Menú",
|
||||
"selection": "Seleccionar",
|
||||
"selectionZoom": "Seleccionar Zoom",
|
||||
"zoomIn": "Augmentar",
|
||||
"zoomOut": "Disminuir",
|
||||
"pan": "Navegació",
|
||||
"reset": "Reiniciar Zoom"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "cs",
|
||||
"options": {
|
||||
"months": [
|
||||
"Leden",
|
||||
"Únor",
|
||||
"Březen",
|
||||
"Duben",
|
||||
"Květen",
|
||||
"Červen",
|
||||
"Červenec",
|
||||
"Srpen",
|
||||
"Září",
|
||||
"Říjen",
|
||||
"Listopad",
|
||||
"Prosinec"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Led",
|
||||
"Úno",
|
||||
"Bře",
|
||||
"Dub",
|
||||
"Kvě",
|
||||
"Čvn",
|
||||
"Čvc",
|
||||
"Srp",
|
||||
"Zář",
|
||||
"Říj",
|
||||
"Lis",
|
||||
"Pro"
|
||||
],
|
||||
"days": [
|
||||
"Neděle",
|
||||
"Pondělí",
|
||||
"Úterý",
|
||||
"Středa",
|
||||
"Čtvrtek",
|
||||
"Pátek",
|
||||
"Sobota"
|
||||
],
|
||||
"shortDays": ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Stáhnout SVG",
|
||||
"exportToPNG": "Stáhnout PNG",
|
||||
"exportToCSV": "Stáhnout CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Vybrat",
|
||||
"selectionZoom": "Zoom: Vybrat",
|
||||
"zoomIn": "Zoom: Přiblížit",
|
||||
"zoomOut": "Zoom: Oddálit",
|
||||
"pan": "Přesouvat",
|
||||
"reset": "Resetovat"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "de",
|
||||
"options": {
|
||||
"months": [
|
||||
"Januar",
|
||||
"Februar",
|
||||
"März",
|
||||
"April",
|
||||
"Mai",
|
||||
"Juni",
|
||||
"Juli",
|
||||
"August",
|
||||
"September",
|
||||
"Oktober",
|
||||
"November",
|
||||
"Dezember"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mär",
|
||||
"Apr",
|
||||
"Mai",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Dez"
|
||||
],
|
||||
"days": [
|
||||
"Sonntag",
|
||||
"Montag",
|
||||
"Dienstag",
|
||||
"Mittwoch",
|
||||
"Donnerstag",
|
||||
"Freitag",
|
||||
"Samstag"
|
||||
],
|
||||
"shortDays": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "SVG speichern",
|
||||
"exportToPNG": "PNG speichern",
|
||||
"exportToCSV": "CSV speichern",
|
||||
"menu": "Menü",
|
||||
"selection": "Auswahl",
|
||||
"selectionZoom": "Auswahl vergrößern",
|
||||
"zoomIn": "Vergrößern",
|
||||
"zoomOut": "Verkleinern",
|
||||
"pan": "Verschieben",
|
||||
"reset": "Zoom zurücksetzen"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "el",
|
||||
"options": {
|
||||
"months": [
|
||||
"Ιανουάριος",
|
||||
"Φεβρουάριος",
|
||||
"Μάρτιος",
|
||||
"Απρίλιος",
|
||||
"Μάιος",
|
||||
"Ιούνιος",
|
||||
"Ιούλιος",
|
||||
"Αύγουστος",
|
||||
"Σεπτέμβριος",
|
||||
"Οκτώβριος",
|
||||
"Νοέμβριος",
|
||||
"Δεκέμβριος"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Ιαν",
|
||||
"Φευ",
|
||||
"Μαρ",
|
||||
"Απρ",
|
||||
"Μάι",
|
||||
"Ιουν",
|
||||
"Ιουλ",
|
||||
"Αυγ",
|
||||
"Σεπ",
|
||||
"Οκτ",
|
||||
"Νοε",
|
||||
"Δεκ"
|
||||
],
|
||||
"days": [
|
||||
"Κυριακή",
|
||||
"Δευτέρα",
|
||||
"Τρίτη",
|
||||
"Τετάρτη",
|
||||
"Πέμπτη",
|
||||
"Παρασκευή",
|
||||
"Σάββατο"
|
||||
],
|
||||
"shortDays": ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Λήψη SVG",
|
||||
"exportToPNG": "Λήψη PNG",
|
||||
"exportToCSV": "Λήψη CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Επιλογή",
|
||||
"selectionZoom": "Μεγένθυση βάση επιλογής",
|
||||
"zoomIn": "Μεγένθυνση",
|
||||
"zoomOut": "Σμίκρυνση",
|
||||
"pan": "Μετατόπιση",
|
||||
"reset": "Επαναφορά μεγένθυνσης"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "es",
|
||||
"options": {
|
||||
"months": [
|
||||
"Enero",
|
||||
"Febrero",
|
||||
"Marzo",
|
||||
"Abril",
|
||||
"Mayo",
|
||||
"Junio",
|
||||
"Julio",
|
||||
"Agosto",
|
||||
"Septiembre",
|
||||
"Octubre",
|
||||
"Noviembre",
|
||||
"Diciembre"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Ene",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Abr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Ago",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dic"
|
||||
],
|
||||
"days": [
|
||||
"Domingo",
|
||||
"Lunes",
|
||||
"Martes",
|
||||
"Miércoles",
|
||||
"Jueves",
|
||||
"Viernes",
|
||||
"Sábado"
|
||||
],
|
||||
"shortDays": ["Dom", "Lun", "Mar", "Mie", "Jue", "Vie", "Sab"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Descargar SVG",
|
||||
"exportToPNG": "Descargar PNG",
|
||||
"exportToCSV": "Descargar CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Seleccionar",
|
||||
"selectionZoom": "Seleccionar Zoom",
|
||||
"zoomIn": "Aumentar",
|
||||
"zoomOut": "Disminuir",
|
||||
"pan": "Navegación",
|
||||
"reset": "Reiniciar Zoom"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "he",
|
||||
"options": {
|
||||
"months": [
|
||||
"ינואר",
|
||||
"פברואר",
|
||||
"מרץ",
|
||||
"אפריל",
|
||||
"מאי",
|
||||
"יוני",
|
||||
"יולי",
|
||||
"אוגוסט",
|
||||
"ספטמבר",
|
||||
"אוקטובר",
|
||||
"נובמבר",
|
||||
"דצמבר"
|
||||
],
|
||||
"shortMonths": [
|
||||
"ינו׳",
|
||||
"פבר׳",
|
||||
"מרץ",
|
||||
"אפר׳",
|
||||
"מאי",
|
||||
"יוני",
|
||||
"יולי",
|
||||
"אוג׳",
|
||||
"ספט׳",
|
||||
"אוק׳",
|
||||
"נוב׳",
|
||||
"דצמ׳"
|
||||
],
|
||||
"days": [
|
||||
"ראשון",
|
||||
"שני",
|
||||
"שלישי",
|
||||
"רביעי",
|
||||
"חמישי",
|
||||
"שישי",
|
||||
"שבת"
|
||||
],
|
||||
"shortDays": ["א׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "הורד SVG",
|
||||
"exportToPNG": "הורד PNG",
|
||||
"exportToCSV": "הורד CSV",
|
||||
"menu": "תפריט",
|
||||
"selection": "בחירה",
|
||||
"selectionZoom": "זום בחירה",
|
||||
"zoomIn": "הגדלה",
|
||||
"zoomOut": "הקטנה",
|
||||
"pan": "הזזה",
|
||||
"reset": "איפוס תצוגה"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "hi",
|
||||
"options": {
|
||||
"months": [
|
||||
"जनवरी",
|
||||
"फ़रवरी",
|
||||
"मार्च",
|
||||
"अप्रैल",
|
||||
"मई",
|
||||
"जून",
|
||||
"जुलाई",
|
||||
"अगस्त",
|
||||
"सितंबर",
|
||||
"अक्टूबर",
|
||||
"नवंबर",
|
||||
"दिसंबर"
|
||||
],
|
||||
"shortMonths": [
|
||||
"जनवरी",
|
||||
"फ़रवरी",
|
||||
"मार्च",
|
||||
"अप्रैल",
|
||||
"मई",
|
||||
"जून",
|
||||
"जुलाई",
|
||||
"अगस्त",
|
||||
"सितंबर",
|
||||
"अक्टूबर",
|
||||
"नवंबर",
|
||||
"दिसंबर"
|
||||
],
|
||||
"days": [
|
||||
"रविवार",
|
||||
"सोमवार",
|
||||
"मंगलवार",
|
||||
"बुधवार",
|
||||
"गुरुवार",
|
||||
"शुक्रवार",
|
||||
"शनिवार"
|
||||
],
|
||||
"shortDays": ["रवि", "सोम", "मंगल", "बुध", "गुरु", "शुक्र", "शनि"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "निर्यात SVG",
|
||||
"exportToPNG": "निर्यात PNG",
|
||||
"exportToCSV": "निर्यात CSV",
|
||||
"menu": "सूची",
|
||||
"selection": "चयन",
|
||||
"selectionZoom": "ज़ूम करना",
|
||||
"zoomIn": "ज़ूम इन",
|
||||
"zoomOut": "ज़ूम आउट",
|
||||
"pan": "पैनिंग",
|
||||
"reset": "फिर से कायम करना"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
{
|
||||
"name": "hu",
|
||||
"options": {
|
||||
"months": [
|
||||
"január",
|
||||
"február",
|
||||
"március",
|
||||
"április",
|
||||
"május",
|
||||
"június",
|
||||
"július",
|
||||
"augusztus",
|
||||
"szeptember",
|
||||
"október",
|
||||
"november",
|
||||
"december"
|
||||
],
|
||||
"shortMonths": [
|
||||
"jan",
|
||||
"feb",
|
||||
"mar",
|
||||
"ápr",
|
||||
"máj",
|
||||
"jún",
|
||||
"júl",
|
||||
"aug",
|
||||
"szept",
|
||||
"okt",
|
||||
"nov",
|
||||
"dec"
|
||||
],
|
||||
"days": [
|
||||
"hétfő",
|
||||
"kedd",
|
||||
"szerda",
|
||||
"csütörtök",
|
||||
"péntek",
|
||||
"szombat",
|
||||
"vasárnap"
|
||||
],
|
||||
"shortDays": [
|
||||
"H",
|
||||
"K",
|
||||
"Sze",
|
||||
"Cs",
|
||||
"P",
|
||||
"Szo",
|
||||
"V"
|
||||
],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Exportálás SVG-be",
|
||||
"exportToPNG": "Exportálás PNG-be",
|
||||
"exportToCSV": "Exportálás CSV-be",
|
||||
"menu": "Fő ajánlat",
|
||||
"download": "SVG letöltése",
|
||||
"selection": "Kiválasztás",
|
||||
"selectionZoom": "Nagyító kiválasztása",
|
||||
"zoomIn": "Nagyítás",
|
||||
"zoomOut": "Kicsinyítés",
|
||||
"pan": "Képcsúsztatás",
|
||||
"reset": "Nagyító visszaállítása"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "hy",
|
||||
"options": {
|
||||
"months": [
|
||||
"Հունվար",
|
||||
"Փետրվար",
|
||||
"Մարտ",
|
||||
"Ապրիլ",
|
||||
"Մայիս",
|
||||
"Հունիս",
|
||||
"Հուլիս",
|
||||
"Օգոստոս",
|
||||
"Սեպտեմբեր",
|
||||
"Հոկտեմբեր",
|
||||
"Նոյեմբեր",
|
||||
"Դեկտեմբեր"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Հնվ",
|
||||
"Փտվ",
|
||||
"Մրտ",
|
||||
"Ապր",
|
||||
"Մյս",
|
||||
"Հնս",
|
||||
"Հլիս",
|
||||
"Օգս",
|
||||
"Սեպ",
|
||||
"Հոկ",
|
||||
"Նոյ",
|
||||
"Դեկ"
|
||||
],
|
||||
"days": [
|
||||
"Կիրակի",
|
||||
"Երկուշաբթի",
|
||||
"Երեքշաբթի",
|
||||
"Չորեքշաբթի",
|
||||
"Հինգշաբթի",
|
||||
"Ուրբաթ",
|
||||
"Շաբաթ"
|
||||
],
|
||||
"shortDays": ["Կիր", "Երկ", "Երք", "Չրք", "Հնգ", "Ուրբ", "Շբթ"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Բեռնել SVG",
|
||||
"exportToPNG": "Բեռնել PNG",
|
||||
"exportToCSV": "Բեռնել CSV",
|
||||
"menu": "Մենյու",
|
||||
"selection": "Ընտրված",
|
||||
"selectionZoom": "Ընտրված հատվածի խոշորացում",
|
||||
"zoomIn": "Խոշորացնել",
|
||||
"zoomOut": "Մանրացնել",
|
||||
"pan": "Տեղափոխում",
|
||||
"reset": "Բերել սկզբնական վիճակի"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "it",
|
||||
"options": {
|
||||
"months": [
|
||||
"Gennaio",
|
||||
"Febbraio",
|
||||
"Marzo",
|
||||
"Aprile",
|
||||
"Maggio",
|
||||
"Giugno",
|
||||
"Luglio",
|
||||
"Agosto",
|
||||
"Settembre",
|
||||
"Ottobre",
|
||||
"Novembre",
|
||||
"Dicembre"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Gen",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Mag",
|
||||
"Giu",
|
||||
"Lug",
|
||||
"Ago",
|
||||
"Set",
|
||||
"Ott",
|
||||
"Nov",
|
||||
"Dic"
|
||||
],
|
||||
"days": [
|
||||
"Domenica",
|
||||
"Lunedì",
|
||||
"Martedì",
|
||||
"Mercoledì",
|
||||
"Giovedì",
|
||||
"Venerdì",
|
||||
"Sabato"
|
||||
],
|
||||
"shortDays": ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Scarica SVG",
|
||||
"exportToPNG": "Scarica PNG",
|
||||
"exportToCSV": "Scarica CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Selezione",
|
||||
"selectionZoom": "Seleziona Zoom",
|
||||
"zoomIn": "Zoom In",
|
||||
"zoomOut": "Zoom Out",
|
||||
"pan": "Sposta",
|
||||
"reset": "Reimposta Zoom"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "ja",
|
||||
"options": {
|
||||
"months": [
|
||||
"1月",
|
||||
"2月",
|
||||
"3月",
|
||||
"4月",
|
||||
"5月",
|
||||
"6月",
|
||||
"7月",
|
||||
"8月",
|
||||
"9月",
|
||||
"10月",
|
||||
"11月",
|
||||
"12月"
|
||||
],
|
||||
"shortMonths": [
|
||||
"1月",
|
||||
"2月",
|
||||
"3月",
|
||||
"4月",
|
||||
"5月",
|
||||
"6月",
|
||||
"7月",
|
||||
"8月",
|
||||
"9月",
|
||||
"10月",
|
||||
"11月",
|
||||
"12月"
|
||||
],
|
||||
"days": [
|
||||
"日曜日",
|
||||
"月曜日",
|
||||
"火曜日",
|
||||
"水曜日",
|
||||
"木曜日",
|
||||
"金曜日",
|
||||
"土曜日"
|
||||
],
|
||||
"shortDays": ["日", "月", "火", "水", "木", "金", "土"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "SVGダウンロード",
|
||||
"exportToPNG": "PNGダウンロード",
|
||||
"exportToCSV": "CSVダウンロード",
|
||||
"menu": "メニュー",
|
||||
"selection": "選択",
|
||||
"selectionZoom": "選択ズーム",
|
||||
"zoomIn": "拡大",
|
||||
"zoomOut": "縮小",
|
||||
"pan": "パン",
|
||||
"reset": "ズームリセット"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "ka",
|
||||
"options": {
|
||||
"months": [
|
||||
"იანვარი",
|
||||
"თებერვალი",
|
||||
"მარტი",
|
||||
"აპრილი",
|
||||
"მაისი",
|
||||
"ივნისი",
|
||||
"ივლისი",
|
||||
"აგვისტო",
|
||||
"სექტემბერი",
|
||||
"ოქტომბერი",
|
||||
"ნოემბერი",
|
||||
"დეკემბერი"
|
||||
],
|
||||
"shortMonths": [
|
||||
"იან",
|
||||
"თებ",
|
||||
"მარ",
|
||||
"აპრ",
|
||||
"მაი",
|
||||
"ივნ",
|
||||
"ივლ",
|
||||
"აგვ",
|
||||
"სექ",
|
||||
"ოქტ",
|
||||
"ნოე",
|
||||
"დეკ"
|
||||
],
|
||||
"days": [
|
||||
"კვირა",
|
||||
"ორშაბათი",
|
||||
"სამშაბათი",
|
||||
"ოთხშაბათი",
|
||||
"ხუთშაბათი",
|
||||
"პარასკევი",
|
||||
"შაბათი"
|
||||
],
|
||||
"shortDays": ["კვი", "ორშ", "სამ", "ოთხ", "ხუთ", "პარ", "შაბ"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "გადმოქაჩე SVG",
|
||||
"exportToPNG": "გადმოქაჩე PNG",
|
||||
"exportToCSV": "გადმოქაჩე CSV",
|
||||
"menu": "მენიუ",
|
||||
"selection": "არჩევა",
|
||||
"selectionZoom": "არჩეულის გადიდება",
|
||||
"zoomIn": "გადიდება",
|
||||
"zoomOut": "დაპატარაება",
|
||||
"pan": "გადაჩოჩება",
|
||||
"reset": "გადიდების გაუქმება"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "ko",
|
||||
"options": {
|
||||
"months": [
|
||||
"1월",
|
||||
"2월",
|
||||
"3월",
|
||||
"4월",
|
||||
"5월",
|
||||
"6월",
|
||||
"7월",
|
||||
"8월",
|
||||
"9월",
|
||||
"10월",
|
||||
"11월",
|
||||
"12월"
|
||||
],
|
||||
"shortMonths": [
|
||||
"1월",
|
||||
"2월",
|
||||
"3월",
|
||||
"4월",
|
||||
"5월",
|
||||
"6월",
|
||||
"7월",
|
||||
"8월",
|
||||
"9월",
|
||||
"10월",
|
||||
"11월",
|
||||
"12월"
|
||||
],
|
||||
"days": [
|
||||
"일요일",
|
||||
"월요일",
|
||||
"화요일",
|
||||
"수요일",
|
||||
"목요일",
|
||||
"금요일",
|
||||
"토요일"
|
||||
],
|
||||
"shortDays": ["일", "월", "화", "수", "목", "금", "토"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "SVG 다운로드",
|
||||
"exportToPNG": "PNG 다운로드",
|
||||
"exportToCSV": "CSV 다운로드",
|
||||
"menu": "메뉴",
|
||||
"selection": "선택",
|
||||
"selectionZoom": "선택영역 확대",
|
||||
"zoomIn": "확대",
|
||||
"zoomOut": "축소",
|
||||
"pan": "패닝",
|
||||
"reset": "원래대로"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "nb",
|
||||
"options": {
|
||||
"months": [
|
||||
"Januar",
|
||||
"Februar",
|
||||
"Mars",
|
||||
"April",
|
||||
"Mai",
|
||||
"Juni",
|
||||
"Juli",
|
||||
"August",
|
||||
"September",
|
||||
"Oktober",
|
||||
"November",
|
||||
"Desember"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Mai",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Des"
|
||||
],
|
||||
"days": [
|
||||
"Søndag",
|
||||
"Mandag",
|
||||
"Tirsdag",
|
||||
"Onsdag",
|
||||
"Torsdag",
|
||||
"Fredag",
|
||||
"Lørdag"
|
||||
],
|
||||
"shortDays": ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Last ned SVG",
|
||||
"exportToPNG": "Last ned PNG",
|
||||
"exportToCSV": "Last ned CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Velg",
|
||||
"selectionZoom": "Zoom: Velg",
|
||||
"zoomIn": "Zoome inn",
|
||||
"zoomOut": "Zoome ut",
|
||||
"pan": "Skyving",
|
||||
"reset": "Start på nytt"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "ru",
|
||||
"options": {
|
||||
"months": [
|
||||
"Январь",
|
||||
"Февраль",
|
||||
"Март",
|
||||
"Апрель",
|
||||
"Май",
|
||||
"Июнь",
|
||||
"Июль",
|
||||
"Август",
|
||||
"Сентябрь",
|
||||
"Октябрь",
|
||||
"Ноябрь",
|
||||
"Декабрь"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Янв",
|
||||
"Фев",
|
||||
"Мар",
|
||||
"Апр",
|
||||
"Май",
|
||||
"Июн",
|
||||
"Июл",
|
||||
"Авг",
|
||||
"Сен",
|
||||
"Окт",
|
||||
"Ноя",
|
||||
"Дек"
|
||||
],
|
||||
"days": [
|
||||
"Воскресенье",
|
||||
"Понедельник",
|
||||
"Вторник",
|
||||
"Среда",
|
||||
"Четверг",
|
||||
"Пятница",
|
||||
"Суббота"
|
||||
],
|
||||
"shortDays": ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Сохранить SVG",
|
||||
"exportToPNG": "Сохранить PNG",
|
||||
"exportToCSV": "Сохранить CSV",
|
||||
"menu": "Меню",
|
||||
"selection": "Выбор",
|
||||
"selectionZoom": "Выбор с увеличением",
|
||||
"zoomIn": "Увеличить",
|
||||
"zoomOut": "Уменьшить",
|
||||
"pan": "Перемещение",
|
||||
"reset": "Сбросить увеличение"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "se",
|
||||
"options": {
|
||||
"months": [
|
||||
"Januari",
|
||||
"Februari",
|
||||
"Mars",
|
||||
"April",
|
||||
"Maj",
|
||||
"Juni",
|
||||
"Juli",
|
||||
"Augusti",
|
||||
"September",
|
||||
"Oktober",
|
||||
"November",
|
||||
"December"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Maj",
|
||||
"Juni",
|
||||
"Juli",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Dec"
|
||||
],
|
||||
"days": [
|
||||
"Söndag",
|
||||
"Måndag",
|
||||
"Tisdag",
|
||||
"Onsdag",
|
||||
"Torsdag",
|
||||
"Fredag",
|
||||
"Lördag"
|
||||
],
|
||||
"shortDays": ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Ladda SVG",
|
||||
"exportToPNG": "Ladda PNG",
|
||||
"exportToCSV": "Ladda CSV",
|
||||
"menu": "Meny",
|
||||
"selection": "Selektion",
|
||||
"selectionZoom": "Val av zoom",
|
||||
"zoomIn": "Zooma in",
|
||||
"zoomOut": "Zooma ut",
|
||||
"pan": "Panorering",
|
||||
"reset": "Återställ zoomning"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "sk",
|
||||
"options": {
|
||||
"months": [
|
||||
"Január",
|
||||
"Február",
|
||||
"Marec",
|
||||
"Apríl",
|
||||
"Máj",
|
||||
"Jún",
|
||||
"Júl",
|
||||
"August",
|
||||
"September",
|
||||
"Október",
|
||||
"November",
|
||||
"December"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"Máj",
|
||||
"Jún",
|
||||
"Júl",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Okt",
|
||||
"Nov",
|
||||
"Dec"
|
||||
],
|
||||
"days": [
|
||||
"Nedeľa",
|
||||
"Pondelok",
|
||||
"Utorok",
|
||||
"Streda",
|
||||
"Štvrtok",
|
||||
"Piatok",
|
||||
"Sobota"
|
||||
],
|
||||
"shortDays": ["Ne", "Po", "Ut", "St", "Št", "Pi", "So"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Stiahnuť SVG",
|
||||
"exportToPNG": "Stiahnuť PNG",
|
||||
"exportToCSV": "Stiahnuť CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Vyberanie",
|
||||
"selectionZoom": "Zoom: Vyberanie",
|
||||
"zoomIn": "Zoom: Priblížiť",
|
||||
"zoomOut": "Zoom: Vzdialiť",
|
||||
"pan": "Presúvanie",
|
||||
"reset": "Resetovať"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "sq",
|
||||
"options": {
|
||||
"months": [
|
||||
"Janar",
|
||||
"Shkurt",
|
||||
"Mars",
|
||||
"Prill",
|
||||
"Maj",
|
||||
"Qershor",
|
||||
"Korrik",
|
||||
"Gusht",
|
||||
"Shtator",
|
||||
"Tetor",
|
||||
"Nëntor",
|
||||
"Dhjetor"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Jan",
|
||||
"Shk",
|
||||
"Mar",
|
||||
"Pr",
|
||||
"Maj",
|
||||
"Qer",
|
||||
"Korr",
|
||||
"Gush",
|
||||
"Sht",
|
||||
"Tet",
|
||||
"Nën",
|
||||
"Dhj"
|
||||
],
|
||||
"days": [
|
||||
"e Dielë",
|
||||
"e Hënë",
|
||||
"e Martë",
|
||||
"e Mërkurë",
|
||||
"e Enjte",
|
||||
"e Premte",
|
||||
"e Shtunë"
|
||||
],
|
||||
"shortDays": ["Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Sht"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Shkarko SVG",
|
||||
"exportToPNG": "Shkarko PNG",
|
||||
"exportToCSV": "Shkarko CSV",
|
||||
"menu": "Menu",
|
||||
"selection": "Seleksiono",
|
||||
"selectionZoom": "Seleksiono Zmadhim",
|
||||
"zoomIn": "Zmadho",
|
||||
"zoomOut": "Zvogëlo",
|
||||
"pan": "Spostoje",
|
||||
"reset": "Rikthe dimensionin"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "th",
|
||||
"options": {
|
||||
"months": [
|
||||
"มกราคม",
|
||||
"กุมภาพันธ์",
|
||||
"มีนาคม",
|
||||
"เมษายน",
|
||||
"พฤษภาคม",
|
||||
"มิถุนายน",
|
||||
"กรกฎาคม",
|
||||
"สิงหาคม",
|
||||
"กันยายน",
|
||||
"ตุลาคม",
|
||||
"พฤศจิกายน",
|
||||
"ธันวาคม"
|
||||
],
|
||||
"shortMonths": [
|
||||
"ม.ค.",
|
||||
"ก.พ.",
|
||||
"มี.ค.",
|
||||
"เม.ย.",
|
||||
"พ.ค.",
|
||||
"มิ.ย.",
|
||||
"ก.ค.",
|
||||
"ส.ค.",
|
||||
"ก.ย.",
|
||||
"ต.ค.",
|
||||
"พ.ย.",
|
||||
"ธ.ค."
|
||||
],
|
||||
"days": [
|
||||
"อาทิตย์",
|
||||
"จันทร์",
|
||||
"อังคาร",
|
||||
"พุธ",
|
||||
"พฤหัสบดี",
|
||||
"ศุกร์",
|
||||
"เสาร์"
|
||||
],
|
||||
"shortDays": ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "ดาวน์โหลด SVG",
|
||||
"exportToPNG": "ดาวน์โหลด PNG",
|
||||
"exportToCSV": "ดาวน์โหลด CSV",
|
||||
"menu": "เมนู",
|
||||
"selection": "เลือก",
|
||||
"selectionZoom": "เลือกจุดที่จะซูม",
|
||||
"zoomIn": "ซูมเข้า",
|
||||
"zoomOut": "ซูมออก",
|
||||
"pan": "ปรากฎว่า",
|
||||
"reset": "รีเซ็ตการซูม"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "tr",
|
||||
"options": {
|
||||
"months": [
|
||||
"Ocak",
|
||||
"Şubat",
|
||||
"Mart",
|
||||
"Nisan",
|
||||
"Mayıs",
|
||||
"Haziran",
|
||||
"Temmuz",
|
||||
"Ağustos",
|
||||
"Eylül",
|
||||
"Ekim",
|
||||
"Kasım",
|
||||
"Aralık"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Oca",
|
||||
"Şub",
|
||||
"Mar",
|
||||
"Nis",
|
||||
"May",
|
||||
"Haz",
|
||||
"Tem",
|
||||
"Ağu",
|
||||
"Eyl",
|
||||
"Eki",
|
||||
"Kas",
|
||||
"Ara"
|
||||
],
|
||||
"days": [
|
||||
"Pazar",
|
||||
"Pazartesi",
|
||||
"Salı",
|
||||
"Çarşamba",
|
||||
"Perşembe",
|
||||
"Cuma",
|
||||
"Cumartesi"
|
||||
],
|
||||
"shortDays": ["Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "SVG İndir",
|
||||
"exportToPNG": "PNG İndir",
|
||||
"exportToCSV": "CSV İndir",
|
||||
"menu": "Menü",
|
||||
"selection": "Seçim",
|
||||
"selectionZoom": "Seçim Yakınlaştır",
|
||||
"zoomIn": "Yakınlaştır",
|
||||
"zoomOut": "Uzaklaştır",
|
||||
"pan": "Kaydır",
|
||||
"reset": "Yakınlaştırmayı Sıfırla"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "ua",
|
||||
"options": {
|
||||
"months": [
|
||||
"Січень",
|
||||
"Лютий",
|
||||
"Березень",
|
||||
"Квітень",
|
||||
"Травень",
|
||||
"Червень",
|
||||
"Липень",
|
||||
"Серпень",
|
||||
"Вересень",
|
||||
"Жовтень",
|
||||
"Листопад",
|
||||
"Грудень"
|
||||
],
|
||||
"shortMonths": [
|
||||
"Січ",
|
||||
"Лют",
|
||||
"Бер",
|
||||
"Кві",
|
||||
"Тра",
|
||||
"Чер",
|
||||
"Лип",
|
||||
"Сер",
|
||||
"Вер",
|
||||
"Жов",
|
||||
"Лис",
|
||||
"Гру"
|
||||
],
|
||||
"days": [
|
||||
"Неділя",
|
||||
"Понеділок",
|
||||
"Вівторок",
|
||||
"Середа",
|
||||
"Четвер",
|
||||
"П'ятниця",
|
||||
"Субота"
|
||||
],
|
||||
"shortDays": ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "Зберегти SVG",
|
||||
"exportToPNG": "Зберегти PNG",
|
||||
"exportToCSV": "Зберегти CSV",
|
||||
"menu": "Меню",
|
||||
"selection": "Вибір",
|
||||
"selectionZoom": "Вибір із збільшенням",
|
||||
"zoomIn": "Збільшити",
|
||||
"zoomOut": "Зменшити",
|
||||
"pan": "Переміщення",
|
||||
"reset": "Скинути збільшення"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "zh-cn",
|
||||
"options": {
|
||||
"months": [
|
||||
"一月",
|
||||
"二月",
|
||||
"三月",
|
||||
"四月",
|
||||
"五月",
|
||||
"六月",
|
||||
"七月",
|
||||
"八月",
|
||||
"九月",
|
||||
"十月",
|
||||
"十一月",
|
||||
"十二月"
|
||||
],
|
||||
"shortMonths": [
|
||||
"一月",
|
||||
"二月",
|
||||
"三月",
|
||||
"四月",
|
||||
"五月",
|
||||
"六月",
|
||||
"七月",
|
||||
"八月",
|
||||
"九月",
|
||||
"十月",
|
||||
"十一月",
|
||||
"十二月"
|
||||
],
|
||||
"days": [
|
||||
"星期天",
|
||||
"星期一",
|
||||
"星期二",
|
||||
"星期三",
|
||||
"星期四",
|
||||
"星期五",
|
||||
"星期六"
|
||||
],
|
||||
"shortDays": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "下载 SVG",
|
||||
"exportToPNG": "下载 PNG",
|
||||
"exportToCSV": "下载 CSV",
|
||||
"menu": "菜单",
|
||||
"selection": "选择",
|
||||
"selectionZoom": "选择缩放",
|
||||
"zoomIn": "放大",
|
||||
"zoomOut": "缩小",
|
||||
"pan": "平移",
|
||||
"reset": "重置缩放"
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u062f\u002e\u0625\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u062f\u002e\u0628\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["\u200f\u0046\u0064\u006a ", ""],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"decimal": "\u002c",
|
||||
"thousands": "\u002e",
|
||||
"grouping": [3],
|
||||
"currency": ["\u062f\u002e\u062c\u002e ", ""]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u062c\u002e\u0645\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"decimal": "\u002e",
|
||||
"thousands": "\u002c",
|
||||
"grouping": [3],
|
||||
"currency": ["\u062f\u002e\u0645\u002e ", ""]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u062f\u002e\u0639\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u062f\u002e\u0623\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u0641\u002e\u062c\u002e\u0642\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u062f\u002e\u0643\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u0644\u002e\u0644\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"decimal": "\u002c",
|
||||
"thousands": "\u002e",
|
||||
"grouping": [3],
|
||||
"currency": ["\u062f\u002e\u0644\u002e ", ""]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"decimal": "\u002c",
|
||||
"thousands": "\u002e",
|
||||
"grouping": [3],
|
||||
"currency": ["\u062f\u002e\u0645\u002e ", ""]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u0623\u002e\u0645\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u0631\u002e\u0639\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u0631\u002e\u0642\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u0631\u002e\u0633\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u062c\u002e\u0633\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u0644\u002e\u0633\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["\u200f\u0046\u0043\u0046\u0041 ", ""],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"decimal": "\u002c",
|
||||
"thousands": "\u002e",
|
||||
"grouping": [3],
|
||||
"currency": ["\u062f\u002e\u062a\u002e ", ""]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"decimal": "\u066b",
|
||||
"thousands": "\u066c",
|
||||
"grouping": [3],
|
||||
"currency": ["", " \u0631\u002e\u0649\u002e"],
|
||||
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"decimal": ",",
|
||||
"thousands": "\u00a0",
|
||||
"grouping": [3],
|
||||
"currency": ["", "\u00a0Kč"]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"decimal": ".",
|
||||
"thousands": ",",
|
||||
"grouping": [3, 2, 2, 2, 2, 2, 2, 2, 2, 2],
|
||||
"currency": ["₹", ""]
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue