Skip to content

Commit c454d5e

Browse files
committed
Fix subsetting bug of minor ticks on x-axis
When reChart is called to draw subset series, minor ticks on xycoords$x do not change with the subset sereis. Fix xycoords$x to be xycoords$x[1:NROW(xsubset)] in the x-axis expression.
1 parent 21aae4f commit c454d5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/chartSeries.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ function(x,
540540

541541
# change minor ticks to be downward
542542
exp <- expression(if (NROW(xdata[xsubset]) < 400) {
543-
axis(1, at = xycoords$x, labels = FALSE, col = theme$grid2,
543+
axis(1, at = xycoords$x[1:NROW(xsubset)], labels = FALSE, col = theme$grid2,
544544
col.axis = theme$grid2, tcl = -0.4)
545545
})
546546
exp <- structure(exp, frame = 1)

0 commit comments

Comments
 (0)