Interface: CosmographBarsConfig
Extends
Properties
useLinksData?
optional
useLinksData:boolean
Defines type of Cosmograph Crossfilter to use. true
for links, false
for points. Can only be set once during initialization.
Default
false
Inherited from
CosmographBarsConfigInterface
.useLinksData
accessor?
optional
accessor:string
Data column key to access time values for the CosmographBars
.
Default
undefined
Inherited from
CosmographBarsConfigInterface
.accessor
selectOnClick?
optional
selectOnClick:boolean
Enables or disables selecting points with bar value on graph by clicking.
Default
true
Inherited from
CosmographBarsConfigInterface
.selectOnClick
noDataMessage?
optional
noDataMessage:string
|false
Text to display when there is no data. When set to false
, this message will not be displayed.
Default
'No data'
Inherited from
BarsConfigInterface.noDataMessage
loadingMessage?
optional
loadingMessage:string
|false
Text to display when data is loading. When set to false
, this message will not be displayed.
Default
'Data loading...'
Inherited from
BarsConfigInterface.loadingMessage
disableStateMessages?
optional
disableStateMessages:boolean
Whether to disable all messages in the DisplayState element.
Default
false
Inherited from
BarsConfigInterface.disableStateMessages
allowPointerEvents?
optional
allowPointerEvents:boolean
Whether to allow pointer events on the DisplayState element when message is visible.
Default
false
Inherited from
BarsConfigInterface.allowPointerEvents
maxDisplayedItems?
optional
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
Inherited from
BarsConfigInterface.maxDisplayedItems
showSortingBlock?
optional
showSortingBlock:boolean
Specifies whether the sorting block should be visible. The sorting block allows users to sort bars by count or alphabetically.
Default
true
Inherited from
BarsConfigInterface.showSortingBlock
showSearch?
optional
showSearch:boolean
Specifies whether the search container should be visible.
Default
true
Inherited from
BarsConfigInterface.showSearch
sort?
optional
sort:"count"
|"alphabetical"
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'
Inherited from
BarsConfigInterface.sort
sortAscending?
optional
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
Inherited from
BarsConfigInterface.sortAscending
countFormatter()?
optional
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.).
Parameters
Parameter | Type | Description |
---|---|---|
count | number | The numeric value to format |
Returns
string
The formatted string representation of the count
Inherited from
BarsConfigInterface.countFormatter
expanded?
optional
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
Inherited from
BarsConfigInterface.expanded
onClick()?
optional
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.
Parameters
Parameter | Type | Description |
---|---|---|
data? | BarData | The data for the clicked bar, or undefined if no bar is selected |
Returns
void
Inherited from
BarsConfigInterface.onClick
onBarHover()?
optional
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.
Parameters
Parameter | Type | Description |
---|---|---|
data | BarData | The data for the hovered bar |
Returns
void
Inherited from
BarsConfigInterface.onBarHover