Class: CosmographHistogram
The CosmographHistogram
class manages histogram visualization within Cosmograph.
It handles creation, configuration, and interaction with the histogram component,
as well as integration with Cosmograph data and filtering mechanisms.
Extends
Constructors
Constructor
new CosmographHistogram(
cosmograph
,targetElement
,config
):CosmographHistogram
Constructs a filtering component that connects Cosmograph data to a UI component.
Parameters
Parameter | Type | Description |
---|---|---|
cosmograph | Cosmograph | The Cosmograph instance to connect to |
targetElement | HTMLElement | HTML element for rendering the UI component |
config | CosmographHistogramConfig | Configuration for the filtering component |
Returns
CosmographHistogram
Inherited from
CosmographInclusiveSelectionComponent
.constructor
Accessors
defaultConfig
Get Signature
get defaultConfig():
CosmographHistogramConfig
Returns
Overrides
CosmographInclusiveSelectionComponent.defaultConfig
accessor
Get Signature
get accessor():
string
Returns
string
Overrides
CosmographInclusiveSelectionComponent.accessor
Methods
remove()
remove():
void
Removes the component and cleans up event listeners
Returns
void
Inherited from
CosmographInclusiveSelectionComponent
.remove
setConfig()
setConfig(
config
):Promise
<void
>
Parameters
Parameter | Type |
---|---|
config | Partial <TConfig > |
Returns
Promise
<void
>
Inherited from
CosmographInclusiveSelectionComponent
.setConfig
getCurrentSelection()
getCurrentSelection():
undefined
|number
[]
Returns the current selection of the histogram in data values.
Returns
undefined
| number
[]
The current selection or undefined
if no selection is active.
getCurrentSelectionInPixels()
getCurrentSelectionInPixels():
undefined
|number
[]
Returns the current selection of the histogram in pixel coordinates.
Returns
undefined
| number
[]
The current selection in pixel coordinates.
getBarWidth()
getBarWidth():
undefined
|number
Returns the current width of the histogram bars.
Returns
undefined
| number
The current width of the histogram bars.
setSelection()
setSelection(
selection?
):void
Sets the selection of the histogram in pixel coordinates.
Parameters
Parameter | Type | Description |
---|---|---|
selection? | [number , number ] | The new selection in pixel coordinates, or undefined to clear the selection. |
Returns
void