Interface: CosmographHistogramConfig
Extends
Properties
accessor?
optional
accessor:string
Data column key to access numeric values for the CosmographHistogram
. Make sure itās included in pointIncludeColumns
or linkIncludeColumns
if youāre not using this column as other point or link accessor.
Default
undefined
Inherited from
CosmographHistogramConfigInterface
.accessor
customExtent?
optional
customExtent: [number
,number
]
Minimum and maximum extent for the CosmographHistogram
visualisation. Can be used if you donāt want histogram range to be automatically calculated from data extent.
Default
undefined
Inherited from
CosmographHistogramConfigInterface
.customExtent
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
CosmographHistogramConfigInterface
.useLinksData
highlightSelectedData?
optional
highlightSelectedData:boolean
Whether to highlight currently selected data on histogram. If true
, can impact performance.
Default
true
Inherited from
CosmographHistogramConfigInterface
.highlightSelectedData
onSelection()?
optional
onSelection: (selection
,isManuallySelected?
) =>void
Callback for the range selection. Provides current selection of CosmographHistogram
.
Parameters
Parameter | Type | Description |
---|---|---|
selection | undefined | [number , number ] | The current selection range. If no selection is made, it will be undefined . |
isManuallySelected? | boolean | Indicates whether the selection was made manually by the user. |
Returns
void
Inherited from
CosmographHistogramConfigInterface
.onSelection
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
HistogramConfigInterface.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
HistogramConfigInterface.loadingMessage
disableStateMessages?
optional
disableStateMessages:boolean
Whether to disable all messages in the DisplayState element.
Default
false
Inherited from
HistogramConfigInterface.disableStateMessages
allowPointerEvents?
optional
allowPointerEvents:boolean
Whether to allow pointer events on the DisplayState element when message is visible.
Default
false
Inherited from
HistogramConfigInterface.allowPointerEvents
padding?
optional
padding:Padding
Padding for the Histogram
component.
Controls the spacing between the histogram and its container edges.
Default
{ top: 5, left: 5, bottom: 1, right: 5 }
Inherited from
HistogramConfigInterface.padding
minBarHeight?
optional
minBarHeight:number
Minimum height for each bar in the Histogram
component.
Ensures that even bars with zero or very small values are still visible.
Set in pixels.
Default
2
Inherited from
HistogramConfigInterface.minBarHeight
selectionPadding?
optional
selectionPadding:number
Padding for the data selection brush. Controls the spacing between the selection brush and the bars. Set in pixels.
Default
8
Inherited from
HistogramConfigInterface.selectionPadding
selectionRadius?
optional
selectionRadius:number
Radius of the data selection brush. Controls the roundness of the selection brush corners. Set in pixels.
Default
3
Inherited from
HistogramConfigInterface.selectionRadius
barPadding?
optional
barPadding:number
Padding between each bar. Controls the spacing between adjacent bars. Set in percent of bar width from 0 (as 0% of the bar width) to 1 (as 100% of the bar width).
Default
0.1
Inherited from
HistogramConfigInterface.barPadding
barRadius?
optional
barRadius:number
Corners roundness of each bar in the Histogram
.
Controls the visual appearance of the bar corners.
Set in pixels.
Default
1
Inherited from
HistogramConfigInterface.barRadius
barCount?
optional
barCount:number
Number of bars to be displayed in the Histogram
.
Controls the granularity of the data visualization.
Ignored if dataStep
is set.
Default
30
Inherited from
HistogramConfigInterface.barCount
barTopMargin?
optional
barTopMargin:number
Margin between the top edge of the Histogram
and the maximum height bar.
Controls the spacing between the highest bar and the top of the container.
Set in pixels.
Default
3
Inherited from
HistogramConfigInterface.barTopMargin
dataStep?
optional
dataStep:number
Option to generate bars of a specified width in the X axis units.
Overrides barCount
when set.
Useful for creating bars of consistent width across different data ranges.
Default
undefined
Inherited from
HistogramConfigInterface.dataStep
allowSelection?
optional
allowSelection:boolean
Determines whether or not the Histogram
allows users to select bars using a selection brush control.
When true, users can drag to select a range of bars.
Default
true
Inherited from
HistogramConfigInterface.allowSelection
stickySelection?
optional
stickySelection:boolean
Stick selection brush coordinates to the bar edges. When true, the selection brush will snap to the edges of bars.
Default
true
Inherited from
HistogramConfigInterface.stickySelection
labelSideMargin?
optional
labelSideMargin:number
Adjust the margin between the axis tick edge labels and the horizontal edges of the Histogram
component bounding box.
Controls the spacing between the axis labels and the histogram edges.
Set in pixels.
Default
3
Inherited from
HistogramConfigInterface.labelSideMargin
formatter()?
optional
formatter: (n
) =>string
Function to format the axis tick edge labels in the Histogram component. Allows for custom formatting of the numeric values displayed on the axis.
Parameters
Parameter | Type | Description |
---|---|---|
n | number | The numeric value to format |
Returns
string
The formatted string representation of the number
Inherited from
HistogramConfigInterface.formatter
onBrush()?
optional
onBrush: (selection
,isManuallySelected?
) =>void
Callback for the range selection.
Provides current selection of Histogram
.
Parameters
Parameter | Type | Description |
---|---|---|
selection | undefined | [number , number ] | The current selection range as [start, end] numbers |
isManuallySelected? | boolean | Whether the selection was made by user interaction |
Returns
void
Inherited from
HistogramConfigInterface.onBrush
onBarHover()?
optional
onBarHover: (data
) =>void
Callback that is called when a bar is hovered over.
Provides BarData
for hovered bar: rangeStart
, rangeEnd
and count
of records in this bar.
Parameters
Parameter | Type | Description |
---|---|---|
data | HistogramBarData | The data for the hovered bar |
Returns
void
Inherited from
HistogramConfigInterface.onBarHover