We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Overview

The Angular Histogram Chart is a bar (column) chart used for frequency distribution where the widths of bars are proportional to classes into which variables have been divided and the heights of the bars are proportional to class frequencies.


Distribution curve

Provides a graphical representation of the normal distribution of data.


Marker

Mark data points with built-in shapes such as circles, rectangles, ellipses, vertical lines, horizontal lines, diamonds, triangles, pentagons, crosses, and pluses. In addition to these shapes, use images to make the points more attractive.


Data label

Data labels display information about data points. Add a template to display data labels with HTML elements such as images, DIV, and spans for more informative data labels. You can rotate a data label by its given angle.


Vertical chart

The Angular Histogram Chart can be transposed vertically to view the data in a different perspective.


Customization

Customizes the color and border of the histogram chart using built-in APIs to make it visually unique.


Angular Histogram Chart Code Example

Easily get started with Angular Histogram Chart by using a few lines of HTML and TS code, as demonstrated below. Also explore our Angular Histogram Chart Example that shows how to render and configure the chart.

<ejs-chart style='display:block' id='chartcontainer'  [primaryXAxis]='primaryXAxis'>
<e-series-collection>
     <e-series [dataSource]='chartData' type='Histogram' xName='x' yName='y'> </e-series>
</e-series-collection>
</ejs-chart>
//app.component.ts

import { Component } from '@angular/core';
export class AppComponent {
 public chartData: Object[] = [];
 public points: number[] = [5.250, 7.750, 0, 8.275, 9.750, 7.750, 8.275, 6.250, 5.750,
        5.250, 23.000, 26.500, 27.750, 25.025, 26.500, 26.500, 28.025, 29.250, 26.750, 27.250,
        26.250, 25.250, 34.500, 25.625, 25.500, 26.625, 36.275, 36.250, 26.875, 40.000, 43.000,
        46.500, 47.750, 45.025, 56.500, 56.500, 58.025, 59.250, 56.750, 57.250,
        46.250, 55.250, 44.500, 45.525, 55.500, 46.625, 46.275, 56.250, 46.875, 43.000,
        46.250, 55.250, 44.500, 45.425, 55.500, 56.625, 46.275, 56.250, 46.875, 43.000,
        46.250, 55.250, 44.500, 45.425, 55.500, 46.625, 56.275, 46.250, 56.875, 41.000, 63.000,
        66.500, 67.750, 65.025, 66.500, 76.500, 78.025, 79.250, 76.750, 77.250,
        66.250, 75.250, 74.500, 65.625, 75.500, 76.625, 76.275, 66.250, 66.875, 80.000, 85.250,
        87.750, 89.000, 88.275, 89.750, 97.750, 98.275, 96.250, 95.750, 95.250
    ];
    points.map((value: number) => {
        chartData.push({
            y: value
        });
    });
 //Initializing Primary X Axis
public primaryXAxis: Object = {
    valueType: 'Category',
     
};
}
//app.module.ts

import { ChartModule } from '@syncfusion/ej2-ng-charts';
import { StackingAreaSeriesService, CategoryService} from '@syncfusion/ej2-ng-charts';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule, ChartModule
  ],
  providers: [ StackingAreaSeriesService, CategoryService],
  bootstrap: [AppComponent]
})
export class AppModule { }

Learning Resources

UG

Histogram Chart User Guide

Learn the available options to customize Angular Histogram Chart.

API

Histogram Chart API Reference

Explore the Angular Histogram Chart APIs.


85+ ANGULAR UI COMPONENTS

Scroll up icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon