Skip to content

Commit

Permalink
fix ebars
Browse files Browse the repository at this point in the history
  • Loading branch information
helgasoft committed Sep 18, 2023
1 parent 0f463ba commit 2b80165
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/echarty.R
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ ecr.ebars <- function(wt, encode=list(x=1, y=c(2,3,4)), hwidth=6, ...) {
cntr <- function(x, typ) {
if (length(grep(typ, x))>0) {
nme <- if (!is.null(args$name)) args$name else if (is.null(x$name)) wt$x$opts$yAxis$name else x$name
ds <- if (is.null(x$datasetIndex)) 0 else x$datasetIndex
ds <- if (is.null(x$datasetIndex)) 1 else x$datasetIndex
dm <- if (is.null(x$dimensions)) NULL else x$dimensions
dd <- if (is.null(x['data']$data)) NULL else x['data']$data
list(nm=nme, ds=ds, dd=dd, dm=dm)
Expand All @@ -857,7 +857,7 @@ ecr.ebars <- function(wt, encode=list(x=1, y=c(2,3,4)), hwidth=6, ...) {
# convert encode to numerical if character
if (is.character(out)) {
if (is.null(liss$dm)) { # get dims from dataset
ds <- wt$x$opts$dataset[[liss$ds +1]]
ds <- wt$x$opts$dataset[[liss$ds]]
if (!is.null(ds)) {
if (!is.null(ds$dimensions))
out <- which(ds$dimensions %in% out)
Expand Down
2 changes: 1 addition & 1 deletion inst/js/renderers.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

function riErrBars(params, api) {
const group = { type: 'group', children: [] };
chart = get_e_charts(hwid);
chart = get_e_charts(echwid);
halfWidth = api.style().lineDashOffset;
let encode = params.encode;
isHor = encode['x'].length > encode['y'].length;
Expand Down

0 comments on commit 2b80165

Please sign in to comment.