Skip to content

Conversation

@jondlew
Copy link

@jondlew jondlew commented Jul 25, 2021

Sets default labelColor to black. Adding id: in ForEach allows the chart to redraw dynamically when data is updated.

@Yang-Xijie
Copy link

Great pull request!

This will set the frame size so a chart with many entries will render correctly inside a ScrollView
var body: some View {
VStack{
ForEach(0..<self.values.count){ i in
ForEach(0..<self.values.count, id: \.self){ i in

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above comment

VStack{
ZStack{
ForEach(0..<self.values.count){ i in
ForEach(0..<self.values.count, id:\.self){ i in

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good because it will eliminate the compiler warning Non-constant range: argument must be an integer literal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants