Skip to content

Commit

Permalink
ignore drawAxis on y2 if there’s no y2 axis
Browse files Browse the repository at this point in the history
fixes tests/unboxed-spark
  • Loading branch information
mirabilos committed Feb 16, 2023
1 parent 1655f36 commit 046bdec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Allow ES6-importing the extras (#848) (#989) (#1009)
- Fix broken zoom also in the drawing test (same as #611/#953)
- Resetting `panEdgeFraction` now works
- Fix tests/unboxed-spark regression caused by PR #936

## Other user-visible changes
- Fix issue #611 in the drawing demo gallery (#953)
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ axes.prototype.willDrawChart = function(e) {

const that = this;

if (g.getOptionForAxis('drawAxis', 'y') || g.getOptionForAxis('drawAxis', 'y2')) {
if (g.getOptionForAxis('drawAxis', 'y') ||
(g.numAxes() == 2 && g.getOptionForAxis('drawAxis', 'y2'))) {
if (layout.yticks && layout.yticks.length > 0) {
var num_axes = g.numAxes();
var getOptions = [makeOptionGetter('y'), makeOptionGetter('y2')];
Expand Down

0 comments on commit 046bdec

Please sign in to comment.