Javascript React

Best 19 JavaScript Charts Libraries18 min read

How to choose the right javascript charting library?Top javascript charting librariesConclusionAbout Flatlogic

JavaScript Charting Libraries: Introduction

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 and JavaScript charting in particular is a big issue that we will consider.

Javascript charts are an essential part of a web application for presenting data. It means JavaScript charting libraries are inevitable. The way the human brain itself is programmed is that it understands visual data much better than anything else. Well visualized data creates much more influence than the data being presented as it is, no matter how well it is explained.

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.

But how do you choose the tool that will fit your requirements in the javascript technology zoo? How to choose the right graphics for your data? Should it be paid or free? Build your own solution or take a ready-made tool?

We will try to cover all these questions in this guide. First, we will talk about how to choose the right javascript charting library. Then we will define the criteria for evaluating the tools, and finally, compare the most popular javascript charts on the market.

How to choose the right javascript charting library?

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.

There are quite a few javascript charting libraries around now, but which are the best to use? This can depend on many factors like business needs, types of data, the purpose of the chart itself and many more.

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.Which JavaScript framework do you use?What kind of customization of the look and feel do you need?

Note that in some cases you may not need a data visualization library at all. Sometimes it’s better just to write one from scratch using vanilla JavaScript.

Here is an example of a decision diagram that I have found on the internet

Top JavaScript Charting Libraries

In this article, each JavaScript charting library will be compared with some key factors including chart types, commercial or free, and open-source status. These beautiful libraries have been analyzed thoroughly with hands-on experience to maximize the very best comparison.

Highcharts

License: Free for non-commercial, paid for commercial
Price: Free to $7060
Main dependencies: No dependencies
Web-site: https://www.highcharts.com/

HighCharts a modern javascript charting library based on SVG technology. It doesn’t require any plugin. The integration with all of the major web frameworks 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.

Notable Features:

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-js

License: Open-source
Price: Free
Main dependencies: No dependencies
Web-site: http://gionkunz.github.io/chartist-js/

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.

Features:

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.js

License: Open-source
Price: Free
Main dependencies: D3.js
Web-site: https://c3js.org/

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.

Features:

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.

Chartjs

License: Open-source
Price: Free
Main dependencies: Moment.js
Web-site: https://www.chartjs.org/

The Chart js is an HTML5 based JavaScript library for creating animated, interactive, and customizable charts and graphs. Chart.js is a much lighter product than HighCharts and doesn’t offer quite as much choice.

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.

Plotly

License: Open-source
Price: Free, paid for enterprise
Main dependencies: D3.js, Stack.gl
Web-site: https://plot.ly/

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.

NVD3

License: Open-source
Price: Free, paid for enterprise
Main dependencies: D3.js
Web-site: http://nvd3.org/

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.

Fusion Charts

License: Paid
Price: From $497
Main dependencies: No dependencies
Web-site: https://www.fusioncharts.com/

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.

DyGraphs

License: Open-source
Price: Free for all users
Main dependencies:
Web-site: http://dygraphs.com/

DyGraphs is a fast, flexible open-source JavaScript charting library. It is highly customizable, works in all major browsers (including IE8), and has an active community.

Features:

Linear regression; Synchronization across multiple graphs; Zoom capability; Highlighted regions.

DyGraphs is well suited for large and complex data sets.

D3.js

License: Open-source
Price: Free for all users
Main dependencies:
Web-site: https://d3js.org/

D3 is an open-source JavaScript library released under the BSD license. It provides a tremendous amount of charts, graphs, and other methods for data visualization. D3 gives you almost everything that you need to visually represent your data of any kind.

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.

Sigma charts

License: Open-source
Price: Free for all users
Main dependencies: No dependencies
Web-site: http://sigmajs.org

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.

Morris charts

License: Open-source
Price: Free for all users
Main dependencies: jQuery
Web-site: http://morrisjs.github.io/morris.js/

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.

Cytoscape

License: Open-source
Price: Free for all users
Main dependencies: No dependencies
Web-site: http://js.cytoscape.org/

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

License: Open-source
Price: Free for all users
Main dependencies: D3.js, jQuery, jsdom
Web-site: https://tech.shutterstock.com/rickshaw/

Rickshaw is a JavaScript toolkit for creating interactive time-series graphs. Rickshaw provides the elements you need to create interactive graphs: renderers, legends, hovers, range selectors, etc.

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.

CanvasJS charts

License: Paid. Free licenses to students and for Non-Commercial use.
Price: from $149 to $4999
Main dependencies:
Web-site: https://canvasjs.com/

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 (Angular, React, and jQuery) and server-side technologies (PHP, Ruby, Python, ASP.Net, Node.JS, Java).

Koolchart

License: Paid for all users
Price: from $350 to $1280
Main dependencies:
Web-site: https://www.koolchart.com/

KoolChart is an HTML5 canvas-based JavaScript charting library. The visuals are clean and modern. The use of canvas offers better performance at the expense of being raster-based.

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

License: Apache 2.0
Price: Free
Main dependencies: d3.js
Web-site: https://rawgraphs.io/

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.

Taucharts

License: Apache 2.0
Price: Free
Main dependencies: d3.js
Web-site: https://taucharts.com/

TauCharts is one of the most flexible JavaScript charting libraries out there. It is also D3 based and is a data-focused JavaScript charting library that allows for improved data visualization. The library provides a declarative interface for fast mapping of data fields to visual properties. Its architecture allows you to build facets and extend chart behavior with reusable plugins.

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.

Anychart

License: Paid for commercial use
Price: From $49 to $799 to custom price. Free for non-commercial use
Main dependencies:
Web-site: https://www.anychart.com/

 

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.

Key Features:

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).

Recharts

License: MIT
Price: Free
Main dependencies: d3.js
Web-site: http://recharts.org/en-US/

 

Recharts provides a set of modular javascript charting components and does a great job by letting you mix those components together to easily build things like a composed line and bar chart.

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.

Wrapping Up JavaScript Charting Libraries

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.

All of the javascript charting libraries we mentioned above have very good browser compatibility and fallbacks available for people using legacy browsers. The libraries built upon D3 have a solid base, but personally, I find them a little bit underwhelming from an aesthetic aspect.

Javascript chart Libraries like FusionCharts, GoogleCharts, Dygraphs, or one of the D3 derivatives may work best for corporations with large data sets, or small businesses that rely heavily on data analysis. Both commercial offerings, Highcharts, and FusionCharts are mature libraries that can fit most use cases very well. Both of them have varying degrees of support for large datasets (>100k data points) and support a large variety of charts. If there is a specific type of chart you need to render, the choice might narrow down to only one of them.

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.

 

About Flatlogic

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.

Bonus!

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:

CHARTS

VictoryBoxPlot VictoryArea VictoryAxis VictoryBar VictoryCandlestick VictoryChart VictoryErrorBar VictoryGroup VictoryLine VictoryPie VictoryPolarAxis VictoryScatter VictoryStack VictoryVoronoi VictoryHistogram

CONTAINERS

VictoryBrushContainer VictoryContainer VictoryCursorContainer VictorySelectionContainer VictoryVoronoiContainer VictoryZoomContainer createContainer Common Container Props

MORE

VictoryAccessibleGroup VictoryAnimation VictoryBrushLine VictoryClipContainer VictoryLabel VictoryLegend VictoryPortal VictoryPrimitives VictorySharedEvents VictoryTheme VictoryTooltip VictoryTransition VictoryCanvas

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!

The post Best 19 JavaScript Charts Libraries appeared first on Flatlogic Blog.

Pin It on Pinterest

Generated by Feedzy