Settings

Theme

Replicating D3 Charts with Swift Charts

github.com

91 points by sawaali a year ago · 14 comments

Reader

reverius42 a year ago

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!

  • sawaaliOP a year ago

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

  • vsgherzi a year ago

    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

    • cageface a year ago

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

      • monocularvision a year ago

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

    • frou_dh a year ago

      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.

      • tmpz22 a year ago

        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.

jiehong a year ago

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

  • sawaaliOP a year ago

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

zebomon a year ago

Thank you very much for this! They look great.

ukuina a year ago

Can Swift Charts render on a browser?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection