Hacker News new | past | comments | ask | show | jobs | submit login
Replicating D3 Charts with Swift Charts (github.com/raheelahmad)
91 points by sawaali 6 months ago | hide | past | favorite | 13 comments



Nice! The examples all look very close. Nice to have a repository of examples for how to re-create D3 charts in native apps.

Disclaimer: I worked on Swift Charts at Apple and I'm very excited to see it used!


Thank you for Swift Charts. I was surprised by how flexible and powerful the API is.


did it seem like swift charts would be supported long term? It seems interesting but I'm hesitant to use it if it seems like it might get axed


Apple is pretty good about not axing published APIs, unlike another FAANG company we could compare them to.


Instead of axing the API, it will be allowed to languish with longstanding bugs going unaddressed in perpetuity. Not sure that’s better.


These are the choices we developers enjoy today. Pick your poison.


I wonder if Apple do (or will) use Swift-Charts in their own major apps, e.g. for all the various metrics in the Health app on iOS.


Im fairly certain they're using it in Battery Health and Screen Time.

I've had a chance to use Swift Charts in some personal apps and am really impressed by it. It's so nice to have a native charting library available out of the box.

As with all Apple APIs (especially newer ones) watch the WWDC sessions and read the Apple documentation first instead of trying to sling it. It makes it way more intuitive.


Recently, a post about the limits of box plots went through HN. It praised violin plots as better alternatives[0]. Are those supported in Swift Charts?

[0]: https://en.m.wikipedia.org/wiki/Violin_plot


Not directly, but like most of the examples in the repository, they can be recreated with some custom drawing.


Thank you very much for this! They look great.


Can Swift Charts render on a browser?


No




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: