Type Alias: BarsConfigInterface
BarsConfigInterface =
DisplayStateConfigInterface
&object
Type declaration
Name | Type | Description |
---|---|---|
maxDisplayedItems? | number | The maximum number of bars to display in the bars visualization. When exceeded, a âshow moreâ button will appear to display additional items. Default 10 |
showSortingBlock? | boolean | Specifies whether the sorting block should be visible. The sorting block allows users to sort bars by count or alphabetically. Default true |
showSearch? | boolean | Specifies whether the search container should be visible. Default true |
sort? | "alphabetical" | "count" | Specifies the sort order for the bars visualization. Can be either âalphabeticalâ to sort the bars alphabetically, or âcountâ to sort the bars by their associated count values. Default 'count' |
sortAscending? | boolean | Specifies whether the bars should be sorted in ascending or descending order. If sort is set to 'count' , this determines whether the bars are sorted by their associated count values in ascending or descending order. If sort is set to 'alphabetical' , this determines whether the bars are sorted alphabetically in ascending or descending order. Default false |
countFormatter()? | (count ) => string | A formatter function that is used to format the count values displayed on the bars. This allows for custom formatting of numbers (e.g., adding thousand separators, currency symbols, etc.). |
expanded? | boolean | Determines whether the bars visualization is initially expanded or collapsed. When expanded is true , the bars visualization is initially displayed in an expanded state. When false , the bars visualization is initially displayed in a collapsed state. Default false |
onClick()? | (data? ) => void | Callback function that is called when a bar in the bars visualization is clicked. The handler is passed the BarData object for the clicked bar. |
onBarHover()? | (data ) => void | Callback function that is called when the mouse hovers over a bar in the bars visualization. The handler is passed the BarData object for the hovered bar. |