Pyramid
Pyramid charts are useful for representing stages in a sales process and for displaying the amount of potential revenues from each stage. They are also suitable for identifying potential problem areas in the sales processes of an organization and for displaying several values.
Binding to Data
You can bind the Pyramid chart series to an array through the data property in three formats:
-
Binding to numbers—Use a simple array of numeric values.
tspublic data: number[] = [120, 90, 60, 30]; -
Binding to arrays—Use arrays of
[value, category]pairs.tspublic data: [number, string][] = [ [120, 'Stage 1'], [90, 'Stage 2'], [60, 'Stage 3'], [30, 'Stage 4'] ]; -
Binding to objects—Use an array of objects with custom properties.
tspublic data: Array<{ value: number; category: string; color?: string }> = [ { value: 120, category: 'Stage 1', color: '#ff6358' }, { value: 90, category: 'Stage 2', color: '#ffd246' }, { value: 60, category: 'Stage 3', color: '#28b4c8' }, { value: 30, category: 'Stage 4', color: '#2d73f5' } ];When binding to objects, specify which properties contain the data through the following field mappings:
Property Data type Required Description fieldstringYes* The property name that contains the numeric value (*required when binding to objects). categoryFieldstringNo The property name that contains the category with string,date, ornumbervalues.colorFieldstringNo The property name that contains the color with stringvalues.
The following example demonstrates how to bind the Pyramid chart series to data using object models.
Fixed Height
By default, the height of the pyramid segments is proportional to the value. You can use a fixed height for all segments by setting dynamicHeight property to false.
The following example demonstrates the dynamicHeight property in action.
Support and Learning Resources
- Pyramid Chart Homepage
- Getting Started with the Kendo UI for Angular Chart
- API Reference of the Charts
- Glossary
- Getting Started with Kendo UI for Angular (Online Guide)
- Getting Started with Kendo UI for Angular (Video Tutorial)
- Video Courses
- Chart Forum
- Before You Start: All Things Angular (Telerik Blog Post)
- Knowledge Base