Developers face software evaluation and selection tasks on a regular basis. But one such task that may have significant ramifications on timeline, budget, and success is the selection of a JavaScript library.

And choosing a JavaScript charting library can be particularly arduous. Devs are often quick to say one library or another is “the best.” But in reality, no single library can:

  • Fulfill the requirements of every project

  • Accommodate the skills of every team

  • Be the lowest priced option

Seeking one library to rule them all is like committing to eating with a spork at every meal. Think of it this way: what if everyone could only use one utensil to eat for the rest of their lives?

A fork makes eating liquids impossible.

A spoon does not allow you to pierce bite sized pieces.

You might consider a spork to get the best of both worlds. But would everyone solely using sporks for the rest of their lives be the best? Certainly not.

And the same goes for libraries (charting or otherwise): there is no single best. Declaring one library best is like saying a spork is the best utensil.

spork as an analogy for choosing a javascript charting library
Spork image via Flickr

ZingChart is not a spork. However, there are some specific use cases where it is clearly the best option. In other cases, it is not. This post is not intended to discredit other libraries, but to appeal to rational readers who are willing to consider project requirements before selecting a tool.

In the “real world,” we pick our tools after we find out which home repair we need to perform, not before. We learned that the hard way when using a hammer to fix a toilet! Seriously though, we think this rational approach, digital or not, makes sense. If you agree, read on.

Choosing a JavaScript Charting Library

With JavaScript charting libraries, there is no one-size-fits-all solution. In addition, the space is very competitive and libraries are always improving. Rather than promoting one library as the best, we generally suggest that if developers have time, they:

  • Define their technical requirements

  • Research and select qualified products

  • Compare and test the most viable options

marathon image for selecting a solution for the long run

Developers who go through these steps will have more success in the long run than those who pick a library simply based upon popularity. At ZingChart, we’ve seen devs select an option without proper evaluation first and have to move to another part way through a project. So we’re always happy to help with this process.

Types of charting solutions

When considering a charting product, it worth noting there are actually three basic kinds of charting libraries:

  1. Visualization/drawing libraries like D3.js

    Nearly limitless customization possibilities come with hefty development time.
    As a drawing library to which you can append data, some basic charts can be labor-intensive.

    Good for one-off visualization projects with individual styling requirements.

  2. Minimalist libraries like Chart.js

    Open source, simple to use, but limited to six chart types and limited styling options.
    Works for projects that require the same types of charts to be used repeatedly, where customization is not a high priority.

    While free open source projects allow developers to peek under the covers and fix any bugs they encounter, most of the time they are left to figure out solutions by themselves or to collaborate in community forums.

  3. Full-fledged commercial options like ZingChart and Highcharts

    Typically higher priced, but with most required features baked in, savings come on the development side of the project.

    Best for projects that require a variety of chart types, interactive features, and customization/styling, rendering in a variety of outputs for different sized data sets.

back hoe image for digging deeper to compare js charts

Comparing Commercial Charting Libraries

Commercial charting solutions bring many strengths and weaknesses to the table. Your comparison should be based on your previously-defined technical requirements. Some common questions to ask include:

  • Does my project require fast, stable renders of 20k+ datasets? If so, can the library achieve them?

  • Is there enough “out of the box” functionality to warrant paying for a license? Does it significantly reduce custom development time for my team?

  • Does the library contain the chart type(s) my project requires?

  • Is cross-browser compatibility a concern? What browser support does the library guarantee?

Since ZingChart is not a spork, we don’t expect to meet every project’s requirements. If your requirements are for fairly standard charting functionality and you are working with a data set of up to 10k-20k, most popular commercial solutions will work.

They are flexible enough that you could build out additional features you might need. However, doing so can defeat the purpose of using a commercial charting solution, since they are intended to save time and resources.

Green zebra illustrates that zingchart is different compared to other charting libraries

How is ZingChart Different?

ZingChart is different in that it simply provides more chart types, more functionality out of the box, and a much more robust API.

ZingChart also offers the highest level of commercial support: the ZingChart dev team is here to build out additional functionality and develop customized implementations for you when the need arises.

ZingChart stands apart from other libraries in some very important ways:

  • Standard support for larger datasets ranging from 10k-500K+

  • High performance real-time charts

  • Access to a much wider variety of chart types (all included with a single license)

  • 100% dependency free. No need for 3rd party frameworks or 3rd party feature plugins.

  • Wrappers and integrations to 3rd party frameworks for those who choose to use them.

  • Granular styling flexibility and theming for a custom look. Plus the full API supports dynamic changes either programmatically or in response to user events.

  • Advanced features with an API to support highly customized, dynamic, chart heavy applications with complex requirements.

  • Access to advanced consulting services and support for sophisticated solutions to complex charting (and non-charting) problems.

We should note that other libraries claim many of these same points. But especially in the area of the performance, we have found unfortunate “demo illusions” or other dependencies and limitations in the fine print. The same goes for the file size comparison.

Adding all the dependencies and modules in to make something feature-rich will reveal that no library can do everything at 30k, let alone 300k. Trade-offs abound: that’s an inescapable fact. If file-size is your end-all be-all, you’ll have to sacrifice features or chart types.

One other area in which spurious comparisons can be made about a charting library’s features is chart types. Do you consider spline and segmented line as two different types? How about column and horizontal bar?

The number of chart types in a comparison can also be manipulated. In our claim of what makes ZingChart different, the ultimate test is how well you know your own needs. Rather than asking which library has the most _____? A more effective question is which specific chart types, features, sizes, and performance metrics make the most sense for my unique project?

should you pay for a visualization library

Paying for a JavaScript Library

There are plenty of folks out there who think JavaScript libraries should all be free and open source. And that may be the case for some libraries. But when it comes to charting and data visualization, there are many reasons why you might want to pay (gasp) for a charting library:

Scope: Free charting libraries often only include the most basic chart types. If your project will go beyond bar, line, and pie, a commercial library will offer your many many more options in this regard.

End user experience: A commercial library will include key features to please your end users, without much custom coding. These may include rich interactions, drilldown, annotations, animations, and more.

Professionally developed product: Once you choose a JavaScript charting library, you will become dependent on that software. Therefore, quality of third party software should certainly be a consideration. By selecting free/open source code you get the benefit of access to non-minified source code, but you can not always rely on support from the core contributors.

Additionally, without actually taking the time to fully evaluate the code quality you simply are trusting that the free software has been written with reasonable quality, testing, scalability, and maintainability. Unfortunately, this is not always true.

Organizations that invest in the engineering, planning, and development of a product have a commitment to providing a quality end product in order to receive a return on that investment.

Support: Many developers are confident enough to go it alone or rely on community support with free/open source products. But when your timeline requires quick updates and stakeholder expectations require specifics, custom and personalized support will help you deliver.

In addition, some truly complex problems may arise during a data visualization project. Having access to an established team of engineers with domain knowledge and significant experience with similar issues can be worth its weight in gold, depending on the issue.

ZingChart Licensing

ZingChart only offers one version of its client-side library. Every user gets access to all the chart types, features, and the full API. Support is also included with all paid licenses. ZingChart is a commercial product and requires licensing. Which type do you need? That depends on:

  • The end use of your application(s) including ZingChart

  • How the applications are deployed

  • The number of developers using ZingChart - this may affect your desired support package

puzzle piece test to see if a certain library is the best fit

Test Your Library Choices

Testing out various libraries and fully evaluating them can be time consuming. In order to help narrow down the products users may decide analyze more deeply, the ZingChart team developed a speed test tool.

A note about the tool: some libraries may buckle under the weight of a certain number of data points. Please read the disclaimer and be prepared to restart your browser, depending the library, chart, and data size your select.

Also note that it is possible to rig tests or find ways to cook the numbers. Loading quickly doesn’t mean much if you can’t hover tooltips! Other schemes to win speed tests involve turning all features off or requiring some different version of the library stripped to make the point of being fast. Try to figure out what features you need and test that way.

Include ZingChart in Your Comparison and Testing

ZingChart has evolved significantly since it was first released in 2008. While our team works hard to improve and innovate, we’ll admit ZingChart's full capabilities are often far ahead of our documentation. Some of our customers have come to realize that if they ask us, we usually have the answer. We really encourage conversation with our users to:

  • Help report bugs

  • Provide feedback on docs

  • Let us know when they need more features

  • Get feedback on the best way to use ZingChart

We encourage these types of interactions via our site chat, contact forms, Twitter and StackOverflow. Please let us know what you think or may want. Finally, as we stated at the start, we aren’t for all situations. We know that, and that is by design.

So if what we do isn’t for you, that’s okay. We are happy to hear and talk about viz anyway since we built ZingChart just for this very reason, to get what we wanted! Or check out our gallery page if you haven't made a decision yet :)!

And if you have comments on sporks or JavaScript charting libraries, please share those with us as well in the comments section below.