Bridging the gap between low-level and high-level JavaScript Chart libraries.

August 02, 2018 0 Comments

Bridging the gap between low-level and high-level JavaScript Chart libraries.

 

 

Presenting data in an effective way is becoming more and more important in the data-driven world. For web developers, the choice of selecting the right data-visualization library is vast and the list of chart libraries is getting bigger every day. You might ask now — why again?

ApexCharts is a free and open-source modern charting library released under MIT license that helps developers to create interactive visualizations for web pages. It is developed to bridge the gap between the existing low-level and high-level chart libraries.

Granted, there are dozens of chart libraries including the commercial ones which have evolved heavily in the last decade. Many of them are simply amazing, but costly to use for a simple dashboard. Many of them are just bloated trying to do everything but fails to do one thing perfectly. ApexCharts attempts to pick good things from these libraries and provide one with a simple API. It doesn’t try to be a “one size fits all” solution, but rather a proposal to create modern charts for web dashboards.

We will compare ApexCharts with existing open-source high-level, declarative chart solutions and not a low-level chart library (eg., d3.js).

Many open-source chart libraries don’t support this highly interactive feature out of the box. Some do provide this as add-on but I haven’t seen a smoother experience in them. ApexCharts places good amount of importance to the zooming/scrolling and allows multiple options to traverse the data in the chart.

Informative labels along with lines placed over specific values on y-axis and/or x-axis can be incredibly helpful to interpret charts easily. ApexCharts has finite control over the placements of the annotations including font-size/color/border of the labels and line.

The true meaning of interactivity is — combining multiple charts and passing information one to other. This is achieved by triggering events on several actions and returning the new data in the callback functions — the new data then can be used to modify the data of other charts. This way we have unlimited possibilities to create charts based on other charts.

A yearly bar chart provides a broader view to a quarterly column chart on interaction

Responsiveness in charts isn’t just resizing the whole chart and make it equal to screen size, but allow to provide multiple configs for different screen sizes. ApexCharts has an intuitive way to override default config with another config based on viewport width.

A bar chart converted to column chart for smaller display size

Don’t just limit your charts with plain colors in the primary elements. Give colors, gradients, shadows, patterns, images to your chart components and customize to fit your design needs. You can even customize the SVG element through css as each element is given a unique class name.

Github inspired charts

The above visualization has 2 different area charts synchronized and are customized to Github style — a small example of unlimited possibilities.

Utilize sparkLines to indicate trends in data, for example, occasional increments or declines, monetary cycles, or to feature most extreme and least values.

Small lines and bars to show trends

Use Heatmaps to represent data through colors and shades. Frequently used with bigger data collections, they are valuable for recognizing patterns and area of focus.

Show data with the help of colors and shades to catch attention to particular regions

Often ignored, these tiny gauges are an important part of a dashboard and are useful in displaying single series data in small place.

Radialbars / circular gauges to enhance dashboards

ApexCharts has a single dependency on SVG.js, a battle-tested library. Without re-inventing the wheel in this area, we leverage the full power of SVG.js.

ApexCharts on Github


Tag cloud