SwiftUICharts icon indicating copy to clipboard operation
SwiftUICharts copied to clipboard

How to remove the additional centre y-axis line?

Open mlawlerau opened this issue 2 years ago • 6 comments

SwiftUICharts seems to always add x and y axis centre markers regardless of configuration of x or y GridStyle. When my charts have an odd number of grid lines then this falls on a desired gridline so no problem. But when my charts need to have an even number of gridlines due to nice axis scaling, the additional y-axis centre line looks out of place. Any way to stop this line from appearing?

mlawlerau avatar Jul 25 '23 02:07 mlawlerau

I'm looking for the same, how to remove the auto-added y-axis middle line, it's pretty annoying

The line inside the red box is auto added by the lib, even removing all .axisGrid().. doesn't remove it

Captura de Tela 2023-09-06 às 16 30 10

enrydell avatar Sep 06 '23 19:09 enrydell

@willdale @ataias @xremix

enrydell avatar Sep 06 '23 19:09 enrydell

I may have found a solution, but don't know why it works

I had this line .id(data.id) on the modifiers, removing it made the line disappear

enrydell avatar Sep 06 '23 20:09 enrydell

Thanks for commenting on this issue, but I dont have a line like that :-(

Where exactly is it?

Still looking for a fix for this.

mlawlerau avatar Sep 07 '23 05:09 mlawlerau

This .id(data.id)? Was on the modifiers here, just like the .yGrid... methods

enrydell avatar Sep 08 '23 13:09 enrydell

I facing this issue too, an additional line in the middle of the Y-axis of my FilledLineChart. removing the .id(data.id) didn't solve my issue.

metallica1375 avatar Jan 27 '25 13:01 metallica1375