Charts - NOT Constrained by 10 Views like SwiftUI Views

Unlimited...

I expected to see the typical View limitation of needing a container like Group, VStack, or HStack for Chart Content with more than 10 RuleMarks.  But this didn't happen.

This is not the best-looking Chart, but I was not expecting it to work, all those temperature dashed lines (more than 10) I thought were going to get a compile error.

Well, I don't know if it is unlimited... I didn't probe for the limit.


So what is the purpose of Plot()?  A mechanism for grouping chart contents into a single entity.

struct Plot<Content> where Content : ChartContent

I was expecting Plot to be the equivalent of Group within the View hierarchy.

E.g. Chart - Plot !=  View - Group


Parameter Pack

Here's a great video introduction to Swift Parameter Packs by Vincent Pradeilles - How to get started with Parameter Packs

This iOS 17 feature of the compiler removes the traditional SwiftUI View limit of 10.  Now the view-builder is using Parameter Packs - not the limit of 10 overloaded parameters.