Skip to content

Commit 21aae4f

Browse files
committed
Translate xsubset into length of the series
To coordinate with addPoints(), when x is specified by numeric vector and without subsetting the intersection of x and the index of series will be FALSE because xsubset is always "". It should be the index of the raw series, namely, 1:NROW(x), which is also the original setting in chartSeries.
1 parent 5623fa2 commit 21aae4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/chartSeries.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ function(x,
402402
sub.index <- index(do.call(subsetvec[1],list(x,subset.n)))
403403
xsubset <- which(index(x) %in% sub.index)
404404
} else xsubset <- which(index(x) %in% index(x[subset]))
405-
} else xsubset <- ""
405+
} else xsubset <- 1:NROW(x)
406406

407407
xdata <- x
408408
x <- x[xsubset]

0 commit comments

Comments
 (0)