moved js files
This commit is contained in:
parent
36a537a79b
commit
28931d2887
|
@ -56,7 +56,7 @@ apexchart <- function(ax_opts = list(), auto_update = TRUE, width = NULL, height
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
# dput(tools::file_path_sans_ext(list.files("inst/htmlwidgets/lib/apexcharts-locales/")))
|
# dput(tools::file_path_sans_ext(list.files("inst/htmlwidgets/assets/apexcharts-locales/")))
|
||||||
#' @importFrom jsonlite fromJSON
|
#' @importFrom jsonlite fromJSON
|
||||||
add_locale_apex <- function(widget) {
|
add_locale_apex <- function(widget) {
|
||||||
if (!is.null(widget$x$ax_opts$chart$defaultLocale)) {
|
if (!is.null(widget$x$ax_opts$chart$defaultLocale)) {
|
||||||
|
@ -75,7 +75,7 @@ add_locale_apex <- function(widget) {
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
path <- system.file(
|
path <- system.file(
|
||||||
file.path("htmlwidgets/lib/apexcharts-locales", paste0(defaultLocale, ".json")),
|
file.path("htmlwidgets/assets/apexcharts-locales", paste0(defaultLocale, ".json")),
|
||||||
package = "apexcharter"
|
package = "apexcharter"
|
||||||
)
|
)
|
||||||
locale <- jsonlite::fromJSON(txt = path)
|
locale <- jsonlite::fromJSON(txt = path)
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#' @example examples/format.R
|
#' @example examples/format.R
|
||||||
format_num <- function(format, prefix = "", suffix = "", locale = "en-US") {
|
format_num <- function(format, prefix = "", suffix = "", locale = "en-US") {
|
||||||
check_locale_d3(locale)
|
check_locale_d3(locale)
|
||||||
path <- system.file(file.path("htmlwidgets/lib/d3-format/locale", paste0(locale, ".json")), package = "apexcharter")
|
path <- system.file(file.path("htmlwidgets/assets/d3-format/locale", paste0(locale, ".json")), package = "apexcharter")
|
||||||
if (path != "") {
|
if (path != "") {
|
||||||
locale <- paste(readLines(con = path, encoding = "UTF-8"), collapse = "")
|
locale <- paste(readLines(con = path, encoding = "UTF-8"), collapse = "")
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ format_num <- function(format, prefix = "", suffix = "", locale = "en-US") {
|
||||||
|
|
||||||
|
|
||||||
check_locale_d3 <- function(x) {
|
check_locale_d3 <- function(x) {
|
||||||
json <- list.files(system.file("htmlwidgets/lib/d3-format/locale", package = "apexcharter"))
|
json <- list.files(system.file("htmlwidgets/assets/d3-format/locale", package = "apexcharter"))
|
||||||
njson <- gsub("\\.json", "", json)
|
njson <- gsub("\\.json", "", json)
|
||||||
if (!x %in% njson) {
|
if (!x %in% njson) {
|
||||||
stop(paste(
|
stop(paste(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: apexcharts
|
- name: apexcharts
|
||||||
version: 3.26.2
|
version: 3.26.2
|
||||||
src: htmlwidgets/lib/apexcharts-3.26
|
src: htmlwidgets/assets/apexcharts-3.26
|
||||||
script: apexcharts.min.js
|
script: apexcharts.min.js
|
||||||
- name: apexcharter-css
|
- name: apexcharter-css
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
|
@ -9,6 +9,6 @@ dependencies:
|
||||||
stylesheet: apexcharter.css
|
stylesheet: apexcharter.css
|
||||||
- name: d3-format
|
- name: d3-format
|
||||||
version: 1.4.2
|
version: 1.4.2
|
||||||
src: htmlwidgets/lib/d3-format
|
src: htmlwidgets/assets/d3-format
|
||||||
script: d3-format.min.js
|
script: d3-format.min.js
|
||||||
all_files: false
|
all_files: false
|
||||||
|
|
Loading…
Reference in New Issue