Example shows Angular Funnel Chart with Index Labels for each stage
/* app.component.ts */ import { Component } from '@angular/core'; import { RouterOutlet } from '@angular/router'; import { CommonModule } from '@angular/common'; import { CanvasJSAngularChartsModule } from '@canvasjs/angular-charts'; @Component({ selector: 'app-root', standalone: true, imports: [RouterOutlet, CommonModule, CanvasJSAngularChartsModule], templateUrl: './app.component.html', styleUrl: './app.component.css', }) export class AppComponent { chartOptions = { animationEnabled: true, title: { text: "Email Conversation Rate" }, data: [{ type: "funnel", indexLabel: "{name}: {y}", valueRepresents: "area", dataPoints: [ { y: 10000, name: "Recieved Email" }, { y: 2000, name: "Opened Email" }, { y: 1500, name: "Visited Website" }, { y: 500, name: "Added Product to Cart" }, { y: 250, name: "Completed Purchase" } ] }] } }
<div> <canvasjs-chart [options]="chartOptions" [styles]="{width: '100%', height:'360px'}"></canvasjs-chart> </div>
Neck of the funnel can be customized using neckHeight and neckWidth properties. You can also reverse the funnel by setting the reversed property to true.