JavaScript & React libraryAPI

Type Alias: BarsConfigInterface

BarsConfigInterface = DisplayStateConfigInterface & object

Type declaration

NameTypeDescription
maxDisplayedItems?numberThe 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?booleanSpecifies whether the sorting block should be visible. The sorting block allows users to sort bars by count or alphabetically. Default true
showSearch?booleanSpecifies 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?booleanSpecifies 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) => stringA 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?booleanDetermines 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?) => voidCallback 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) => voidCallback 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.