RSSAmplifier

Blog

SwiftUI Charts Gestures – Little Green Viper

Software Development LLC

littlegreenviper.comRSS feed ↗4 posts

Latest posts

Appendix A: The DataProvider Struct

The real heart of the demonstration app, is something that we didn t cover at all, in the tutorial. That s the Data Model for the app, which is in the DataProvider.swift structural type. It s a fairly basic type, that consumes some CSV (Comma-Separated-Values) data, and formats it into a configuration that can drive the chart. The ... Read more

Adding Pinch-To-Zoom to the Chart

In this exercise, we ll add a pinch-to-zoom-in/out feature to the chart. It will be very basic, but should work quite well. The Basics The zoom will be X-axis only. It doesn t actually make sense to zoom in on the Y-axis, especially since we have the ability to select a bar, and get the exact values ... Read more

Adding A Selection Gesture

We now have a nice bar chart. It shows the entire range of our dataset, sizes itself accordingly, shows the difference between the new users, and the active users, has the Y-Axis labels on the left (leading) edge of the chart, and has the X-Axis values displayed from the start to the finish, in discrete ... Read more

The Initial Setup

SwiftUI Charts are a flexible, relatively simple way to generate data displays for your application. Apple uses them, in a lot of their own applications. By default, they are fairly static displays, but it s possible to add some interactivity to them. In this series, we ll take a basic static bar chart, and add two gestures ... Read more