Open Blackbaud-JeffreyAaron opened 4 years ago
I have a similar issue when showGridLines is set to true and showXAxis and showYAxis are set to false.
I have the same issue with version 19.1.0. Attaching ss below:
Demo link - https://stackblitz.com/edit/swimlane-line-chart-dbodof?embed=1&file=app/app.component.ts
Describe the bug When showGridLines is set to false both x and y axes are also hidden.
To Reproduce Create a chart and set xAxis and yAxis to true and showGridLines to false. Notice that grid lines are hidden as expected, though the x and y axes are also hidden.
Expected behavior Grid lines should be hidden and axes should be visible.
Screenshots
Demo https://stackblitz.com/edit/angular-hide-grid-lines-hides-axes
ngx-charts version 14.0.0
I am using angular v9.1.12, though this issue is reproducible in angular 10 as well.
Additional context Line 34 of x-axis-ticks.component.ts and line 43 of y-axis-ticks.component.ts hide all lines, including both axes, when showGridLines is set to false. I will submit a PR to add a showAxis input property to each of these components to show the axis when grid lines are hidden.
https://github.com/swimlane/ngx-charts/blob/master/projects/swimlane/ngx-charts/src/lib/common/axes/x-axis-ticks.component.ts https://github.com/swimlane/ngx-charts/blob/master/projects/swimlane/ngx-charts/src/lib/common/axes/y-axis-ticks.component.ts