willdale / SwiftUICharts

A charts / plotting library for SwiftUI. Works on macOS, iOS, watchOS, and tvOS and has accessibility features built in.
MIT License
837 stars 103 forks source link

How to remove the additional centre y-axis line? #240

Open mlawlerau opened 1 year ago

mlawlerau commented 1 year ago

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?

enrydell commented 11 months ago

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 commented 11 months ago

@willdale @ataias @xremix

enrydell commented 11 months ago

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

mlawlerau commented 11 months ago

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.

enrydell commented 11 months ago

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