API / geotoolkit / controls / shapes / Histogram / Histogram

Class: Histogram

shapes.Histogram.Histogram

Create a advanced histogram shape, which is a graphical display of tabulated frequencies, shown as bars.
The histogram can be customized using the options like 'bin spacing','Frequency Type', 'colors' etc. Refer to options below for more details.

Hierarchy

Table of contents

Constructors
Methods
addCssClassaddInvalidateHandlerapplyOpacity
applyResponsiveStyleareValuesCustomizedcalculate
checkCollisionclonecomputeStatistics
connectStylecopyConstructordisconnectStyle
disposeenableEventPropagationexecute
filtergetAccumulatedModegetAnimationStyle
getAutoGradientgetBinAtgetBinCount
getBinSpacinggetBinsgetBinsAt
getBinsByIndicesgetBoundsgetClassName
getClipStylegetContentsTransformgetCss
getCssClassgetCssClassesgetCssTransform
getDatagetDataSourcegetDisplayUnit
getFillStylegetFrequencygetFrequencyType
getHighValueInclusivegetHighlightStylegetHighlightedBins
getHistogramModegetIdgetIndicesByBin
getInvalidateMethodgetLineStylegetLocalTransform
getMarginsStylegetMaxFrequencygetMaxValue
getMinValuegetModelLimitsgetName
getOpacitygetOpacityBlendModegetOptions
getOrientationgetParentgetProperties
getPropertygetPropertyKeysgetRenderingFilter
getResponsiveStylegetRootgetScaleScrollStrategy
getSceneTransformgetStartValuegetStatistics
getStatisticsDescriptiongetTaggetVerticalScaling
getVisiblegetWorldTransformgetZIndex
hasCssClasshasEventListenerhighlightBins
hitTestinvalidateinvalidateParent
isAutoBinCountisDisposedisEventPropagationEnabled
isNotificationEnabledisSelectableisSilent
notifyoffon
onParentChangedonVisibilityChangedpostRendering
preRenderingregisterAnimationStyleremoveCssClass
removeInvalidateHandlerrenderrenderAsync
resetBinCountresetValuesrotate
scalesetAccumulatedModesetAnimationStyle
setAutoGradientsetBinCountsetBinSpacing
setBinStepssetBoundssetClipStyle
setCsssetCssClasssetCssTransform
setDatasetFillStylesetFrequencyType
setHighLightStylessetHighValueInclusivesetHighlightStyle
setHistogramModesetIdsetLineStyle
setLocalTransformsetLogStartValuesetMarginsStyle
setNamesetNeatLimitsXsetNeatLimitsY
setNotificationsetOpacitysetOptions
setOrientationsetPropertiessetProperty
setRenderingFiltersetResponsiveStylesetScaleScrollStrategy
setSelectablesetSilentsetTag
setUnitsetValueRangesetVerticalScaling
setVisiblesetZIndexshear
toStringtranslateunregisterAnimationStyle
updateBinCountupdateModelLimitsupdateSceneTransformation
updateStateupdateTimeStampenableSceneGraphNotification
findParentgetClassNameintersectsBounds
isSceneGraphNotificationEnabled
Css Properties
Name Type Description
clipstyleClipStyleClipping style
clipstyle-evenoddbooleanTrue if evenodd mode is on ('nonzero' mode otherwise)
clipstyle-geometryGraphicsPathClipping geometry
clipstyle-geometry-boundsRectBounds
clipstyle-geometry-bounds-heightnumberHeight
clipstyle-geometry-bounds-readonlybooleanReadonly
clipstyle-geometry-bounds-widthnumberWidth
clipstyle-geometry-bounds-xnumberLeft
clipstyle-geometry-bounds-ynumberTop
clipstyleGraphicsPathClipping style
cssclassstringThe css class name of this node
csscursorstringCSS cursor associated with node
cssstylestringCSS style to be applied to inserted elements
fillstylestringStyle applied on fill
fillstyleFillStyleStyle applied on fill
fillstyle-colorstringColor in CSS form
fillstyle-evenoddmodebooleanEven-odd fill mode
fillstyle-fillpatternPatternPattern
fillstyle-fillpattern-containernamestringAn optional container name, which creates an image pattern. This parameter is used for serialization if you want to save are reference to pattern instead of the pattern itself
fillstyle-fillpattern-patternnamestringName of this pattern for indexing
fillstyle-fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
fillstyle-foregroundstringForeground color
fillstyle-patternPatternPattern
idstring | numberId of the node, its a unique identifier
linestylestringStyle applied on outline
linestyleLineStyleStyle applied on outline
linestyle-colorstringColor in CSS form
linestyle-fillstringOptional fill style to be used to fill lines generated with this style
linestyle-fillFillStyleOptional fill style to be used to fill lines generated with this style
linestyle-linecapCapStyleThe line cap style
linestyle-linedashoffsetnumberLine dash offset of dashed line
linestyle-linejoinJoinStyleThe line join style
linestyle-pixelsnapmodebooleanPixel Snap Mode, default(
linestyle-scalablebooleanTrue if width should depend on transformation
linestyle-unitstringOptional unit for the width
linestyle-widthnumber | stringThe line thickness
localtransformTransformationLocal transformation
localtransform-dxnumberX axis translation
localtransform-dynumberY axis translation
localtransform-xxnumberX scale
localtransform-xynumberXy skew
localtransform-yxnumberYx skew
localtransform-yynumberY scale
marginsnumber | stringIt has properties for specifying the margins for each side
namestringName of the node. It is often used for debugging purposes or to simplify queries
opacitynumberNode opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context
opacityblendmodeBlendModeNode opacity mode to blend it
scalescrollstrategyScaleScrollStrategyScale scroll strategy
scalescrollstrategy-enabledbooleanEnable flag
selectablebooleanSelectable node, a boolean to determine if selection should consider this node
taganyCustom information associated with node. It is a user object which can be used by client code to store information or attach an application object to the shape
transformstringAdditional CSS transformation applied to node or 'none'
transformTransformationAdditional CSS transformation applied to node or 'none'
visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
z-indexnumberDefine node z-index

Contents

Constructors

new Histogram(options, bounds, bins)

new Histogram(options?, bounds?, bins?)

Create Histogram

Parameters

Name Type Description
Optional optionsnumber[] | NumericalDataSeries | Options | NumericalDataSeriesViewobject
Optional boundsRectbounds of the node
Optional binsnumbernumber of bins this histogram has

Overrides

Shape.constructor

Methods

addCssClass

addCssClass(cssclass): Histogram

Adds new css class to node

Parameters

Name Type Description
cssclassstring | string[]css class name('s)

Returns

Histogram

this

Inherited from

Shape.addCssClass


addInvalidateHandler

addInvalidateHandler(handler): Histogram

Add invalidate handler

Deprecated

since 4.0, use Node.on instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

Histogram

this

Inherited from

Shape.addInvalidateHandler


applyOpacity

Protected applyOpacity(context): Histogram

This method is called to apply opacity if it is specified on the rendering context. The default implementation sets global alpha on the rendering context

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

Histogram

this

Inherited from

Shape.applyOpacity


applyResponsiveStyle

Protected applyResponsiveStyle(): void

Apply a responsive style rules it is exists

Returns

void

Inherited from

Shape.applyResponsiveStyle


areValuesCustomized

areValuesCustomized(): boolean

Resets the highest and lowest values to be computed values

Returns

boolean

_areCustomizedEdges


calculate

calculate(keepModelLimits?): Histogram

Calculate distribution with normalization

Parameters

Name Type Description
Optional keepModelLimitsbooleanset if keep model limits unchanged

Returns

Histogram


checkCollision

checkCollision(context): boolean

Check collision

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

boolean

true if object is inside of rendarable area

Overrides

Shape.checkCollision


clone

clone(): Node

All subclasses should override copyConstructor or provide custom implementation for this method

Returns

Node

clone

Inherited from

Shape.clone


computeStatistics

computeStatistics(): void

Computers the statics based on the new data

Returns

void


connectStyle

connectStyle(style, type, callback): Histogram

Connects style.

This convenience method subscribes a listener to given style for the specified type.
And automatically un-subscribes listener if node is disposed to prevent memory leaks

Parameters

Name Type Description
styleEventDispatcherconnect style
typestringtype of event or property
callbackAttributeCallback<EventDispatcher>function to be called

Returns

Histogram

this

Inherited from

Shape.connectStyle


copyConstructor

Protected copyConstructor(src, deepCopy?): Histogram

Copy constructor function.
Function used as part of the cloning mechanism.
Implementations should copy the given instance state to this instance.

Parameters

Name Type Description
srcShapeSource to copy from
Optional deepCopybooleandeep copy

Returns

Histogram

this

Inherited from

Shape.copyConstructor


disconnectStyle

disconnectStyle(style, type, callback): Histogram

Disconnect style
This convenience method un-subscribes a listener to given style for the specified type.

Parameters

Name Type Description
styleEventDispatcherconnect style
typestringtype of event or property
callbackAttributeCallback<EventDispatcher>function to be called

Returns

Histogram

this

Inherited from

Shape.disconnectStyle


dispose

dispose(): void

Disposes this node, once disposes a node should not be used anymore.
Clear all listeners, and disconnect styles to avoid memory leaks.
Also aggressively 'cleanup' this node by setting some of its members to null.

Returns

void

Inherited from

Shape.dispose


enableEventPropagation

enableEventPropagation(enable): Histogram

Enable event propagation from the node hierarchy from bottom to top

This option is similar to DOM Event bubbling, which allows to get any event from child node. By default it is disabled for better performance.

Example

import {Group} from '@int/geotoolkit/scene/Group';
import {Events as SceneEvents} from '@int/geotoolkit/scene/Node';
const parentGroup = new Group()
.setName('ParentGroup')
.enableEventPropagation(true);
const childGroup = new Group()
.setName('ChildGroup');

parentGroup.addChild(childGroup);
parentGroup.on(SceneEvents.Invalidate, (eventName, sender, args) => {
// Got notifications from all children of parent group
});
childGroup.invalidate();

Parameters

Name Type Description
enablebooleanenable

Returns

Histogram

this

Inherited from

Shape.enableEventPropagation


execute

execute(delegate): Histogram

Executes delegate and return the result. It allows us to keep all initialization calls in one place,
and we do not need to scroll up or down in IDE to find how and where it was initialized.

Example

// All setters (.setName() for example) returns reference to the this.
// In order to modify inner object like LineStyle or Pattern, to get this object (property) we should call getter to get object reference.
// Then modify it as shown below in Option 1 or you can use execute methods shown in Option 2.
import {Group} from '@int/geotoolkit/scene/Group';
import {Rect} from '@int/geotoolkit/util/Rect';
// Option 1
const group = new Group()
.setName('MyGroup')
.setBounds(new Rect(0, 0, 42, 16))
.enableClipping(true)
.setTag({'type': 'sometype'});

group.getLineStyle().setPattern('pattern');
return group;

// Options 2 ( using execute method )
return group
.execute(function () {
this.getLineStyle()
.setPattern("pattern");
});

Parameters

Name Type Description
delegate(this: Histogram) => voidFunction to execute

Returns

Histogram

The result if any or this

Inherited from

Shape.execute

execute<T>(delegate): T

Type parameters

Name
T

Parameters

Name Type
delegate(this: Histogram) => T

Returns

T

Inherited from

Shape.execute


filter

Protected filter(context): boolean

Filter node

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

boolean

flag filter flag ("true" to render node; "false" otherwise)

Inherited from

Shape.filter


getAccumulatedMode

getAccumulatedMode(): AccumulatedMode

Gets accumulated mode

Returns

AccumulatedMode


getAnimationStyle

getAnimationStyle(): AnimationStyle

Return animation style

Returns

AnimationStyle

animationStyle current animation style

Inherited from

Shape.getAnimationStyle


getAutoGradient

getAutoGradient(): boolean

Gets if we are auto gradient

Returns

boolean


getBinAt

getBinAt(x, excludeGaps?): Bin & { indices?: number[] }

Gets the bin at the input x value

Parameters

Name Type Description
xnumberinput x value
Optional excludeGapsbooleanTrue if gaps between bins should be excluded

Returns

Bin & { indices?: number[] }

  • bin at input x value

getBinCount

getBinCount(): number

Return bin count

Returns

number

a count of bins


getBinSpacing

getBinSpacing(): number

Gets percentage of fill

Returns

number


getBins

getBins(): Bin[]

Gets the values of the bins in the following array format Array [{ 'minvalue' : number, 'maxvalue' : number, 'binnumber' : number, 'frequency' : number }, ...]

Returns

Bin[]

Array of bins objects


getBinsAt

getBinsAt(x): Bin[]

Gets the bin at the input x value

Parameters

Name Type Description
xPoint | Rect | Rangeinput x value

Returns

Bin[]

Array of bins objects


getBinsByIndices

getBinsByIndices(indices): number[]

Returns bin numbers for specified indices

Parameters

Name Type Description
indicesnumber[]of indices

Returns

number[]


getBounds

getBounds(): Rect

Returns current bounds

Returns

Rect

bounds


getClassName

getClassName(): string

Returns

string

Inherited from

Shape.getClassName


getClipStyle

getClipStyle(): ClipStyle

Gets the current clipping style

Returns

ClipStyle

clipping style

Inherited from

Shape.getClipStyle


getContentsTransform

getContentsTransform(): Transformation

Retrieves the world transformation of the spatial.

Returns

Transformation


getCss

getCss(): CssStyle

Return CSS style

Returns

CssStyle

Inherited from

Shape.getCss


getCssClass

getCssClass(): string

Returns css class name to be used to apply CSS style

Returns

string

the css class name

Inherited from

Shape.getCssClass


getCssClasses

getCssClasses(): string[]

Gets list of css class names which applied to this node

Returns

string[]

Inherited from

Shape.getCssClasses


getCssTransform

getCssTransform(): string

Returns CSS transformation

Returns

string

Inherited from

Shape.getCssTransform


getData

getData(): Object

get raw data

Returns

Object

NameType
datanumber[]
maxvaluenumber
minvaluenumber

getDataSource

getDataSource(): number[] | NumericalDataSeries | NumericalDataSeriesView

Return histogram data source

Returns

number[] | NumericalDataSeries | NumericalDataSeriesView

data source


getDisplayUnit

getDisplayUnit(): AbstractUnit

get displayed unit

Returns

AbstractUnit

unit


getFillStyle

getFillStyle(): FillStyle

Return fill style

Returns

FillStyle

fillStyle current fill style

Inherited from

Shape.getFillStyle


getFrequency

getFrequency(index, ignoreMode?): number

Gets the frequency for the current index

Parameters

Name Type Description
indexnumbercurrent index
Optional ignoreModebooleanignore mode on or not

Returns

number


getFrequencyType

getFrequencyType(): FrequencyType

Gets frequency type

Returns

FrequencyType


getHighValueInclusive

getHighValueInclusive(): boolean

gets if the high value is inclusive

Returns

boolean


getHighlightStyle

getHighlightStyle(): FillStyle

Gets highlight style

Returns

FillStyle


getHighlightedBins

getHighlightedBins(): number[]

get highlighted bins

Returns

number[]

bins number array


getHistogramMode

getHistogramMode(): HistogramMode

Gets the histogram mode

Returns

HistogramMode


getId

getId(): string | number

Returns the associated identifier of the node

Returns

string | number

The node's id

Inherited from

Shape.getId


getIndicesByBin

getIndicesByBin(index): number[]

Gets indices by bin number

Parameters

Name Type Description
indexnumberindex

Returns

number[]

of indices


getInvalidateMethod

Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>

Gets invalidate method

Returns

AttributeCallback<EventDispatcher>

method to invalidate this object

Inherited from

Shape.getInvalidateMethod


getLineStyle

getLineStyle(): LineStyle

Return line style

Returns

LineStyle

lineStyle current line style

Inherited from

Shape.getLineStyle


getLocalTransform

getLocalTransform(): Transformation

Retrieves the transformation of bounds to parent

Returns

Transformation

transform the local transform.

Inherited from

Shape.getLocalTransform


getMarginsStyle

getMarginsStyle(): SpaceStyle<string | number>

Return margins style

Returns

SpaceStyle<string | number>

Inherited from

Shape.getMarginsStyle


getMaxFrequency

getMaxFrequency(): number

Maximum frequency

Returns

number


getMaxValue

getMaxValue(): number

Get highest value to be displayed

Returns

number

_maxValue


getMinValue

getMinValue(): number

Get lowest value to be displayed

Returns

number

_minValue


getModelLimits

getModelLimits(): Rect

Gets model limits

Returns

Rect

the current model limits


getName

getName(): string

Returns the node name

Returns

string

The node name

Inherited from

Shape.getName


getOpacity

getOpacity(): number

Returns current node opacity

Returns

number

opacity

Inherited from

Shape.getOpacity


getOpacityBlendMode

getOpacityBlendMode(): BlendMode

Returns current node opacity

Returns

BlendMode

opacity blend mode

Inherited from

Shape.getOpacityBlendMode


getOptions

getOptions(): OptionsBaseOut

Returns

OptionsBaseOut


getOrientation

getOrientation(): Orientation

get orientation

Returns

Orientation


getParent

getParent(): Node

Return parent node

Returns

Node

parent node

Inherited from

Shape.getParent


getProperties

getProperties(): OptionsOut

Returns shape properties

Returns

OptionsOut

object

Overrides

Shape.getProperties


getProperty

getProperty(name): any

Gets dynamic property by name. These properties can be used as a property bags

Parameters

Name Type Description
namestringproperty name

Returns

any

Inherited from

Shape.getProperty


getPropertyKeys

getPropertyKeys(): string[]

Returns known properties keys

Returns

string[]

Inherited from

Shape.getPropertyKeys


getRenderingFilter

getRenderingFilter(): IFilter

Return filter to be used for rendering and picking

Returns

IFilter

current filter

Inherited from

Shape.getRenderingFilter


getResponsiveStyle

getResponsiveStyle(): ResponsiveStyle

Return responsive style

Returns

ResponsiveStyle

Inherited from

Shape.getResponsiveStyle


getRoot

getRoot(): Node

Returns root node.
If node doesn't have parent then it returns itself.

Returns

Node

the root node

Inherited from

Shape.getRoot


getScaleScrollStrategy

getScaleScrollStrategy(): Delegate

Gets scale scroll strategy

Returns

Delegate

scale scroll strategy

Inherited from

Shape.getScaleScrollStrategy


getSceneTransform

getSceneTransform(): Transformation

Returns transformation from node to root scene

Returns

Transformation

a transformation from node to root scene

Inherited from

Shape.getSceneTransform


getStartValue

getStartValue(): number

Gets log start value

Returns

number


getStatistics

getStatistics(): number[]

Returns calculated statistics of values see description Histogram.getStatisticsDescription

Example

- Data samples count
- min sample value
- max sample value
- average value
- variance value
- average deviation value
- standard deviation value
- skewness value
- standard kurtosis value
- Theoretical P10 value (centile)
- Theoretical P50 value (centile)
- Theoretical P90 value (centile)

Returns

number[]

statistics


getStatisticsDescription

getStatisticsDescription(): string[]

Descriptions of statistics

Example

return ["Sample Count", "Min", "Max", "Average", "Variance", "Avg. Deviation", "Std. Deviation", "Skewness", "Kurtosis", "P10", "P50", "P90"]

Returns

string[]


getTag

getTag(): any

Returns the object associated with the node by user.

Returns

any

The node's user-object

Inherited from

Shape.getTag


getVerticalScaling

getVerticalScaling(): number

Gets vertical scale

Returns

number


getVisible

getVisible(): boolean

Return visibility of the node

Returns

boolean

true if node is visible

Inherited from

Shape.getVisible


getWorldTransform

getWorldTransform(): Transformation

Retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.

Returns

Transformation

transform the world transform.

Inherited from

Shape.getWorldTransform


getZIndex

getZIndex(): number

Returns node z-index (null if not set)

Returns

number

Inherited from

Shape.getZIndex


hasCssClass

hasCssClass(cssClass): boolean

Check if node has specified css class

Parameters

Name Type Description
cssClassstringcss class name

Returns

boolean

Inherited from

Shape.hasCssClass


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

Shape.hasEventListener


highlightBins

highlightBins(bins, reset?): void

Highlight Bins

Parameters

Name Type Description
binsnumber[]indices
Optional resetbooleanprevious selection

Returns

void


hitTest

hitTest(hitArea): HitTestResult

Get hit bins

Parameters

Name Type Description
hitAreaRect | Polygonselected area

Returns

HitTestResult

selected bins array

hitTest(hitArea, radius?): HitTestResult

Get hit bins

Parameters

Name Type Description
hitAreaPointselected point
Optional radiusnumberthe bins in certain range along x axis

Returns

HitTestResult

selected bins array

hitTest(hitArea, bins): HitTestResult

Get hit bins

Parameters

Name Type Description
hitAreaRect | Polygonselected area
binsBin[]the bins in certain range along x axis

Returns

HitTestResult

selected bins number array

hitTest(hitArea, bins): HitTestResult

Get hit bins

Parameters

Name Type Description
hitAreaPointselected point
binsBin[]the bins in certain range along x axis

Returns

HitTestResult

selected bins number array


invalidate

invalidate(bounds?, force?): Histogram

Invalidate area of the shape. This method invalidates parent by default. invalidated from parent to root node.

Parameters

Name Type Description
Optional boundsRectbounds of the invalid rectangle in the inner node coordinates
Optional forcebooleantrue if parent should be invalidated immediately if null is provided then cache (if any will be completely refreshed) otherwise only specified rect or node.bounds will be refreshed

Returns

Histogram

this

Inherited from

Shape.invalidate


invalidateParent

invalidateParent(bounds?, force?): Histogram

Invalidate bounds

Parameters

Name Type Description
Optional boundsRectif null is provided then cache (if any will be completely refreshed) otherwise only specified rect or node.bounds will be refreshed
Optional forcebooleanflag indicating if the parent must be forcibly invalidated

Returns

Histogram

this

Inherited from

Shape.invalidateParent


isAutoBinCount

isAutoBinCount(): boolean

Returns

boolean


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

Shape.isDisposed


isEventPropagationEnabled

isEventPropagationEnabled(): boolean

Return true if event propagation is enabled from child to parent

Returns

boolean

Inherited from

Shape.isEventPropagationEnabled


isNotificationEnabled

isNotificationEnabled(): boolean

return state of notification

Returns

boolean

current notification state

Inherited from

Shape.isNotificationEnabled


isSelectable

isSelectable(): boolean

Returns true if node can be picked/selected.

Returns

boolean

The selectable flag

Inherited from

Shape.isSelectable


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

Shape.isSilent


notify

notify<E>(type, source, args?): Histogram

Notify listeners of the Node

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event
sourceHistogramsource who called the event
Optional argsEventMap[E]event arguments

Returns

Histogram

this

Overrides

Shape.notify


off

off<E>(type?, callback?): Histogram

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: Histogram, args: EventMap[E]) => voidfunction to be called

Returns

Histogram

this

Overrides

Shape.off


on

on<E>(type, callback): Histogram

Attach listener on event that will be called whenever the specified event is delivered to the target

If the callback function is already in the list of event listeners for this target, the function is not added a second time.

If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: Histogram, args: EventMap[E]) => voidto be called

Returns

Histogram

this

Overrides

Shape.on


onParentChanged

Protected onParentChanged(node): Histogram

This method is called when parent changes. Do not call it directly.

Parameters

Name Type Description
nodeNodenode to change parent

Returns

Histogram

this

Inherited from

Shape.onParentChanged


onVisibilityChanged

Protected onVisibilityChanged(): void

This method is called if visibility is changed. Send event Events.VisibilityChanged

Returns

void

Inherited from

Shape.onVisibilityChanged


postRendering

Protected postRendering(context): void

To be called after rendering. Call this method if you override method render

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

void

Inherited from

Shape.postRendering


preRendering

Protected preRendering(context): void

Occurs before rendering this method sets clipping by default. Call this method if you override method render

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

void

Inherited from

Shape.preRendering


registerAnimationStyle

registerAnimationStyle(root): void

Register animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

Shape.registerAnimationStyle


removeCssClass

removeCssClass(cssclass): Histogram

Removes css class from node

Parameters

Name Type Description
cssclassstring | string[]css class name('s)

Returns

Histogram

this

Inherited from

Shape.removeCssClass


removeInvalidateHandler

removeInvalidateHandler(handler): Histogram

Remove invalidate handler

Deprecated

since 4.0, use Node.off instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

Histogram

this

Inherited from

Shape.removeInvalidateHandler


render

render(context): void

Renders node

Parameters

Name Type Description
contextRenderingContextThe rendering context to be used to draw the node

Returns

void

Overrides

Shape.render


renderAsync

renderAsync(context, callback): void

Render node in asynchronous mode. Default implementation creates call method "render" inside

Parameters

Name Type Description
contextRenderingContextThe rendering context to be used to draw the node
callback() => voidcallback function

Returns

void

Inherited from

Shape.renderAsync


resetBinCount

resetBinCount(): void

Resets the bin count

Returns

void


resetValues

resetValues(): void

Resets the highest and lowest values to be computed values

Returns

void


rotate

rotate(theta, x, y): Histogram

Rotate bounds around a given coordinate

Parameters

Name Type Description
thetanumberangle to rotate node, in radians
xnumberx coordinate to rotate around
ynumbery coordinate to rotate around

Returns

Histogram

this

Inherited from

Shape.rotate


scale

scale(xx, yy): Histogram

Scale node

Parameters

Name Type Description
xxnumberx scale factor
yynumbery scale factor

Returns

Histogram

this

Inherited from

Shape.scale


setAccumulatedMode

setAccumulatedMode(accumulatedMode): Histogram

Sets accumulated mode

Parameters

Name Type Description
accumulatedModeAccumulatedModeenum of AccumulatedMode (Disabled or Enabled)

Returns

Histogram


setAnimationStyle

setAnimationStyle(animationStyle): Histogram

Sets animation style

Parameters

Name Type Description
animationStyleTypeanimation style

Returns

Histogram

Inherited from

Shape.setAnimationStyle


setAutoGradient

setAutoGradient(isAutoGradient): Histogram

Parameters

Name Type Description
isAutoGradientbooleanAutogradient on or off

Returns

Histogram


setBinCount

setBinCount(binCount): Histogram

Sets bin count.

Parameters

Name Type Description
binCountnumbera count of the bins

Returns

Histogram


setBinSpacing

setBinSpacing(percentage): Histogram

Sets percentage of fill Everything lower than 50 is set to 50 Everything higher than 100 is set to 100 All values in between are saved as is

Parameters

Name Type Description
percentagenumberpercentage of fill

Returns

Histogram


setBinSteps

setBinSteps(binStep): Histogram

Sets bin count using a step value

Parameters

Name Type Description
binStepnumbera count of the bins

Returns

Histogram


setBounds

setBounds(bounds): Histogram

Sets bounds of the node in the parent coordinates

Parameters

Name Type Description
boundsRectbound of the node in the parent coordinates

Returns

Histogram

this


setClipStyle

setClipStyle(style): Histogram

Sets a new clipping style

Parameters

Name Type Description
styleGraphicsPath | ClipStyle | Optionsa new clipping style

Returns

Histogram

this

Inherited from

Shape.setClipStyle


setCss

setCss(style, merge?): Histogram

Sets CSS style. This style will be applied for all inserted elements

Parameters

Name Type Description
styleTypeCSS style to be applied to inserted elements
Optional mergebooleanmerge flag

Returns

Histogram

this

Inherited from

Shape.setCss


setCssClass

setCssClass(name): Histogram

Sets css class name of the node to be used to apply CSS style

Parameters

Name Type Description
namestringcss class name of the node

Returns

Histogram

this

Inherited from

Shape.setCssClass


setCssTransform

setCssTransform(transform): Histogram

Set CSS transformation

Parameters

Name Type Description
transformstring | Transformationtransformation css transformation instruction or Transformation instance

Returns

Histogram

this

Inherited from

Shape.setCssTransform


setData

setData(values, minValue?, maxValue?): Histogram

Set the data to be plotted in the histogram, optionally with min and max values.

Parameters

Name Type Description
valuesnumber[] | INumericalDataSeries | { data?: number[] | INumericalDataSeries ; maxvalue?: number ; minvalue?: number }Data to be charted in histogram or options for histogram (for compatibility)
Optional minValuenumberLowest value to display
Optional maxValuenumberHighest value to display

Returns

Histogram

this


setFillStyle

setFillStyle(fillStyle, merge?): Histogram

Sets fill style

Parameters

Name Type Description
fillStyleTypea new fill style
Optional mergebooleantrue if you want to merge fillStyle with existing attribute, false by default

Returns

Histogram

this

Inherited from

Shape.setFillStyle


setFrequencyType

setFrequencyType(frequencyType): Histogram

Sets frequency type

Parameters

Name Type Description
frequencyTypeFrequencyTypeenum of FrequencyType

Returns

Histogram


setHighLightStyles

setHighLightStyles(styles): Histogram

Parameters

Name Type
stylesRecord<string, { fillstyle?: Type ; linestyle?: Type }>

Returns

Histogram


setHighValueInclusive

setHighValueInclusive(inclusive): Histogram

sets if the high value is inclusive

Parameters

Name Type Description
inclusivebooleanhigh value is inclusive or not

Returns

Histogram


setHighlightStyle

setHighlightStyle(fillStyle): Histogram

Sets highlight style

Parameters

Name Type Description
fillStyleTypea new fill style

Returns

Histogram


setHistogramMode

setHistogramMode(histogramMode): Histogram

Sets histogram mode

Parameters

Name Type Description
histogramModeHistogramModeenum of HistogramMode (Linear or Logarithmic)

Returns

Histogram


setId

setId(id): Histogram

Allows the user to associate any identifier

Parameters

Name Type Description
idstring | numberobject id

Returns

Histogram

this

Inherited from

Shape.setId


setLineStyle

setLineStyle(lineStyle, merge?): Histogram

Sets line style

Parameters

Name Type Description
lineStyleTypeline style or options
Optional mergebooleantrue if you want to merge lineStyle with existing attribute, false by default

Returns

Histogram

this

Inherited from

Shape.setLineStyle


setLocalTransform

setLocalTransform(localTransform, force?): Histogram

Sets local transformation to be used to transform from local to parent coordinate

Parameters

Name Type Description
localTransformTransformationlocal transformation for this node
Optional forcebooleanboolean flag to force update event if transformations are equal, false by default

Returns

Histogram

this

Inherited from

Shape.setLocalTransform


setLogStartValue

setLogStartValue(logStartValue): Histogram

Sets log start value

Parameters

Name Type Description
logStartValuenumberlog start value

Returns

Histogram

this


setMarginsStyle

setMarginsStyle(margins, merge?): Histogram

Sets margins style

Parameters

Name Type Description
marginsType<string | number>margins style
Optional mergebooleantrue if you want to merge marginsStyle with existing attribute, false by default

Returns

Histogram

this

Inherited from

Shape.setMarginsStyle


setName

setName(name): Histogram

Sets name of the node

Parameters

Name Type Description
namestringThe node name

Returns

Histogram

this

Inherited from

Shape.setName


setNeatLimitsX

setNeatLimitsX(neatlimits): Histogram

set neat limits for x axis

Parameters

Name Type Description
neatlimitsbooleanset if apply neat limits for x axis

Returns

Histogram

this


setNeatLimitsY

setNeatLimitsY(neatlimits): Histogram

set neat limits for y axis

Parameters

Name Type Description
neatlimitsbooleanset if apply neat limits for y axis

Returns

Histogram

this


setNotification

setNotification(notify, force?): Histogram

set notification state

Parameters

Name Type Description
notifybooleanflag set to invalidate parent or not
Optional forcebooleantrue if parent should be invalidated immediately

Returns

Histogram

this

Inherited from

Shape.setNotification


setOpacity

setOpacity(opacity, blendMode?): Histogram

Sets node opacity

Parameters

Name Type Description
opacitynumbernode opacity from 0 to 1
Optional blendModeBlendModeopacity blend mode. If it is normal, opacity will be replaced.

Returns

Histogram

this

Inherited from

Shape.setOpacity


setOptions

setOptions(options): Histogram

Parameters

Name Type
optionsOptionsBase

Returns

Histogram


setOrientation

setOrientation(orientation): Histogram

set orientation

Parameters

Name Type Description
orientationOrientationorientation

Returns

Histogram


setProperties

setProperties(properties?): Histogram

set shape properties

Parameters

Name Type Description
Optional propertiesOptionsobject

Returns

Histogram

this

Overrides

Shape.setProperties


setProperty

setProperty(name, value): Histogram

Sets dynamic property by name

Parameters

Name Type Description
namestringproperty name
valueanyproperty value

Returns

Histogram

this

Inherited from

Shape.setProperty


setRenderingFilter

setRenderingFilter(filter): Histogram

Sets filter to be applied before rendering and picking

Parameters

Name Type Description
filterIFilterfilter to set

Returns

Histogram

this

Inherited from

Shape.setRenderingFilter


setResponsiveStyle

setResponsiveStyle(style): Histogram

Sets responsive style.

Parameters

Name Type Description
styleOptions | ResponsiveStyleresponsive style

Returns

Histogram

this

Inherited from

Shape.setResponsiveStyle


setScaleScrollStrategy

setScaleScrollStrategy(strategy?): Histogram

Sets scale scroll strategy

Parameters

Name Type Description
Optional strategyDelegatescale scroll strategy

Returns

Histogram

this

Inherited from

Shape.setScaleScrollStrategy


setSelectable

setSelectable(selectable): Histogram

Allows to select node. If node is not selectable then child node is not selectable.

Parameters

Name Type Description
selectablebooleanflag to allow node selection

Returns

Histogram

this

Inherited from

Shape.setSelectable


setSilent

setSilent(bool): Histogram

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

Histogram

this

Inherited from

Shape.setSilent


setTag

setTag(tag): Histogram

Allows the user to associate any arbitrary object with the node.

Parameters

Name Type Description
taganyThe object to be associated with the node.

Returns

Histogram

this

Inherited from

Shape.setTag


setUnit

setUnit(unit): Histogram

set desired unit for data source, the finally display unit could be not the desired one due to failling of unit coversion

Parameters

Name Type Description
unitstring | Unitrepresent the {string} name, {string} symbol or {Unit} unit to be created

Returns

Histogram

this


setValueRange

setValueRange(minValue, maxValue): Histogram

Set the highest and lowest values to be displayed in this histogram

Parameters

Name Type Description
minValuenumberlowest value to be displayed
maxValuenumberhighest value to be displayed

Returns

Histogram

this


setVerticalScaling

setVerticalScaling(percentage): Histogram

Sets bars vertical scale

Parameters

Name Type Description
percentagenumberpercentage of fill

Returns

Histogram


setVisible

setVisible(value): Histogram

Sets visibility of the node. Send event Events.VisibilityChanged

Parameters

Name Type Description
valuebooleanflag specifying visibility of the node

Returns

Histogram

this

Inherited from

Shape.setVisible


setZIndex

setZIndex(value): Histogram

Sets z-index for node (set null for default)

Parameters

Name Type Description
valuenumberindex determining node z-position

Returns

Histogram

this

Inherited from

Shape.setZIndex


shear

shear(shx, shy): Histogram

Shear this node's bounds

Parameters

Name Type Description
shxnumberx-axis shear
shynumbery-axis shear

Returns

Histogram

this

Inherited from

Shape.shear


toString

toString(): string

Returns a string representation of this object (generally the classname)

Returns

string

A string representation

Inherited from

Shape.toString


translate

translate(tx, ty): Histogram

Translate bounds

Parameters

Name Type Description
txnumberx translation
tynumbery translation

Returns

Histogram

this

Inherited from

Shape.translate


unregisterAnimationStyle

unregisterAnimationStyle(root): void

Unregister animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

Shape.unregisterAnimationStyle


updateBinCount

updateBinCount(force?): Histogram

Calculates the automatic amount of bins

Parameters

Name Type Description
Optional forcebooleanforce calculation of bins count

Returns

Histogram


updateModelLimits

updateModelLimits(): void

Updates the model limits

Returns

void


updateSceneTransformation

updateSceneTransformation(): Histogram

Update scene transformation

Returns

Histogram

this

Inherited from

Shape.updateSceneTransformation


updateState

updateState(regions?, changes?): Histogram

Update state. These methods reset node state and update state for children. this method is useful to refresh a scene graph

Parameters

Name Type Description
Optional regionsRect[]optional array to return invalid rectangles in the parent coordinates
Optional changesStateChangesoptional parameter to specify a reason of changes

Returns

Histogram

this

Inherited from

Shape.updateState


updateTimeStamp

Protected updateTimeStamp(): Histogram

Update time stamp to indicate that Node or Children has been changed.

Returns

Histogram

this

Inherited from

Shape.updateTimeStamp


enableSceneGraphNotification

Static enableSceneGraphNotification(enabled): void

Enable / disable all notifications

Parameters

Name Type Description
enabledbooleansets if this object sends notifications

Returns

void

Inherited from

Shape.enableSceneGraphNotification


findParent

Static findParent<T>(node, classType, filter?): InstanceType<T>

Find root of the node with specified type

Type parameters

NameType
Textends Constructor<any>

Parameters

Name Type Description
nodeNodenode to start search
classTypeTtype of the class to search for
Optional filter(node: Node) => booleanadditional filter to apply

Returns

InstanceType<T>

Inherited from

Shape.findParent

Static findParent(node, classType, filter?): Node

Find root of the node with specified type

Parameters

Name Type Description
nodeNodenode to start search
classTypestringinterface name to search for
Optional filter(node: Node) => booleanadditional filter to apply

Returns

Node

Inherited from

Shape.findParent


getClassName

Static getClassName(): string

Returns

string

Inherited from

Shape.getClassName


intersectsBounds

Static intersectsBounds(bounds, localTransformation, parentInvalidArea, expand?): boolean

Check collision of the shape bounds with parent invalid area

Parameters

Name Type Description
boundsRectshape bounds
localTransformationTransformationlocal transformation of the bounds
parentInvalidAreaRectinvalid parent area
Optional expandDimensionoptional expand the bounds in model coordinate

Returns

boolean

true if bounds intersect the invalid area

Inherited from

Shape.intersectsBounds


isSceneGraphNotificationEnabled

Static isSceneGraphNotificationEnabled(): boolean

Return status of the global notification for all nodes.

Returns

boolean

Inherited from

Shape.isSceneGraphNotificationEnabled