I have a graphView with multiple graphs, but my data points (x-axis) are only 5.
Is it possible in such a case to centre the graph, taking into consideration screen sizes?
The uploaded screenshot shows how the graph is left-aligned currently.
I'm using the IB option. I added the graphView inside a UIView "masterView" and set constraints to that masterView. Even bars width is calculated based on the masterView width. Example: barRPlot.barWidth = masterGraphView.frame.size.width * 0.14
I tried: graphView.leftmostPointPadding = graphView.rightmostPointPadding
but that did not work to centre the graphs.
I'm still learning Swift and iOS development, so any pointers in the right direction will be greatly appreciated.
Thanks a lot for this great library.
I have a graphView with multiple graphs, but my data points (x-axis) are only 5. Is it possible in such a case to centre the graph, taking into consideration screen sizes? The uploaded screenshot shows how the graph is left-aligned currently.
I'm using the IB option. I added the graphView inside a UIView "masterView" and set constraints to that masterView. Even bars width is calculated based on the masterView width. Example: barRPlot.barWidth = masterGraphView.frame.size.width * 0.14
I tried: graphView.leftmostPointPadding = graphView.rightmostPointPadding but that did not work to centre the graphs.
I'm still learning Swift and iOS development, so any pointers in the right direction will be greatly appreciated.
Thanks.