Skip to content

devmehmetates/SwiftUIAnimatedRingCharts

Repository files navigation

SwiftUIAnimatedRingCharts

How to use

Follow all the steps for 3rd party Swift packages and add the package to your project. If you have no idea, have a look here 👉🏻 Click here.

Then add it to your project as follows.

// MARK: STEP 1
import SwiftUIAnimatedRingCharts 

// MARK: STEP 2
RingChartsView(values: [100,900,300], colors: [[.red, .orange], [.purple, .pink],[.teal, .green]], ringsMaxValue: 1000)

Variables and Customization

Variables Type Required Description
Values Array<CGFloat> yes The required array for the values in the chart.
Colors Array<Array<Color>> no The array of colors specified for the entered arrays.
ringsMaxValue CGFloat yes The value against which the values are compared.
lineWidth CGFloat no This value sets the width of the charts.

Tips

  • Shape the class with the frame. Since it is flexible, it will use all the space it can cover.
  • Use the frame's height and width property. Alignment issues may arise in determining the height size.

Preview

Screen.Recording.2022-04-25.at.16.38.51.mov