ZedGraph License
From ZedGraphWiki
ZedGraph is licensed under the Lesser or Library General Public License. This license was chosen to provide flexibility to the potential users of ZedGraph, while also protecting ZedGraph for the greater good. Under the LGPL license, if you make modifications to the ZedGraph code itself, you MUST make those source code changes publicly available if you want to distribute any application that uses the modified code. Note that this only applies to changes made to ZedGraph itself, not to your own application that uses ZedGraph. The reason for this requirement is to encourage users of ZedGraph (which is provided free of charge) to contribute back to the project if they make improvements. This distribution requirement can be handled in several ways:
- Provide access to the modified code on the web yourself
- Convince the ZedGraph authors to modify the main ZedGraph source code
- Submit a code patch to the ZedGraph Patches Tracker and provide a reference link to that location
Can I use ZedGraph in a commercial application?
Many people are concerned that ZedGraph license terms may require you share your proprietary code if you use ZedGraph with a commercial application. This is not the case. The LGPL only applies to ZedGraph itself -- normally your code would just be "a work that uses the library" (see LGPL Section 5).
The key issue in the LGPL is section 5, which states:
(LGPL Section 5) A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
This makes it clear that your code can remain separate, and is not necessarily a derivative work of ZedGraph just because it uses ZedGraph. However, the following (also in section 5) applies:
(LGPL Section 5) However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
This statement complicates things a bit -- using ZedGraph with your code makes the executable itself be a derivative work of ZedGraph. In order to distribute code in this manner, the user has to be able to modify zedgraph and relink it with your code. So long as you dynamically link to zedgraph (e.g., just use the zedgraph.dll), this is not a problem. If you make a static link to zedgraph, then you must also provide some mechanism by which an edited zedgraph can be relinked to your executable.
Just to keep it simple, I highly recommend that you do not statically link with ZedGraph (e.g., include the ZedGraph source code into your project). So long as you dynamically link with ZedGraph (e.g., just reference zedgraph.dll), then your executable module is a separate work from ZedGraph and it just remains a "work that uses the library".
Can I freely use the code samples provided in the ZedGraphWiki?
Many code samples are provided on the various pages of this wiki to help clarify or demonstrate ZedGraph options. These code samples are provided license-free (public domain) because it is intended that you would freely copy them into your own application without worrying about license encumbrances.
Just to state the obvious, this exception does not apply to the ZedGraph library code (duh -- we just explained that it is licensed under LGPL), or any file that includes a header stating some other license terms apply.


