Skip to content

Commit

Permalink
Fix subsetting bug of minor ticks on x-axis
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
erichung0404 committed Aug 3, 2016
1 parent 21aae4f commit c454d5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/chartSeries.R
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ function(x,

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

0 comments on commit c454d5e

Please sign in to comment.