In today’s world, people are struggling more and more with the problem of scattered attention. So it is becoming more and more important to present information in a structured, interesting, and well-designed way, especially if you have a complex business application
. Presenting huge chunks of data in a standard spreadsheet to analyze or to study is as inconvenient as it can get. Creating different charts
charting in particular is a big issue that we will consider.
Companies build strategies around the charts, numbers, and tables they’re presented with, and often use them to choose whether to pursue business opportunities. It is very important to choose the right tool to build a workaround.
We will try to cover all these questions in this guide
When you approach the choice of the chart js
library, everything is highly individual and depends on many criteria. Therefore, in this section, we will consider things you should pay attention to while choosing the tools for drawing charts.
A nice interface and copy/paste code are all well and good if we need something generic to our needs. But frankly speaking, most of the time we actually need something tailored to our use case. Even more than that – we need a reliable charting library we could build upon.
There are several factors to consider here:
What kind of charts does the company want to build? Pie charts, maps, lines, bars?
How large is the dataset?
Is the app
going to be used for Web, mobile, or both?
SVG or Canvas base? 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. On the other side, Canvas is really fast.
What is the browser support for a given library? Check your browser market share to figure this out.
do you use?
What kind of customization of the look and feel do you need?
Here is an example of a decision diagram that I have found on the internet
Free for non-commercial, paid for commercial
Free to $7060
is very simple.
In all of its simplicity, Highcharts is also very much compatible with old browsers, so you can pick it if you don’t need to represent data using advanced charting styles.
Optimized for both responsive design
and touch devices;
Capable of working with Big Data
On-hover tooltips rendering is super-quick;
Ability to annotate graphs;
Data can be loaded to charts directly from a CSV file.
Highcharts allows you to configure the theme separately from the data. This allows you to have a common theme for your brand to apply across all the charts on your website.
Highcharts is extensively documented and has most use cases covered.
HighCharts is used by some major companies across the world, including Facebook, IBM, MasterCard, and StackOverflow. It’s probably the most advanced library out there regarding types of charts
available, but of course, comes at a cost for commercial use. If the pricing is not a stumble, Highcharts is an excellent choice.
Chartist is a very modern, SVG based library. Its biggest feature is the SVG animations in the charts produced with this library.
It has a solid technology base and is very easy to implement. Within minutes you can make an incredibly impressive chart that interacts easily with any backend data source. Chartist is really easy to configure, as well as easy to customize with Sass.
This library has only 8 base chart types which can be used to improvise over a few more different types. Each is fully responsive but doesn’t have a great transitional effect as others.
Filtering by labels; Click on a legend to show and hide data on the chart;
Non-numeric Y-Axis, have labels instead;
Easy customization with interpolation of line charts.
The Chart.js visualization library is completely open-sourced with the MIT License and available to modify, distribute, and use. Source files are available to ‘fork’ on GitHub too.
Chart.js offers a vast documentation base including precise instructions on installing the library. The library can be quickly installed with Bower, NPM, jsDelivr, and can even be linked up from CDNJS. Besides, you can download the source files directly from the GitHub Repo.
Chartist is a very powerful charting library, but it requires more work on the developer’s end to get things to look right.
C3 is a very efficient D3 based chart visualization library. C3 library is fast to render, has good compatibility across browsers, and is very simple to integrate. If you’re looking for no-frills, C3 is a decent choice.
It also includes good documentation for what is an inherently simple library.
Extensive tutorials and documentation;
Responsive and mobile-ready;
Stylish tooltips already integrated;
Filterable data series.
C3 provides a getting started guide that instructs on how to get the basic library setup with your project.
The Chart.js API is fairly simple and well-documented. Chart.js uses canvas instead of SVG. The library is actively maintained and has a few plugins to extend its functionality.
Chart.js offers 8 different chart types for data visualization with out-of-the-box animations. It is compatible with all modern browsers. Also, the responsive chart behavior of the charts can be enabled by some configuration.
Free, paid for enterprise
Plotly is one of the most common libraries around. Plotly is a very rich library and has outstanding documentation, including a tutorial
for each of the chart types.
It has been open-source since 2015, meaning anyone can use it for free. Plotly.js supports 20 chart types, including SVG maps, 3D charts, and statistical graphs. It’s built on top of D3.js and stack.gl.
The charts and graph types available have a professional look and feel. Creating a chart is just a matter of loading in your information and customizing the layout, axes, notes, and legend.
Free, paid for enterprise
NVD3 is also on the list of the most popular libraries. Built upon D3.js like the others above, it does have a solid technical base.
The performance is relatively good, and it does have basic animations to inject some visual stimulation in an otherwise fairly plain interface. Data can be pumped directly from .json files, meaning NVD3 is very easy to integrate with existing data API solutions.
When compared to other libraries on this list, it looks rather small with many charts not available, but most of the general graph-types are present.
This visualization library is completely open-sourced with the Apache 2.0 License.
FusionCharts probably has the most complete collection of charts and maps. With over 90+ chart types and 965 maps, you’ll find everything that you need right out of the box.
FusionCharts supports both JSON and XML data formats, and you can export charts in PNG, JPEG, SVG, or PDF. They have a nice collection of business dashboards and live demos for inspiration.
Their charts and maps work across all devices and platforms, are highly customizable, and have beautiful interactions. But with all of that, FusionCharts is slightly expensive.
Free for all users
Synchronization across multiple graphs;
DyGraphs is well suited for large and complex data sets.
Free for all users
The website provides comprehensive documentation. There are examples provided to help with getting started and using the library.
D3 supports all modern browsers. It has been tested on browsers including Firefox, Google Chrome, Safari, Opera, IE9+, Android, and iOS.
There are two major concerns with D3.js: it has a steep learning curve and it is compatible only with modern browsers (IE 9+). Pick it up only if you have enough time to learn and adopt it.
Free for all users
Sigma.js is built on Canvas and WebGL and has a public API, embracing a wide range of plugins contributed by the GitHub community. Sigma is fully responsive and touch interactive. It allows developers to directly add their own functions to the scripts and render nodes and edges exactly to spec.
Sigma provides a lot of different settings to make it easy to customize drawing and interaction with networks. Sigma is a rendering engine, and it’s up to you to add all the interactivity you want. The public API makes it possible to modify the data, move the camera, refresh the rendering, listen to events, etc.
It suits best for developers who need a powerful, dedicated graph drawing tool.
Free for all users
Morris.js charting library is quite popular as well. It is used in many admin templates
– both free and premium. The charts used in Morris focus on simplicity and effectiveness.
There are 4 types of charts in the library – line, area, bar, and donut charts.
Morris charts provide a free license. The license details are provided on the website. There is also detailed documentation for the charts.
Free for all users
Cytoscape.js is an open-source graph theory library written in JS. You can use Cytoscape.js for graph analysis and visualization.
Cytoscape.js allows you to easily display and manipulate rich, interactive graphs. Cytoscape.js includes all the gestures out-of-the-box, including pinch-to-zoom, box selection, panning, et cetera.
Cytoscape.js also has a graph analysis. The library contains many useful functions in graph theory. You can use Cytoscape.js headlessly on Node.js
to do graph analysis in the terminal or on a web server.
Rickshaw by Shutterstock
Free for all users
D3.js, jQuery, jsdom
It’s based on d3 underneath, so graphs are drawn with standard SVG and styled with CSS
. Customize everything you like with the techniques you already know.
Rickshaw is free and open-source, available under the MIT license. Developed by Shutterstock company.
Paid. Free licenses to students and for Non-Commercial use.
from $149 to $4999
CanvasJS is a responsive HTML5 charting library with high performance and a simple API. It supports 30 different chart types (including line, column, bar, area, spline, pie, doughnut, stacked charts, etc.), which are all well documented. All charts include interactive features like tooltips, zooming, panning, animation, etc. CanvasJS can be integrated with popular frameworks
, and jQuery) and server-side technologies (PHP
, Ruby, Python, ASP.Net, Node.JS, Java).
Paid for all users
from $350 to $1280
The API is well documented with example charts for each type. A two month trial period is available for evaluation. Licensing is required after the trial period expires.
RAWGraphs is an open web tool to create custom vector-based visualizations on top of the d3.js library. It has been developed by DensityDesign Research Lab (Politecnico di Milano) and Calibro and sustained through corporate stewardship by ContactLab.
It works with tabular data (spreadsheets and comma-separated values) as well as with copied-and-pasted texts from other applications. Based on the SVG format, visualizations can be edited with vector graphics applications for further refinements, or directly embedded into web pages. Here’s an example gallery to explore before diving in.
Talking about flexibility, TauCharts gives you easy access to their API, thus giving users the opportunity to seamlessly map and visualize data to get more amazing insights.
Paid for commercial use
From $49 to $799 to custom price. Free for non-commercial use
AnyChart is a robust, lightweight, and feature-rich JS chart library with rendering in SVG/VML. It actually gives web developers a great opportunity to create different charts that will help them conduct data analysis and make data-driven decisions.
More than 80 JS chart types, including basic charts, stock charts, maps, as well as Gantt and PERT charts.
Many ways to set data: XML, JSON, CSV, JS API, Google Sheets, and HTML Table.
Drill down into chart data.
Stock technical analysis indicators and drawing tools (annotations) out-of-the-box.
It can be integrated with Angular, Qlik, Oracle APEX, React, Elasticsearch, Vue.js
, Android, iOS, etc.
The watermarked version is free. To get rid of the branding, as well as to use AnyChart for any commercial purpose, it’s necessary to buy a license (starts from $49).
It is the most popular library to date. It has more than 11k stars on Github, but there is a huge number (600 to date) of open issues as well.
The documentation is quite extensive but lacks details in some parts. You can find a bunch of examples at Recharts website, which could be a good starting point for building your own charts.
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.
With charting being something we all need to implement so often now, it’s no great surprise that there are many open-source charting libraries available for us to choose from.
If you just need something small and quick, Morris.js or Chart.js might work better for you. For graphs and networks, Cytoscape or Sigma.js is probably the way to go.
If you want to stick to a free and open-source library, use Chart.js. It is extremely simple to use for common use cases. If you need a little more control over rendering, then you could look into Chartist.
To select the best JS chart solution for your unique needs, I recommend testing your own data against a couple of the libraries listed above to ensure a perfect fit for your current and future projects.
P.S. We have prepared a table to show the popularity of libraries by downloading them through npm
. We see that the most popular are d3, chart.js, and Highcharts.
At Flatlogic we develop admin dashboard templates
and React Native templates
. We are listed among the Top 20 Web Development
companies from Belarus and Lithuania. During the last 6 years, we have successfully completed more than 30 big projects
for small startups and large enterprises. As a team, we always have a deep desire to help our clients.
Honorable Mention: Victory
Victory by Formidable Labs caught our attention after the article originally came out. Normally, charts, templates, libraries, and other tools fall into a specific point of the beginner-pro spectrum. Beginner-friendly entries aren’t very customizable and professional tools aren’t too simple. Occasionally, however, there’s a solution that covers more ground on the spectrum, and each of those is a real treat. Victory is one such example.
Victory is customizable in just about every way an average user would ever think of. The default design is simple and concise but you can change it to something more picturesque if that’s what you’re after. And Victory comes with plenty of components and tools making it worthy of your time. Take a look:
Common Container Props
Creating Apps with Flatlogic Platform
We’ve covered the best JS chart libraries and how to make good use of them. Now let’s say a few words about creating complete applications within minutes and with minimal expertise in development. We created the Flatlogic platform
to simplify web development to a few choices. Let’s see what they are!
#1: Name Your Project
This is the straightforward part. Pick a name you’ll associate with your project and move on to step two.
#2: Choose Tech Stack
Choose the base technologies your front-end, backend, and database will run on. In the example above, we chose React, Node.js, and PostgreSQL, respectively.
#3: Choose the Design
Choose the design of the front-end. It’s a matter of personal taste, so there are no wrong choices here.
#4: Database Schema
The schema defines how a database functions. We are to define fields, columns, data types, and relationships between all of the above. If that sounds difficult, you can pick one of the ready schemas we crafted to satisfy popular demands.
#5: Finish the App
Review the choices made so far. Choose the “Connect GIT repository” checkbox if necessary. Hit “Finish”. After that the Platform will compile for a few minutes and offer you your very own App. Enjoy!
appeared first on Flatlogic Blog