Is there a way to create such a simple graph in swift?

Hello,

I'm trying to have a quadrant chart in my application to present some data. I have searched on the internet and all the graphs library I found are designed for a line chart or bar. I didn't find anything for quadrant chart except for Anychart and it is not fully implemented in IOS.

The graph is relatively simple but unfortunately, couldn't find one thing related to this graph :(

The quadrant chart should look like this:

Swift is a programming language, not a component library.

If you want things like frameworks or libraries, you need to ask in something like the Apple groups or Stack Overflow.

Otherwise, you can always draw your own, in code, in a view

Thank you for your reply!

I actually tried to ask on multiple platforms, no answer.

If you have a link to an Apple group, I would highly appreciate it.

Have a nice day!

If you have an Apple developer account, then go to the Apple Developer forums

Like I said, these groups are for questions relating to the Swift language only, not frameworks or general component programming topics

Sorry for posting in the wrong place.

Thank you for your hint thou

Have you tried SwiftPlot?

Yes! This is what I was looking for. Thank you so much!

One last question, do you know a way to colorize one quadrant like in the picture?

I tried to add a view with 0.5 alpha. It works on my iPhone 8 plus. But, with iPhone 11 doesn't ( as to different size), even with auto layout, it didn't

I don’t know how to do that, sorry.

But it seems like the best way to do it would be in the library - to fill that quadrant as part of the background, before data is plotted on top of it. Then you don’t need to worry about your over/underlay aligning perfectly with the graph.

Since the library is open-source, you’re able to fork it and add that feature to your version of it. If you do that, be sure to open a pull-request so others can benefit from your work.

Thank you! I will try to do that and add a pull request if succeeded :)

Terms of Service

Privacy Policy

Cookie Policy