How to Create a Web Chart Report to Visualize Your Data
Tags: webdev, tutorial, devops, javascript
Published: 2022-12-22 16:10:01

---
canonical_url: https://developer.mescius.com/blogs/the-top-javascript-chart-types-for-web-reports
description: Learn about the top JavaScript chart types for web reports. See more from ActiveReportsJS today.
---
**What You Will Need**
- ActiveReportsJS
- VS Code
- NPM

**Controls Referenced**
- [ActiveReportsJS Charts](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart)

**Tutorial Concept**

With ten different chart types and even more subchart types, ActiveReportsJS provides you guidelines for deciding which web chart type to use based on various characteristics of the desired outcome to help visualize customer data.

---

![](https://files.grapecity.com/gc-website-media/tdnlvvnb/chart-types-2.png?width=500&height=370.4856787048568)

Web reports filter down complex data into a more digestible form, helping users uncover patterns and relationships that they are unable to extract via raw data. Charts are a powerful tool for achieving this, but making sure that you select the correct chart to present your data effectively can be challenging. There are many different chart types from which to choose. The optimal choice depends on the specific data and story that you want to tell.

However, ActiveReportsJS makes this easy. ActiveReportsJS supports over ten different JavaScript chart types, each including up to four unique chart subtypes. This article will present guidelines for deciding which chart type to use based on various characteristics of the desired outcome.

### Visualization Categories

The first thing to decide is what we want the chart to show about the data to the user viewing the report. There are several categories from which you can choose:

*   **[Relationship](#relationship)**- The relationship between two or more data values. For example, a chart could display the relationship between weather conditions and the number of customers who visit an establishment. Looking at such a chart, a report reader could quickly realize if there is any correlation between data values, the nature of this correlation, and so on.
*   **[Composition](#composition)**- The composition reveals how parts of the whole compare in size. A composition can be static, or it can change over a period of time. For example, a chart could display winter coat sales in California and Alaska over the course of a year.
*   **[Comparison](#comparison)**- The comparison shows how data values compare to each other. This is similar to composition, but the comparison could be applied to data values that are not parts of a whole. For example, this could be a chart displaying the average temperature for each month of the year in California versus Alaska.

Next, we’ll look at these categories in more detail and suggest specific chart types for different scenarios. 

### <a id="relationship"></a>Visualization of Relationship

[Scatter charts](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/scatter-bubble#simple-scatter-plot) are a great way to visualize the relationship between two data values. For example, the following chart shows the relationship between **GDP per Capita** and **Life Expectancy**: 

![](https://files.grapecity.com/gc-website-media/gnegjkw1/01-data.png?width=500&height=351.80055401662054)

As you can see, the scatter chart makes it easy to see the positive correlation between higher GDP per Capita and increased Life Expectancy.

A [bubble plot](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/scatter-bubble#simple-bubble-plot) allows you to display the relationship between three variables by using the size of a scatter plot’s items to encode a third variable.

In addition, non-numeric information about data values can be encoded via the color of the items, as in the following example:

![](https://files.grapecity.com/gc-website-media/3khj3t23/02-data.png?width=500&height=351.10803324099726)

### <a id="composition"></a>Visualization of Composition

Charts such as [pie or doughnut charts](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/pie#single-value-pie-plot) allow you to visualize “static” compositions, as in the following example:

![](https://files.grapecity.com/gc-website-media/xbeletxc/03-data.png?width=500&height=486.8421052631579)

As you can see, the data is broken down into different regions, each showing how much of that section of data comprises the whole.

However, if you want to show how the composition changes over time or how composition varies for different categories, there are a couple of factors to consider:

- If there are not many periods or categories to display, you could use a [column or bar](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/column) chart instead.
- If both the relative and absolute differences between parts of the composition matter, then a [stacked](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/column#stacked-column-and-bar) or [clustered](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/column#clustered-column-and-bar) column or bar chart is suitable.

In the following example, the JavaScript Stacked Column Chart shows how the composition of product category sales varies depending on a sales channel:

![](https://files.grapecity.com/gc-website-media/puaje5rx/04-data.png?width=500&height=450.1385041551247)

If, though, only the relative difference between parts of composition matters, you could use a [percentage stacked bar or column chart](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/column#percentage-stacked-column-and-bar):

![](https://files.grapecity.com/gc-website-media/h3ufuxwt/05-data.png?width=500&height=400.27700831024936)

If you have many periods or categories to display, then you can use a [stacked area chart](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/area#stacked-area) when both the absolute and relative differences matter:

![](https://files.grapecity.com/gc-website-media/40xihnh5/06-data.png?width=500&height=351.0416666666667)

If only the relative difference matters, then you can instead opt for using a [percentage stacked area chart](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/area#percentage-stacked-area):

![](https://files.grapecity.com/gc-website-media/furb4cbm/07-data.png?width=500&height=352.29645093945726)

### <a id="comparison"></a>Visualization of Comparison

A line plot is suitable for visualizing data comparisons over time and optionally across several categories. For example, the JavaScript line plot chart below shows the comparison of sales over time for two sales channels:

![](https://files.grapecity.com/gc-website-media/1cbkexdg/08-data.png?width=500&height=350.3118503118503)

### Other Chart Types

So far, we’ve described some of the most frequently used chart types. ActiveReportsJS supports many more chart types for various visualizations:

- [Financial charts](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/financial) can be used to visualize price movements.
- [Radar Lines](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/radar-line), [Areas](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/radar-area), and [Scatter](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/radar-scatter-bubble) plots serve as an alternative to “regular” line, area, and scatter plots described above.
- [Spiral](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/spiral) and [Polar](https://developer.mescius.com/activereportsjs/docs/ReportAuthorGuide/Report-Items/Data-Regions/Chart/plot/polar) charts serve as an alternative to “regular” column and bar charts described in this article.

## Conclusion

In conclusion, while web reports with well-chosen charts can illuminate patterns and relationships hidden in raw data, selecting the most effective chart type can be challenging. With so many JavaScript chart options available, the key is to tailor your choice to the specific data and insights you want to convey, and ActiveReportsJS makes it easy to fit your data with the chart type you need.