API / geotoolkit / controls / 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.
↳
Histogram
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
clipstyle | ClipStyle | Clipping style |
clipstyle-evenodd | boolean | True if evenodd mode is on ('nonzero' mode otherwise) |
clipstyle-geometry | GraphicsPath | Clipping geometry |
clipstyle-geometry-bounds | Rect | Bounds |
clipstyle-geometry-bounds-height | number | Height |
clipstyle-geometry-bounds-readonly | boolean | Readonly |
clipstyle-geometry-bounds-width | number | Width |
clipstyle-geometry-bounds-x | number | Left |
clipstyle-geometry-bounds-y | number | Top |
clipstyle | GraphicsPath | Clipping style |
cssclass | string | The css class name of this node |
csscursor | string | CSS cursor associated with node |
cssstyle | string | CSS style to be applied to inserted elements |
fillstyle | string | Style applied on fill |
fillstyle | FillStyle | Style applied on fill |
fillstyle-color | string | Color in CSS form |
fillstyle-evenoddmode | boolean | Even-odd fill mode |
fillstyle-fillpattern | Pattern | Pattern |
fillstyle-fillpattern-containername | string | An 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-patternname | string | Name of this pattern for indexing |
fillstyle-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
fillstyle-foreground | string | Foreground color |
fillstyle-pattern | Pattern | Pattern |
id | string | number | Id of the node, its a unique identifier |
linestyle | string | Style applied on outline |
linestyle | LineStyle | Style applied on outline |
linestyle-color | string | Color in CSS form |
linestyle-fill | string | Optional fill style to be used to fill lines generated with this style |
linestyle-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
linestyle-linecap | CapStyle | The line cap style |
linestyle-linedashoffset | number | Line dash offset of dashed line |
linestyle-linejoin | JoinStyle | The line join style |
linestyle-pixelsnapmode | boolean | Pixel Snap Mode, default( |
linestyle-scalable | boolean | True if width should depend on transformation |
linestyle-unit | string | Optional unit for the width |
linestyle-width | number | string | The line thickness |
localtransform | Transformation | Local transformation |
localtransform-dx | number | X axis translation |
localtransform-dy | number | Y axis translation |
localtransform-xx | number | X scale |
localtransform-xy | number | Xy skew |
localtransform-yx | number | Yx skew |
localtransform-yy | number | Y scale |
margins | number | string | It has properties for specifying the margins for each side |
name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
opacity | number | Node opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context |
opacityblendmode | BlendMode | Node opacity mode to blend it |
scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
scalescrollstrategy-enabled | boolean | Enable flag |
selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
tag | any | Custom 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 |
transform | string | Additional CSS transformation applied to node or 'none' |
transform | Transformation | Additional CSS transformation applied to node or 'none' |
visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
z-index | number | Define node z-index |
Constructors
• new Histogram(options?, bounds?, bins?)
Create Histogram
| Name | Type | Description |
|---|---|---|
Optional options | number[] | NumericalDataSeries | Options | NumericalDataSeriesView | object |
Optional bounds | Rect | bounds of the node |
Optional bins | number | number of bins this histogram has |
Shape.constructor
Methods
▸ addCssClass(cssclass): Histogram
Adds new css class to node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ addInvalidateHandler(handler): Histogram
Add invalidate handler
Deprecated
since 4.0, use Node.on instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
▸ 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
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
this
▸ Protected applyResponsiveStyle(): void
Apply a responsive style rules it is exists
void
▸ areValuesCustomized(): boolean
Resets the highest and lowest values to be computed values
boolean
_areCustomizedEdges
▸ calculate(keepModelLimits?): Histogram
Calculate distribution with normalization
| Name | Type | Description |
|---|---|---|
Optional keepModelLimits | boolean | set if keep model limits unchanged |
▸ checkCollision(context): boolean
Check collision
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
true if object is inside of rendarable area
▸ clone(): Node
All subclasses should override copyConstructor or provide custom implementation for this method
clone
▸ computeStatistics(): void
Computers the statics based on the new data
void
▸ 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
| Name | Type | Description |
|---|---|---|
style | EventDispatcher | connect style |
type | string | type of event or property |
callback | AttributeCallback<EventDispatcher> | function to be called |
this
▸ 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.
| Name | Type | Description |
|---|---|---|
src | Shape | Source to copy from |
Optional deepCopy | boolean | deep copy |
this
▸ disconnectStyle(style, type, callback): Histogram
Disconnect style
This convenience method un-subscribes a listener to given style for the specified type.
| Name | Type | Description |
|---|---|---|
style | EventDispatcher | connect style |
type | string | type of event or property |
callback | AttributeCallback<EventDispatcher> | function to be called |
this
▸ 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.
void
▸ 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();| Name | Type | Description |
|---|---|---|
enable | boolean | enable |
this
▸ 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");
});| Name | Type | Description |
|---|---|---|
delegate | (this: Histogram) => void | Function to execute |
The result if any or this
▸ execute<T>(delegate): T
| Name |
|---|
T |
| Name | Type |
|---|---|
delegate | (this: Histogram) => T |
T
▸ Protected filter(context): boolean
Filter node
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
flag filter flag ("true" to render node; "false" otherwise)
▸ getAccumulatedMode(): AccumulatedMode
Gets accumulated mode
▸ getAnimationStyle(): AnimationStyle
Return animation style
animationStyle current animation style
▸ getAutoGradient(): boolean
Gets if we are auto gradient
boolean
▸ getBinAt(x, excludeGaps?): Bin & { indices?: number[] }
Gets the bin at the input x value
| Name | Type | Description |
|---|---|---|
x | number | input x value |
Optional excludeGaps | boolean | True if gaps between bins should be excluded |
Bin & { indices?: number[] }
- bin at input x value
▸ getBinCount(): number
Return bin count
number
a count of bins
▸ getBinSpacing(): number
Gets percentage of fill
number
▸ getBins(): Bin[]
Gets the values of the bins in the following array format Array [{ 'minvalue' : number, 'maxvalue' : number, 'binnumber' : number, 'frequency' : number }, ...]
Bin[]
Array of bins objects
▸ getBinsAt(x): Bin[]
Gets the bin at the input x value
Bin[]
Array of bins objects
▸ getBinsByIndices(indices): number[]
Returns bin numbers for specified indices
| Name | Type | Description |
|---|---|---|
indices | number[] | of indices |
number[]
▸ getBounds(): Rect
Returns current bounds
bounds
▸ getClassName(): string
string
▸ getClipStyle(): ClipStyle
Gets the current clipping style
clipping style
▸ getContentsTransform(): Transformation
Retrieves the world transformation of the spatial.
▸ getCss(): CssStyle
Return CSS style
▸ getCssClass(): string
Returns css class name to be used to apply CSS style
string
the css class name
▸ getCssClasses(): string[]
Gets list of css class names which applied to this node
string[]
▸ getCssTransform(): string
Returns CSS transformation
string
▸ getData(): Object
get raw data
Object
| Name | Type |
|---|---|
data | number[] |
maxvalue | number |
minvalue | number |
▸ getDataSource(): number[] | NumericalDataSeries | NumericalDataSeriesView
Return histogram data source
number[] | NumericalDataSeries | NumericalDataSeriesView
data source
▸ getDisplayUnit(): AbstractUnit
get displayed unit
unit
▸ getFillStyle(): FillStyle
Return fill style
fillStyle current fill style
▸ getFrequency(index, ignoreMode?): number
Gets the frequency for the current index
| Name | Type | Description |
|---|---|---|
index | number | current index |
Optional ignoreMode | boolean | ignore mode on or not |
number
▸ getFrequencyType(): FrequencyType
Gets frequency type
▸ getHighValueInclusive(): boolean
gets if the high value is inclusive
boolean
▸ getHighlightStyle(): FillStyle
Gets highlight style
▸ getHighlightedBins(): number[]
get highlighted bins
number[]
bins number array
▸ getHistogramMode(): HistogramMode
Gets the histogram mode
▸ getId(): string | number
Returns the associated identifier of the node
string | number
The node's id
▸ getIndicesByBin(index): number[]
Gets indices by bin number
| Name | Type | Description |
|---|---|---|
index | number | index |
number[]
of indices
▸ Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>
Gets invalidate method
AttributeCallback<EventDispatcher>
method to invalidate this object
▸ getLineStyle(): LineStyle
Return line style
lineStyle current line style
▸ getLocalTransform(): Transformation
Retrieves the transformation of bounds to parent
transform the local transform.
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
▸ getMaxFrequency(): number
Maximum frequency
number
▸ getMaxValue(): number
Get highest value to be displayed
number
_maxValue
▸ getMinValue(): number
Get lowest value to be displayed
number
_minValue
▸ getModelLimits(): Rect
Gets model limits
the current model limits
▸ getName(): string
Returns the node name
string
The node name
▸ getOpacity(): number
Returns current node opacity
number
opacity
▸ getOpacityBlendMode(): BlendMode
Returns current node opacity
opacity blend mode
▸ getOptions(): OptionsBaseOut
▸ getOrientation(): Orientation
get orientation
▸ getParent(): Node
Return parent node
parent node
▸ getProperties(): OptionsOut
Returns shape properties
object
▸ getProperty(name): any
Gets dynamic property by name. These properties can be used as a property bags
| Name | Type | Description |
|---|---|---|
name | string | property name |
any
▸ getPropertyKeys(): string[]
Returns known properties keys
string[]
▸ getRenderingFilter(): IFilter
Return filter to be used for rendering and picking
current filter
▸ getResponsiveStyle(): ResponsiveStyle
Return responsive style
▸ getRoot(): Node
Returns root node.
If node doesn't have parent then it returns itself.
the root node
▸ getScaleScrollStrategy(): Delegate
Gets scale scroll strategy
scale scroll strategy
▸ getSceneTransform(): Transformation
Returns transformation from node to root scene
a transformation from node to root scene
▸ getStartValue(): number
Gets log start value
number
▸ 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)number[]
statistics
▸ getStatisticsDescription(): string[]
Descriptions of statistics
Example
return ["Sample Count", "Min", "Max", "Average", "Variance", "Avg. Deviation", "Std. Deviation", "Skewness", "Kurtosis", "P10", "P50", "P90"]string[]
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getVerticalScaling(): number
Gets vertical scale
number
▸ getVisible(): boolean
Return visibility of the node
boolean
true if node is visible
▸ getWorldTransform(): Transformation
Retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.
transform the world transform.
▸ getZIndex(): number
Returns node z-index (null if not set)
number
▸ hasCssClass(cssClass): boolean
Check if node has specified css class
| Name | Type | Description |
|---|---|---|
cssClass | string | css class name |
boolean
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
▸ highlightBins(bins, reset?): void
Highlight Bins
| Name | Type | Description |
|---|---|---|
bins | number[] | indices |
Optional reset | boolean | previous selection |
void
▸ hitTest(hitArea): HitTestResult
Get hit bins
selected bins array
▸ hitTest(hitArea, radius?): HitTestResult
Get hit bins
| Name | Type | Description |
|---|---|---|
hitArea | Point | selected point |
Optional radius | number | the bins in certain range along x axis |
selected bins array
▸ hitTest(hitArea, bins): HitTestResult
Get hit bins
| Name | Type | Description |
|---|---|---|
hitArea | Rect | Polygon | selected area |
bins | Bin[] | the bins in certain range along x axis |
selected bins number array
▸ hitTest(hitArea, bins): HitTestResult
Get hit bins
selected bins number array
▸ invalidate(bounds?, force?): Histogram
Invalidate area of the shape. This method invalidates parent by default. invalidated from parent to root node.
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | bounds of the invalid rectangle in the inner node coordinates |
Optional force | boolean | true 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 |
this
▸ invalidateParent(bounds?, force?): Histogram
Invalidate bounds
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | if null is provided then cache (if any will be completely refreshed) otherwise only specified rect or node.bounds will be refreshed |
Optional force | boolean | flag indicating if the parent must be forcibly invalidated |
this
▸ isAutoBinCount(): boolean
boolean
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isEventPropagationEnabled(): boolean
Return true if event propagation is enabled from child to parent
boolean
Shape.isEventPropagationEnabled
▸ isNotificationEnabled(): boolean
return state of notification
boolean
current notification state
▸ isSelectable(): boolean
Returns true if node can be picked/selected.
boolean
The selectable flag
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ notify<E>(type, source, args?): Histogram
Notify listeners of the Node
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event |
source | Histogram | source who called the event |
Optional args | EventMap[E] | event arguments |
this
▸ 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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
Optional type | E | type of the event |
Optional callback | (eventType: E, sender: Histogram, args: EventMap[E]) => void | function to be called |
this
▸ 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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: Histogram, args: EventMap[E]) => void | to be called |
this
▸ Protected onParentChanged(node): Histogram
This method is called when parent changes. Do not call it directly.
| Name | Type | Description |
|---|---|---|
node | Node | node to change parent |
this
▸ Protected onVisibilityChanged(): void
This method is called if visibility is changed. Send event Events.VisibilityChanged
void
▸ Protected postRendering(context): void
To be called after rendering. Call this method if you override method render
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ Protected preRendering(context): void
Occurs before rendering this method sets clipping by default. Call this method if you override method render
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ registerAnimationStyle(root): void
Register animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
▸ removeCssClass(cssclass): Histogram
Removes css class from node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ removeInvalidateHandler(handler): Histogram
Remove invalidate handler
Deprecated
since 4.0, use Node.off instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
▸ render(context): void
Renders node
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
void
▸ renderAsync(context, callback): void
Render node in asynchronous mode. Default implementation creates call method "render" inside
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
callback | () => void | callback function |
void
▸ resetBinCount(): void
Resets the bin count
void
▸ resetValues(): void
Resets the highest and lowest values to be computed values
void
▸ rotate(theta, x, y): Histogram
Rotate bounds around a given coordinate
| Name | Type | Description |
|---|---|---|
theta | number | angle to rotate node, in radians |
x | number | x coordinate to rotate around |
y | number | y coordinate to rotate around |
this
▸ scale(xx, yy): Histogram
Scale node
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
this
▸ setAccumulatedMode(accumulatedMode): Histogram
Sets accumulated mode
| Name | Type | Description |
|---|---|---|
accumulatedMode | AccumulatedMode | enum of AccumulatedMode (Disabled or Enabled) |
▸ setAnimationStyle(animationStyle): Histogram
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
▸ setAutoGradient(isAutoGradient): Histogram
| Name | Type | Description |
|---|---|---|
isAutoGradient | boolean | Autogradient on or off |
▸ setBinCount(binCount): Histogram
Sets bin count.
| Name | Type | Description |
|---|---|---|
binCount | number | a count of the bins |
▸ 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
| Name | Type | Description |
|---|---|---|
percentage | number | percentage of fill |
▸ setBinSteps(binStep): Histogram
Sets bin count using a step value
| Name | Type | Description |
|---|---|---|
binStep | number | a count of the bins |
▸ setBounds(bounds): Histogram
Sets bounds of the node in the parent coordinates
| Name | Type | Description |
|---|---|---|
bounds | Rect | bound of the node in the parent coordinates |
this
▸ setClipStyle(style): Histogram
Sets a new clipping style
| Name | Type | Description |
|---|---|---|
style | GraphicsPath | ClipStyle | Options | a new clipping style |
this
▸ setCss(style, merge?): Histogram
Sets CSS style. This style will be applied for all inserted elements
| Name | Type | Description |
|---|---|---|
style | Type | CSS style to be applied to inserted elements |
Optional merge | boolean | merge flag |
this
▸ setCssClass(name): Histogram
Sets css class name of the node to be used to apply CSS style
| Name | Type | Description |
|---|---|---|
name | string | css class name of the node |
this
▸ setCssTransform(transform): Histogram
Set CSS transformation
| Name | Type | Description |
|---|---|---|
transform | string | Transformation | transformation css transformation instruction or Transformation instance |
this
▸ setData(values, minValue?, maxValue?): Histogram
Set the data to be plotted in the histogram, optionally with min and max values.
| Name | Type | Description |
|---|---|---|
values | number[] | INumericalDataSeries | { data?: number[] | INumericalDataSeries ; maxvalue?: number ; minvalue?: number } | Data to be charted in histogram or options for histogram (for compatibility) |
Optional minValue | number | Lowest value to display |
Optional maxValue | number | Highest value to display |
this
▸ setFillStyle(fillStyle, merge?): Histogram
Sets fill style
| Name | Type | Description |
|---|---|---|
fillStyle | Type | a new fill style |
Optional merge | boolean | true if you want to merge fillStyle with existing attribute, false by default |
this
▸ setFrequencyType(frequencyType): Histogram
Sets frequency type
| Name | Type | Description |
|---|---|---|
frequencyType | FrequencyType | enum of FrequencyType |
▸ setHighLightStyles(styles): Histogram
▸ setHighValueInclusive(inclusive): Histogram
sets if the high value is inclusive
| Name | Type | Description |
|---|---|---|
inclusive | boolean | high value is inclusive or not |
▸ setHighlightStyle(fillStyle): Histogram
Sets highlight style
| Name | Type | Description |
|---|---|---|
fillStyle | Type | a new fill style |
▸ setHistogramMode(histogramMode): Histogram
Sets histogram mode
| Name | Type | Description |
|---|---|---|
histogramMode | HistogramMode | enum of HistogramMode (Linear or Logarithmic) |
▸ setId(id): Histogram
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setLineStyle(lineStyle, merge?): Histogram
Sets line style
| Name | Type | Description |
|---|---|---|
lineStyle | Type | line style or options |
Optional merge | boolean | true if you want to merge lineStyle with existing attribute, false by default |
this
▸ setLocalTransform(localTransform, force?): Histogram
Sets local transformation to be used to transform from local to parent coordinate
| Name | Type | Description |
|---|---|---|
localTransform | Transformation | local transformation for this node |
Optional force | boolean | boolean flag to force update event if transformations are equal, false by default |
this
▸ setLogStartValue(logStartValue): Histogram
Sets log start value
| Name | Type | Description |
|---|---|---|
logStartValue | number | log start value |
this
▸ setMarginsStyle(margins, merge?): Histogram
Sets margins style
| Name | Type | Description |
|---|---|---|
margins | Type<string | number> | margins style |
Optional merge | boolean | true if you want to merge marginsStyle with existing attribute, false by default |
this
▸ setName(name): Histogram
Sets name of the node
| Name | Type | Description |
|---|---|---|
name | string | The node name |
this
▸ setNeatLimitsX(neatlimits): Histogram
set neat limits for x axis
| Name | Type | Description |
|---|---|---|
neatlimits | boolean | set if apply neat limits for x axis |
this
▸ setNeatLimitsY(neatlimits): Histogram
set neat limits for y axis
| Name | Type | Description |
|---|---|---|
neatlimits | boolean | set if apply neat limits for y axis |
this
▸ setNotification(notify, force?): Histogram
set notification state
| Name | Type | Description |
|---|---|---|
notify | boolean | flag set to invalidate parent or not |
Optional force | boolean | true if parent should be invalidated immediately |
this
▸ setOpacity(opacity, blendMode?): Histogram
Sets node opacity
| Name | Type | Description |
|---|---|---|
opacity | number | node opacity from 0 to 1 |
Optional blendMode | BlendMode | opacity blend mode. If it is normal, opacity will be replaced. |
this
▸ setOptions(options): Histogram
| Name | Type |
|---|---|
options | OptionsBase |
▸ setOrientation(orientation): Histogram
set orientation
| Name | Type | Description |
|---|---|---|
orientation | Orientation | orientation |
▸ setProperties(properties?): Histogram
set shape properties
| Name | Type | Description |
|---|---|---|
Optional properties | Options | object |
this
▸ setProperty(name, value): Histogram
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
▸ setRenderingFilter(filter): Histogram
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
▸ setResponsiveStyle(style): Histogram
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
▸ setScaleScrollStrategy(strategy?): Histogram
Sets scale scroll strategy
| Name | Type | Description |
|---|---|---|
Optional strategy | Delegate | scale scroll strategy |
this
▸ setSelectable(selectable): Histogram
Allows to select node. If node is not selectable then child node is not selectable.
| Name | Type | Description |
|---|---|---|
selectable | boolean | flag to allow node selection |
this
▸ setSilent(bool): Histogram
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setTag(tag): Histogram
Allows the user to associate any arbitrary object with the node.
| Name | Type | Description |
|---|---|---|
tag | any | The object to be associated with the node. |
this
▸ 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
| Name | Type | Description |
|---|---|---|
unit | string | Unit | represent the {string} name, {string} symbol or {Unit} unit to be created |
this
▸ setValueRange(minValue, maxValue): Histogram
Set the highest and lowest values to be displayed in this histogram
| Name | Type | Description |
|---|---|---|
minValue | number | lowest value to be displayed |
maxValue | number | highest value to be displayed |
this
▸ setVerticalScaling(percentage): Histogram
Sets bars vertical scale
| Name | Type | Description |
|---|---|---|
percentage | number | percentage of fill |
▸ setVisible(value): Histogram
Sets visibility of the node. Send event Events.VisibilityChanged
| Name | Type | Description |
|---|---|---|
value | boolean | flag specifying visibility of the node |
this
▸ setZIndex(value): Histogram
Sets z-index for node (set null for default)
| Name | Type | Description |
|---|---|---|
value | number | index determining node z-position |
this
▸ shear(shx, shy): Histogram
Shear this node's bounds
| Name | Type | Description |
|---|---|---|
shx | number | x-axis shear |
shy | number | y-axis shear |
this
▸ toString(): string
Returns a string representation of this object (generally the classname)
string
A string representation
▸ translate(tx, ty): Histogram
Translate bounds
| Name | Type | Description |
|---|---|---|
tx | number | x translation |
ty | number | y translation |
this
▸ unregisterAnimationStyle(root): void
Unregister animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
Shape.unregisterAnimationStyle
▸ updateBinCount(force?): Histogram
Calculates the automatic amount of bins
| Name | Type | Description |
|---|---|---|
Optional force | boolean | force calculation of bins count |
▸ updateModelLimits(): void
Updates the model limits
void
▸ updateSceneTransformation(): Histogram
Update scene transformation
this
Shape.updateSceneTransformation
▸ 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
| Name | Type | Description |
|---|---|---|
Optional regions | Rect[] | optional array to return invalid rectangles in the parent coordinates |
Optional changes | StateChanges | optional parameter to specify a reason of changes |
this
▸ Protected updateTimeStamp(): Histogram
Update time stamp to indicate that Node or Children has been changed.
this
▸ Static enableSceneGraphNotification(enabled): void
Enable / disable all notifications
| Name | Type | Description |
|---|---|---|
enabled | boolean | sets if this object sends notifications |
void
Shape.enableSceneGraphNotification
▸ Static findParent<T>(node, classType, filter?): InstanceType<T>
Find root of the node with specified type
| Name | Type |
|---|---|
T | extends Constructor<any> |
| Name | Type | Description |
|---|---|---|
node | Node | node to start search |
classType | T | type of the class to search for |
Optional filter | (node: Node) => boolean | additional filter to apply |
InstanceType<T>
▸ Static findParent(node, classType, filter?): Node
Find root of the node with specified type
| Name | Type | Description |
|---|---|---|
node | Node | node to start search |
classType | string | interface name to search for |
Optional filter | (node: Node) => boolean | additional filter to apply |
▸ Static getClassName(): string
string
▸ Static intersectsBounds(bounds, localTransformation, parentInvalidArea, expand?): boolean
Check collision of the shape bounds with parent invalid area
| Name | Type | Description |
|---|---|---|
bounds | Rect | shape bounds |
localTransformation | Transformation | local transformation of the bounds |
parentInvalidArea | Rect | invalid parent area |
Optional expand | Dimension | optional expand the bounds in model coordinate |
boolean
true if bounds intersect the invalid area
▸ Static isSceneGraphNotificationEnabled(): boolean
Return status of the global notification for all nodes.
boolean