Type Alias: HistogramConfigInterface

HistogramConfigInterface = DisplayStateConfigInterface & object

Type declaration

NameTypeDescription
padding?PaddingPadding for the Histogram component. Controls the spacing between the histogram and its container edges. Default { top: 5, left: 5, bottom: 1, right: 5 }
minBarHeight?numberMinimum 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
selectionPadding?numberPadding for the data selection brush. Controls the spacing between the selection brush and the bars. Set in pixels. Default 8
selectionRadius?numberRadius of the data selection brush. Controls the roundness of the selection brush corners. Set in pixels. Default 3
barPadding?numberPadding 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
barRadius?numberCorners roundness of each bar in the Histogram. Controls the visual appearance of the bar corners. Set in pixels. Default 1
barCount?numberNumber of bars to be displayed in the Histogram. Controls the granularity of the data visualization. Ignored if dataStep is set. Default 30
barTopMargin?numberMargin 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
dataStep?numberOption 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
allowSelection?booleanDetermines 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
stickySelection?booleanStick selection brush coordinates to the bar edges. When true, the selection brush will snap to the edges of bars. Default true
labelSideMargin?numberAdjust 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
formatter()?(n) => stringFunction to format the axis tick edge labels in the Histogram component. Allows for custom formatting of the numeric values displayed on the axis.
onBrush()?(selection, isManuallySelected?) => voidCallback for the range selection. Provides current selection of Histogram.
onBarHover()?(data) => voidCallback that is called when a bar is hovered over. Provides BarData for hovered bar: rangeStart, rangeEnd and count of records in this bar.