March 20, 2023
To what extent does your app rely on data? It probably does in some way. Even if the app is not exactly business-oriented, you’d probably need data for the admin panel, the dashboard, performance tracking, and similar analytics features that users love so much.
Visualizing data inside those apps and presenting them to end-users is a great responsibility. Companies build strategies around the charts, numbers, and tables they’re presented with, and often use them to choose whether to pursue business opportunities. Therefore, choosing the right tools can in some cases be the difference between making it and breaking it.
To understand which data visualization library would work best for your projects, there are a number of factors to consider:
Some libraries support only a handful of types. Make sure you know which ones you need first.
Libraries based on SVG are usually better for smaller to medium datasets, as each element is a unique node and exists in the DOM tree. This also means that they offer a lot more flexibility by allowing direct access. Although you could make them work with large data sets with the help of some data aggregation algorithms, smart memory management, and other fancy tricks, going with Canvas-based tools for large datasets is the more reliable option here. Canvas is really fast.
Some libraries are better at responsiveness, while a few others have their own React Native versions like Victory.
Check your browser market share to figure this out.
Make sure your data viz library will go well with it. Using React? Going with a React-specific library might be a better option than using wrappers.
If you need some advanced animations, for example, you should take that into consideration, too.
Sometimes it’s better to keep your sanity and spend more resources on the developing part rather than trying to bend libraries to fit your particular needs. Although it may sound scary at first, with an SVG-oriented mindset and few hours to experiment—who knows, it might actually be fun!
To see a real-life example of a Data Visualization app we built, check out Packet Analyzer.
If you are familiar with modern frontend frameworks, then Vue.js is especially great in this area and its reactiveness makes working with SVGs a breeze. Notice I’m talking strictly about SVG-based charting as it’s much easier to implement.
HTML5 Canvas is simply a drawing surface for a bitmap and it’s not aware of the objects drawn inside—they’re pixels, not actual DOM elements like they are in the case of SVG. If you want to make it interactive, you will need to handle all the logic yourself.
While Canvas-based approaches offer a performance edge with large datasets (1000+ elements) and careful manipulation, I wouldn’t recommend writing one from scratch—unless it’s a core feature of the product.
So when is it a good idea to use a library?
Either when you have an odd chart in the project, one that needs to be basic but good-looking, with all the bells and whistles (tooltips, legend, X/Y axis, etc.) or when the application demands standardized, responsive, and elaborate charts, especially when there’s more than one type.
In the end, we use libraries to keep ourselves from reinventing the wheel over and over again, and most of them have been around long enough to have factored in most use/edge cases. Oh, and they come with animations built-in, too.
It’s impossible to try all of them out in real-life scenarios, but below you’ll find a list I’ve compiled based on my own and others’ observations. Keep in mind that before you dive into one library, it’s always a good idea to see how it will integrate into your project. In the end, the choice is yours—so here’s a list!
If you’re not a large enterprise, open-source libraries offer more than enough options to choose from. If you have successfully answered the questions I mentioned above, you will probably find your perfect match fairly easily.
GitHub Stars: 100,000
D3 is one of the most popular JS libraries not just for data visualization, but also animations, data analysis, geo, and data utilities. It uses HTML, SVG, and CSS. It has a gigantic API and some say it’s not a data visualization library at all.
Everything you can probably think of can be done with this library, but it comes with its downsides. It has a steep learning curve and the documentation is outdated and confusing to navigate.
Much of the API exposes direct access to the DOM, which might clash a little with how modern frontend frameworks like React or Vue work. There are ways to work around that, though.
One involves so-called declarative data-driven documents (d4 in short), which suggests letting the framework manipulate the DOM and using D3 strictly for the data API. You can find more info and examples here.
Works with: anything
Want to know more about D3 possibilities? See how we visualized data of more than 4,4 million users of complex finance management platform with D3. Check out Cashdeck.
GitHub Stars: 17,700
A data viz library was created for React users. Recharts uses D3 under the hood and exposes declarative components. It’s pretty light and renders SVG elements to create beautiful, interactive charts. It’s easy to use and the documentation is a blast.
Charts are customizable and the library itself provides some nice examples. It delivers great performance for static charts and includes built-in general chart tools like legend tooltips and labels. It can be laggy when dealing with multiple animated charts on the same page and large datasets, but it will work for most use cases.
What’s a bit troubling is the high number of unsolved issues on GitHub. These issues may not be critical, but creators don’t seem to drop by to answer them too often. So if you get stuck, be prepared to dig deep into the library.
Works with: React
GitHub Stars: 9,300
A set of modular charting components designed specifically for React and React Native.
Victory does a good job providing fundamentals to create a chart.
Things like axes customization, labels, passing in different data sets for a single graph are all pretty straightforward, and tweaking styles and behavior is easy and intuitive.
It’s really effective and lets you build some nice-looking charts with minimal code. Definitely worth checking out for cross-platform apps.
Works with: React, React Native
GitHub Stars: 8,100
Its minimalist styling, however, may not fit everyone’s tastes (but I personally like it!). Although there aren’t too many on react-vis out there, the documentation is straightforward and easy to read.
Works with: React
GitHub Stars: 6,500
It's a good all-around tool for creating common charts with simple data configuration. It is based on Vue2.x and echarts.
Works with: Vue.js
Read more about the best Vue data visualization libraries here.
Also, check our latest Vue Migration Cheat Sheet:
GitHub Stars: 1,500
It's an advanced, comprehensive charting system for traders.
Works with: Vue.js
GitHub Stars: 5,800
Chartkick is a great tool not only for Vue. It enables you to generate charts that are functional and aesthetic.
It's a pivot table component for React Native. Great for visualizing business data.
GitHub Stars: 11,100
A rather neat library for SVG charts comes with a Vue.js and React wrapper. Its charts look great on different devices, and the library allows for customization and comes with comprehensive documentation. It can be laggy with larger datasets, so make sure it’s exactly what you’re looking for.
According to Juned Chhipa, the creator of ApexCharts, the library was created for easier zooming, panning, scrolling of data, placing informative annotations on charts, and more.
The library itself is new and there’s still a lot of room to grow, but if responsiveness and interactivity are especially important for you, it’s a nice-looking library worth giving a shot to!
GitHub Stars: 56,100
A very popular open-source library with more than 55k stars on GitHub. It’s lightweight and lets you build a responsive chart using HTML5 Canvas elements. You can easily mix and match line and bar charts to combine different datasets, which is quite an awesome feature.
Chart.js offers you six different chart types by default, it supports responsiveness and is beginner-friendly. It’s also my go-to library for very large datasets. Definitely, one of the most interesting open-source libraries to check out.
Works with: React, Vue.js
GitHub Stars: 49,600
Works with: anything
A very simple library for charts with zero dependencies. It’s open-source, and with only seventeen contributors it’s one of the smallest libraries on the list.
Frappe Charts is a package inspired by GitHub-like visuals which supports line, bar, and other types of charts. You can also use it to create monthly heatmaps that you may recognize from GitHub Activity. If you’re looking for a minimal and lightweight package, this is the one!
Works with: anything
GitHub Stars: 9,700
Nivo is a beautiful framework built on top of D3 and React, offering fourteen different types of components to present your data with. It was released in 2017, featured as "product of the day" on ProductHunt on August 20, 2017.
Nivo offers a lot of customization options and three rendering options: Canvas, SVG, and even API-based HTML. The documentation is exceptional and the demos are configurable and fun. It’s a high-level library and quite simple but offers less potential for custom visualizations.
Works with: React
An extremely popular Web service for charts that I simply couldn’t leave off the list. For many out there it’s the go-to JS library, as it provides multiple pre-built charts types, such as bar, line, area, calendar, geo charts, and many more.
For me, however, the library feels like overkill in most cases and, frankly, I wouldn’t recommend using it.
It’s free, but not open-source (pretty much like every Google product). It’s not responsive by default, but you can make it resize charts with some code.
There are different customization options, depending on the chart type, but it’s not exactly beginner-friendly. And you have to load it directly from a Google URL instead of an NPM package.
Works with anything
Some libraries offer free versions for personal use, but you need to pay to use them in commercial applications. All of the libraries listed below are commonly used by big corporations. Why? Because all of them are truly comprehensive, customizable, and offer great customer support. If you’re an enterprise, you should check them out.
One of the hottest charting libraries out there. Its beautiful design really sets it apart from the competition. amCharts lists Apple, Amazon, NASA, and many other prominent names as their clients, which is pretty impressive, to be honest.
amCharts is a commercial tool and their pricing starts at $180 per single website license. In return for a fixed fee, you get all types of charts you’d need, including geographical maps and great customer support, with response times averaging less than 3 hours. It sounds like a good solution for large companies.
Works with: Angular, React, Vue.js, plain JS apps, TypeScript
Another commercial tool offering beautiful charts across different devices and browsers. It lacks some chart types, such as the network chart, sparkline, or gauge charts for example. Plus, its learning curve is quite steep.
On the other hand, it’s very fast, working smoothly even with as many as 100k+ data points, and provides four default themes that should be a good fit for most scenarios. Their client list is quite impressive, too: Apple, Bosch, Siemens, HP, Microsoft, and many more.
GitHub Stars: 10,400
A JS library released in 2009 JS, based on SVG with fallbacks to VML and Canvas for old browsers. It offers a whole ecosystem of different project templates. Highcharts is compatible with older browsers, too, including Internet Explorer 6.
It’s a nice solution for non-developers as it has an integrated WYSIWYG (what you see is what you get) chart, editor. Its learning curve is rather smooth and it’s been used by a number of major players, like Facebook or Microsoft—there’ve even been claims that 72 out of the 100 of the world’s largest companies have used it at some point.
In addition, you can use SVG and/or shape generators along with it to make your visual elements more effective.
Contrary to Recharts and D3, it’s a paid solution and carries a $1500 price tag for an unlimited commercial use license.
Under the hood, however, it feels like it was written in 2009. Recently, one of my colleagues walked me through her experience with it, and let me tell you, it wasn’t very pleasant. It works great when you’re not fiddling around under the hood, but when you want to—it’s a chore.
Works with: anything
The library promises beautiful visualizations that need little code and can be easily deployed in your product.
Zoomcharts are Canvas-based, and with default settings, the library works up to twenty times faster than its SVG-based competitors using the same data and settings.
I couldn’t find the exact pricing for Zoomcharts, but I found a couple of comments that called it “expensive.” Whatever the price may be, however, in return you get amazing interactivity, multi-touch gestures, and high-caliber customer support.
Works with: anything
The growing number of data viz libraries out there proves how important visualizations are for the whole Web—and that’s pretty exciting! I hope this list will help you create beautiful charts for your future projects. Good luck!