|
174 | 174 | const hAxis = options.hAxis ??= {}; |
175 | 175 | const vAxis = options.vAxis ??= {}; |
176 | 176 |
|
177 | | - const gridlineColor = getColorOrDefault(globalOptions['gridlineColor'], "#aaa"); |
| 177 | + const showGridlines = isTrue(globalOptions['show-grid-lines']); |
| 178 | + const gridlineColor = getColorOrDefault(globalOptions['gridlineColor'], undefined); |
178 | 179 |
|
179 | | - const minorGridlineColor = getColorOrDefault(globalOptions['minorGridlineColor'], "#ddd"); |
| 180 | + const minorGridlineColor = getColorOrDefault(globalOptions['minorGridlineColor'], undefined); |
180 | 181 |
|
181 | 182 | const minorGridlineMinspacing = toFixnum(globalOptions['minorGridlineMinspacing']) |
182 | 183 |
|
183 | | - hAxis.gridlines = {color: gridlineColor}; |
184 | | - vAxis.gridlines = {color: gridlineColor}; |
| 184 | + hAxis.gridlines = {show: showGridlines, color: gridlineColor}; |
| 185 | + vAxis.gridlines = {show: showGridlines, color: gridlineColor}; |
185 | 186 |
|
186 | 187 | cases(RUNTIME.ffi.isOption, 'Option', globalOptions['gridlineMinspacing'], { |
187 | 188 | none: function () { |
|
2684 | 2685 | // NOTE: For the axes, we're going to want to put the bar lines at the zeros |
2685 | 2686 | // of the domains, rather than the edges of the chart |
2686 | 2687 | const axes = [ |
| 2688 | + { orient: 'bottom', scale: `xscale`, zindex: 0, |
| 2689 | + grid: gridlines.hAxis.gridlines.show, gridColor: gridlines.hAxis.gridlines.color, |
| 2690 | + domain: false, tickOpacity: 0, labelOpacity: 0 }, |
2687 | 2691 | { orient: 'bottom', scale: `xscale`, zindex: 1, title: xAxisLabel, |
2688 | 2692 | domain: false, tickOpacity: 0, labelOpacity: 0 }, |
2689 | 2693 | { orient: 'bottom', scale: `xscale`, zindex: 1, |
|
2692 | 2696 | signal: `clamp(0, domain('yscale')[0], domain('yscale')[1])`, |
2693 | 2697 | offset: { signal: 'height', mult: -1 } } |
2694 | 2698 | }, |
| 2699 | + { orient: 'left', scale: `yscale`, zindex: 0, |
| 2700 | + grid: gridlines.vAxis.gridlines.show, gridColor: gridlines.vAxis.gridlines.color, |
| 2701 | + domain: false, tickOpacity: 0, labelOpacity: 0 }, |
2695 | 2702 | { orient: 'left', scale: `yscale`, zindex: 1, title: yAxisLabel, |
2696 | 2703 | domain: false, tickOpacity: 0, labelOpacity: 0 }, |
2697 | 2704 | { orient: 'left', scale: `yscale`, zindex: 1, |
|
0 commit comments