2

Most stack overflow questions asking for graph plotting libraries in iOS have as answer CorePlot. Some, dating back to 2012, ask if there are alternatives to it but the answer is out dated and not comprehensive. I asked myself this question some months ago and got directed to CorePlot.

I struggle to understand why Apple has not included a native iOS framework to draw graphs. Leaving aside this consideration I am wondering how reliable is to include CorePlot in a commercial application (will the CorePlot code be supported in the future? Is it stable?).

  • What are the limitations in using this?
  • Is there any reliable and proven good alternative?
  • Is there any suggestion you may want to give me in case I decide to use CorePlot in the application? As basic step I will structure the code in a MVC pattern so that I can substitute the library if a better one comes on. However more suggestions are welcome (is there a specific data structure that proves useful for graphs?).
Community
  • 1
  • 1
mm24
  • 9,280
  • 12
  • 75
  • 170

1 Answers1

1

CorePlot contains a License which describes in detail what you must do to use it and where you can use it:

Copyright (c) 2014, Drew McCormack, Brad Larson, Eric Skroch, Barry Wark, Dirkjan Krijnders, Rick Maddy, Vijay Kalusani, Caleb Cannon, Jeff Buck, Thomas Elstner, Jeroen Leenarts, Craig Hockenberry, Hartwig Wiesmann, Koen van der Drift, Nino Ag, Mike Lischke, Trevor Harmon, Travis Fischer, Graham Mueller, Rafał Wójcik, Mike Rossetti, Michael Merickel, Ingmar Stein, and Victor Martin Garcia.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the Core Plot Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

So, in detail:

  • If you redistribute the source, you must add the CorePlot copyright notice.
  • If you distribute the binary, you must show this license somewhere, you can put it in settings for example or about page (even Apple does this).

License does not mention any prohibitions against commercial use and I am aware of multiple commercial apps using CorePlot, so there are no limitations if you include the license properly.

As for being updated, according to GitHub repo, it is actively maintained by multiple community members.

There are a couple of smaller libraries available, but CorePlot is certainly the largest one:

For your third question, it is quite subjective and very general. I'm not aware of any standardized patterns for using charts and it is probably not going to happen until Apple ships an API for this.

Of course, go ahead with MVC, if you have time you can even create a charting wrapper, so you can easily change the internal charting/rendering engine, if you decide CorePlot does not suit your needs.

Community
  • 1
  • 1
Legoless
  • 10,942
  • 7
  • 48
  • 68
  • Thanks for your reply. I have found a major limitation on CorePlot. I seem unable to create a chart with multiple colour bands (areas) that change dynamically. This is my new question on this: http://stackoverflow.com/questions/32232351/coreplot-creating-bands-with-mutable-widths-changing-based-on-data/32239195#32239195 Would you be able to take a look? Is this a CorePlot limitation or is this possible using CorePlot? I will accept the answer once I have clarified this. – mm24 Aug 28 '15 at 14:47