OneCX GroupByCountDiagram
Overview
This document aims to showcase how to manage GroupByCountDiagram component.
This component displays the search result data as a diagram. Please, visit the storybook page for the GroupByCountDiagram component and interact with the examples to find out if the component is suitable for the desired use-case.
Customization
The GroupByCountDiagram component allows for content customization:
-
render different types of diagrams
-
enable switching between diagram types
-
set custom colors
To find out how to work with the GroupByCountDiagram component, please visit the storybook page and interact with the examples to find out the required features. For more in-depth information on the GroupByCountDiagram component interface, please read the further documentation.
Inputs
Property name | Type | Default | Description |
---|---|---|---|
|
|
|
Translation key for label below the chart. |
|
|
Type of the chart to be displayed as. |
|
|
|
Add multiple Diagram types to be able to switch between them. |
|
|
|
- |
Data to be displayed as a diagram. |
|
|
Defines the type of the column. |
|
|
|
|
Defines which column data field to be displayed. |
|
- |
Defines which columns and its type to be displayed. |
|
|
|
|
Determines if diagram should generate the colors for the data that does not have any set. Set to false will result in using the provided colors only if every data item has one. When at least one item does not have a color set, diagram will generate all colors. |
|
|
|
Defines custom color for data items. |
Outputs
Property name | Type | Description |
---|---|---|
|
|
Emits data object upon clicking a diagram element. |
|
|
Emits the |
|
|
Emits the selected |
Types
DiagramType
export const enum DiagramType {
PIE = 'PIE',
VERTICAL_BAR = 'VERTICAL_BAR',
HORIZONTAL_BAR = 'HORIZONTAL_BAR',
}