We've discussed how playgrounds can be a great tool for exploring APIs and experimenting with UIs. However, playgrounds can also be used for documenting APIs, and providing rich, linkable content. Swift Playgrounds provides support for rich text formatting in comments and multiple pages of content, and we will explore those features in this recipe.
Getting ready
We will start with the playground we used in the last recipe, which displayed our custom BarChart view. You can get the playground, called EmbeddedSources.playground, from the GitHub repository for this book at https://github.com/PacktPublishing/Swift-Cookbook-Second-Edition/tree/master/Chapter07.
We will use our BarChart view to display the price in US dollars of three different cryptocurrencies over a 6-month period between January 2020 and June 2020. We can show each type of currency on a different playground page.