You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 2, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 2, 2020. It is now read-only.
I integrated the line graph and its working great in Objective-C, but the problem I'm having is with spacing on the xAxis. If you see the attached screenshot, the first label and second one, and second last and last one are not evenly spaced.
Below is the function which I use to setup the graph:
That's a design choice. As the labels are centered on the datapoints, the far left and right labels would always be half off the screen. Thus the library nudges them into the visible area. If you turn on xaxis reference lines, the issue will be clearer to you.
This is the default behavior of the graph - it is designed to prevent the x-axis labels from being clipped. If you need to modify the spacing between the x-axis labels, I suggest you take a look at numberOfGapsBetweenLabelsOnLineGraph: delegate method and go from there.
Activity
mackworth commentedon Jun 4, 2017
That's a design choice. As the labels are centered on the datapoints, the far left and right labels would always be half off the screen. Thus the library nudges them into the visible area. If you turn on xaxis reference lines, the issue will be clearer to you.
Sam-Spencer commentedon Jul 18, 2017
This is the default behavior of the graph - it is designed to prevent the x-axis labels from being clipped. If you need to modify the spacing between the x-axis labels, I suggest you take a look at
numberOfGapsBetweenLabelsOnLineGraph:delegate method and go from there.[-]xAxis Labels uneven spacing[/-][+]Uneven X-Axis Label Spacing[/+]