Welcome to the GraphBuilder, Built using the super-cool Swift and Charts libraries, GraphBuilder is all about demonstrating the awesomeness of Swift Charts!
Ever been just chilling and thought, "Hmm, I wish I could create a graph right now"? We know that feeling all too well, and that's why Apple created Charts which works and deosn't work, so GraphBuilder! is here.
GraphBuilder takes a series of points (just like the ones you used to plot in math class) and turns them into a stunning graph within a frame. But that's not all! because that was done by Apple already derp.
In addition to plotting points, GraphBuilder introduces an interactive element: touch and drag! Our app doesn't just plot points; it plays with them! When you touch the graph and drag your finger, a piece of magic code calculates the closest point to your touch.
But where's the fun if you can't see that magic happening, right? Don't worry, we got you covered!
When you drag your finger across the graph, GraphBuilder not only calculates the closest point to your touch, but it also MARKS it! That's right, the closest point gets its very own PointMark. It's our way of saying, "Hey, you! Yes, you! You're special!" to the closest point.
Besides all the fun, we're also about learning! We've included some prints in the console for you to track the closest point, the cycles state variable, the movement state variable, and the location you touched. It's a great way to see what's going on under the hood while you enjoy this graphing extravaganza! 🎉🚀
The point marked is interesting enough because can respond to sounds, haptic feedback or other things.