DevExtreme v26.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

Angular Charts - Pyramid Chart

DevExtreme Funnel can display data/information as a pyramid chart. To generate pyramid visualizations, set the algorithm property to "dynamicHeight" and invert the Funnel.

Backend API
<dx-funnel id="pyramid" palette="Harmony light" [dataSource]="dataSource" argumentField="level" valueField="count" [inverted]="true" algorithm="dynamicHeight" [sortData]="false" > <dxo-funnel-title text="Team Composition"> <dxo-funnel-margin [bottom]="30"></dxo-funnel-margin> </dxo-funnel-title> <dxo-funnel-tooltip [enabled]="true"></dxo-funnel-tooltip> <dxo-funnel-item> <dxo-funnel-border [visible]="true"></dxo-funnel-border> </dxo-funnel-item> <dxo-funnel-legend [visible]="true"></dxo-funnel-legend> <dxo-funnel-label visible="true" horizontalAlignment="left" backgroundColor="none" > <dxo-funnel-font [size]="16"></dxo-funnel-font> </dxo-funnel-label> </dx-funnel>
import { bootstrapApplication } from '@angular/platform-browser'; import { Component, enableProdMode, provideZoneChangeDetection } from '@angular/core'; import { DxFunnelModule } from 'devextreme-angular'; import { Data, Service } from './app.service'; if (!/localhost/.test(document.location.host)) { enableProdMode(); } @Component({ selector: 'demo-app', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], providers: [Service], imports: [ DxFunnelModule, ], }) export class AppComponent { dataSource: Data[]; constructor(service: Service) { this.dataSource = service.getData(); } } bootstrapApplication(AppComponent, { providers: [ provideZoneChangeDetection({ eventCoalescing: true, runCoalescing: true }), ], });
::ng-deep #pyramid { height: 440px; }
import { Injectable } from '@angular/core'; export class Data { count: number; level: string; } const data: Data[] = [{ count: 75, level: 'Junior Engineer', }, { count: 95, level: 'Mid-Level Engineer', }, { count: 53, level: 'Senior Engineer', }, { count: 23, level: 'Lead Engineer', }, { count: 18, level: 'Architect', }]; @Injectable() export class Service { getData(): Data[] { return data; } }
<!DOCTYPE html> <html lang="en"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/26.1.5/css/dx.light.css" /> </head> <body class="dx-viewport"> <div class="demo-container"> <demo-app>Loading...</demo-app> </div> <script src="https://cdn.jsdelivr.net/npm/zone.js@0.16.2/bundles/zone.umd.js"></script> <script src="./bundle.js" type="module"></script> </body> </html>

This demo configures the following objects:

  • title
    Specifies component title.
  • tooltip
    Specifies item tooltips.
  • item
    Customizes item appearance.
  • legend
    Configures the component legend.
  • label
    Configures item labels.