ChartView
ChartView copied to clipboard
Line charts upside down on WidgetKit -- v2-beta
Depending on what your use-case desires: line charts out of the box will be upside down on widgets. To solve this remove all instances of rotationEffects -- and animations for good measure.
//.rotationEffect(.degrees(180), anchor: .center)
//.rotation3DEffect(.degrees(180), axis: (x: 0, y: 1, z: 0))
rotationEffects only need to be removed if you set the frame height .frame(height: 9) on the chart
I ended up having to fork and make some additional modifications. Great library as a starting point for my marine forecast and tides widgets
@skg54 how did you get the axis labels and markings?
Somehow, depending on the size of the frame, it will require the rotation... or not. Not sure why this is the case
@skg54 how did you get the axis labels and markings?
They appear to be fixed values