API / geotoolkit / controls / shapes / PolarCrossPlot / PolarCrossPlot
shapes.PolarCrossPlot.PolarCrossPlot
Defines a crossplot shape in the polar coordinates. First a polar grid will need to be created and then CrossPlot shape can be added to the grid as shown in the example below.
Sectors can be added to highlight the area and third dimension can be defined for each point in the cross plot. To display a tool tip while clicking a symbol on polar cross plot, refer to the Polar Plot section Polar Chart tutorial.
Example
const crossPlotShape = new PolarCrossPlot({
'center': {x: 100, y: 100},
'outerradius': 100,
'data': {
'radius': [0, 15, 50, 70],
'angle': [0, 15, 25, 35]
}
});↳
PolarCrossPlot
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
autominmax | boolean | Force automatically recalculate CrossPlot bounds when new data is set |
bottom | number | Y coordinate of the bottom right corner (if 'height' not specified) |
bounds | Rect | Bounds |
bounds-height | number | Height |
bounds-readonly | boolean | Readonly |
bounds-width | number | Width |
bounds-x | number | Left |
bounds-y | number | Top |
center | Point | A center of the polar chart |
center-x | number | X coordinate |
center-y | number | Y coordinate |
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 | GraphicsPath | Clipping style |
clipstyle | ClipStyle | Clipping style |
clipstyle | GraphicsPath | Clipping style |
colorprovider | ColorProvider | The colorProvider used to color points based on their Z value |
colorprovider-max | number | |
colorprovider-min | number | |
colorprovider-scale | KnownScales | |
cssclass | string | The css class name of this node |
cssclass | string | The css class name of this node |
csscursor | string | CSS cursor associated with node |
csscursor | string | CSS cursor associated with node |
cssstyle | string | CSS style to be applied to inserted elements |
cssstyle | string | CSS style to be applied to inserted elements |
defaultcolor | string | The color to be used if there is no ColorProvider provided or if a point has no valid Z value |
defaultlinecolor | string | The color of line to be used in symbol |
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 |
fillstyle | string | Style applied on fill |
fillstyle | FillStyle | Style applied on fill |
height | number | Height (if 'bottom' not specified) |
highlightcolor | string | The color to use for highlighted shapes |
id | string | number | Id of the node, its a unique identifier |
id | string | number | Id of the node, its a unique identifier |
left | number | X coordinate of the top left corner |
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 |
linestyle | string | Style applied on outline |
linestyle | LineStyle | Style applied on outline |
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 |
localtransform | Transformation | Local transformation |
logx | boolean | True to logarithm x values, false otherwise |
logy | boolean | True to logarithm y values, false otherwise |
logz | boolean | True to logarithm z values, false otherwise |
margins | number | string | It has properties for specifying the margins for each side |
margins | number | string | It has properties for specifying the margins for each side |
maxx | number | The x maximum to use, can be used to clip the data |
maxy | number | The y maximum to use, can be used to clip the data |
minx | number | The x minimum to use, can be used to clip the data |
miny | number | The y minimum to use, can be used to clip the data |
modelradius | number | A radius of the polar chart in the model coordinates |
name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
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 |
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 |
opacityblendmode | BlendMode | Node opacity mode to blend it |
options | Options | |
options-cssclass | string | The css class name of this node |
options-id | string | number | Id of the node, its a unique identifier |
options-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
options-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
options-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 |
options-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
options-z-index | number | Define node z-index |
options | Options | |
options-clipstyle | ClipStyle | Clipping style |
options-clipstyle | GraphicsPath | Clipping style |
options-csscursor | string | CSS cursor associated with node |
options-cssstyle | string | CSS style to be applied to inserted elements |
options-localtransform | Transformation | Local transformation |
options-margins | number | string | It has properties for specifying the margins for each side |
options-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 |
options-opacityblendmode | BlendMode | Node opacity mode to blend it |
options-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
options-scalescrollstrategy-enabled | boolean | Enable flag |
options-transform | string | Additional CSS transformation applied to node or 'none' |
options-transform | Transformation | Additional CSS transformation applied to node or 'none' |
options | Options | |
options-fillstyle | string | Style applied on fill |
options-fillstyle | FillStyle | Style applied on fill |
options-linestyle | string | Style applied on outline |
options-linestyle | LineStyle | Style applied on outline |
options | Options | |
options-bottom | number | Y coordinate of the bottom right corner (if 'height' not specified) |
options-bounds | Rect | Bounds |
options-height | number | Height (if 'bottom' not specified) |
options-left | number | X coordinate of the top left corner |
options-right | number | X coordinate of the bottom right corner (if 'width' not specified) |
options-top | number | Y coordinate of the top left corner |
options-width | number | Width (if 'right' not specified) |
options | Options | |
options-autominmax | boolean | Force automatically recalculate CrossPlot bounds when new data is set |
options-colorprovider | ColorProvider | The colorProvider used to color points based on their Z value |
options-defaultcolor | string | The color to be used if there is no ColorProvider provided or if a point has no valid Z value |
options-defaultlinecolor | string | The color of line to be used in symbol |
options-highlightcolor | string | The color to use for highlighted shapes |
options-logx | boolean | True to logarithm x values, false otherwise |
options-logy | boolean | True to logarithm y values, false otherwise |
options-logz | boolean | True to logarithm z values, false otherwise |
options-maxx | number | The x maximum to use, can be used to clip the data |
options-maxy | number | The y maximum to use, can be used to clip the data |
options-minx | number | The x minimum to use, can be used to clip the data |
options-miny | number | The y minimum to use, can be used to clip the data |
options-painter | string | The painter to draw symbols |
options-symbolsize | number | The symbol size in pixel |
options | DataOptions | |
options-center | Point | A center of the polar chart |
options-modelradius | number | A radius of the polar chart in the model coordinates |
options-outerradius | number | A radius of the polar chart |
options-painter | string | A painter |
options-polargrid | PolarGrid | Grid to get initialization parameters. If grid is specified other parameters are ignored |
options-polargrid-angle | number | An increment angle of the grid |
options-polargrid-bottom | number | Y coordinate of the bottom right corner (if 'height' not specified) |
options-polargrid-bounds | Rect | Bounds |
options-polargrid-center | Point | A center of the polar chart |
options-polargrid-clipstyle | ClipStyle | Clipping style |
options-polargrid-clipstyle | GraphicsPath | Clipping style |
options-polargrid-cssclass | string | The css class name of this node |
options-polargrid-csscursor | string | CSS cursor associated with node |
options-polargrid-cssstyle | string | CSS style to be applied to inserted elements |
options-polargrid-fillstyle | string | Style applied on fill |
options-polargrid-fillstyle | FillStyle | Style applied on fill |
options-polargrid-height | number | Height (if 'bottom' not specified) |
options-polargrid-id | string | number | Id of the node, its a unique identifier |
options-polargrid-left | number | X coordinate of the top left corner |
options-polargrid-linestyle | string | Style applied on outline |
options-polargrid-linestyle | LineStyle | Style applied on outline |
options-polargrid-linestyle | string | Line style to specify style for outer circle |
options-polargrid-linestyle | LineStyle | Line style to specify style for outer circle |
options-polargrid-localtransform | Transformation | Local transformation |
options-polargrid-margins | number | string | It has properties for specifying the margins for each side |
options-polargrid-modelradius | number | Radius of the polar chart in the model coordinates |
options-polargrid-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
options-polargrid-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 |
options-polargrid-opacityblendmode | BlendMode | Node opacity mode to blend it |
options-polargrid-options | OptionsBase | |
options-polargrid-options-angle | number | An increment angle of the grid |
options-polargrid-options-center | Point | A center of the polar chart |
options-polargrid-options-linestyle | string | Line style to specify style for outer circle |
options-polargrid-options-linestyle | LineStyle | Line style to specify style for outer circle |
options-polargrid-options-modelradius | number | Radius of the polar chart in the model coordinates |
options-polargrid-options-outerradius | number | A radius of the polar chart |
options-polargrid-options-startangle | number | A start angle to be used for 0 angle (by default it is E direction) |
options-polargrid-outerradius | number | A radius of the polar chart |
options-polargrid-right | number | X coordinate of the bottom right corner (if 'width' not specified) |
options-polargrid-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
options-polargrid-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
options-polargrid-startangle | number | A start angle to be used for 0 angle (by default it is E direction) |
options-polargrid-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 |
options-polargrid-top | number | Y coordinate of the top left corner |
options-polargrid-transform | string | Additional CSS transformation applied to node or 'none' |
options-polargrid-transform | Transformation | Additional CSS transformation applied to node or 'none' |
options-polargrid-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
options-polargrid-width | number | Width (if 'right' not specified) |
options-polargrid-z-index | number | Define node z-index |
options-startangle | number | A start angle to be used for 0 angle (by default it is E direction) |
outerradius | number | A radius of the polar chart |
painter | string | The painter to draw symbols |
painter | string | A painter |
polargrid | PolarGrid | Grid to get initialization parameters. If grid is specified other parameters are ignored |
right | number | X coordinate of the bottom right corner (if 'width' not specified) |
scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
startangle | number | A start angle to be used for 0 angle (by default it is E direction) |
symbolsize | number | The symbol size in pixel |
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 |
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 |
top | number | Y coordinate of the top left corner |
transform | string | Additional CSS transformation applied to node or 'none' |
transform | Transformation | Additional CSS transformation applied to node or 'none' |
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 |
visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
width | number | Width (if 'right' not specified) |
z-index | number | Define node z-index |
z-index | number | Define node z-index |
Methods
▸ addCssClass(cssclass): PolarCrossPlot
Adds new css class to node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ addInvalidateHandler(handler): PolarCrossPlot
Add invalidate handler
Deprecated
since 4.0, use Node.on instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
CrossPlot.addInvalidateHandler
▸ Protected applyOpacity(context): PolarCrossPlot
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
CrossPlot.applyResponsiveStyle
▸ cartesianToPolar(x, y): Point
Convert point from polar to cartesian coordinate system
| Name | Type | Description |
|---|---|---|
x | number | x coordinate (offset from center point) |
y | number | coordinate (offset from center point) |
▸ checkCollision(context): boolean
Check collision
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
true if object is inside of rendering area
▸ clone(): CrossPlot
All subclasses should override copyConstructor or provide custom implementation for this method
clone
▸ connectStyle(style, type, callback): PolarCrossPlot
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?): PolarCrossPlot
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 | CrossPlot | Source to copy from |
Optional deepCopy | boolean | deep copy |
this
▸ disconnectStyle(style, type, callback): PolarCrossPlot
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
▸ enableClipping(doClip): PolarCrossPlot
Enables or disables clipping of this node. If enabled, shapes will not be rendered outside of its bounds.
| Name | Type | Description |
|---|---|---|
doClip | boolean | enable clipping on this node |
▸ enableEventPropagation(enable): PolarCrossPlot
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
CrossPlot.enableEventPropagation
▸ execute(delegate): PolarCrossPlot
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: PolarCrossPlot) => void | Function to execute |
The result if any or this
▸ execute<T>(delegate): T
| Name |
|---|
T |
| Name | Type |
|---|---|
delegate | (this: PolarCrossPlot) => 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)
▸ getAnimationStyle(): AnimationStyle
Return animation style
animationStyle current animation style
▸ getBounds(): Rect
Return bounds. Will also lock the bounds so they cannot be directly modified.
bounds
▸ getCenterX(): number
Returns the X coordinate of the center of the framing rectangle of this rectangular shape.
number
▸ getCenterY(): number
Returns the Y coordinate of the center of the framing rectangle of this rectangular shape.
number
▸ getClassName(): string
string
▸ getClipStyle(): ClipStyle
Gets the current clipping style
clipping style
▸ getColorProvider(): ColorProvider
Return ColorProvider
colorProvider
▸ 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(): Data
Get Data
▸ getFillStyle(): FillStyle
Return fill style
fillStyle current fill style
▸ getHeight(): number
Returns the height of the framing rectangle.
number
▸ getHighlightedIndices(): number[]
Gets Highlighted Indices
number[]
CrossPlot.getHighlightedIndices
▸ getId(): string | number
Returns the associated identifier of the node
string | number
The node's id
▸ getIndicesAt(area, includeSize?, tr?): number[]
Return indices in search area
| Name | Type | Description |
|---|---|---|
area | Area | search area |
Optional includeSize | boolean | true for symbol size(s) to be included in the search, false by default |
Optional tr | Transformation | for device area needed |
number[]
▸ Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>
Gets invalidate method
AttributeCallback<EventDispatcher>
method to invalidate this object
▸ getLayoutStyle(): LayoutStyle<string | number>
Return desired layout style
LayoutStyle<string | number>
▸ 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>
▸ 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
▸ getParent(): Node
Return parent node
parent node
▸ getPointsAt(rect): { x: number ; y: number ; z: number }[]
Return points in search area
| Name | Type | Description |
|---|---|---|
rect | Rect | search area |
{ x: number ; y: number ; z: number }[]
▸ getPolarGrid(): PolarGrid
Returns associated polar grid
polar grid
▸ getProperties(): OptionsOut
Gets all the properties pertaining to this object
properties
▸ 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
CrossPlot.getScaleScrollStrategy
▸ getSceneTransform(): Transformation
Returns transformation from node to root scene
a transformation from node to root scene
▸ getSymbolPainter(): Painter
Get the current painter used to draw points
▸ getSymbolShape(index): SymbolShape
Gets symbol shape by index
| Name | Type |
|---|---|
index | number |
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getVisible(): boolean
Return visibility of the node
boolean
true if node is visible
▸ getWidth(): number
Returns the width of the framing rectangle.
number
▸ getWorldTransform(): Transformation
Retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.
transform the world transform.
▸ getX(): number
Returns the X coordinate of the left bottom corner of the framing rectangle.
number
▸ getY(): number
Returns the Y coordinate of the left bottom corner of the framing rectangle.
number
▸ 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
▸ highlightArea(rect, reset): PolarCrossPlot
Highlights the selected area
| Name | Type | Description |
|---|---|---|
rect | Rect | search area |
reset | boolean | un-highlights previously selected indices |
▸ highlightIndices(indices, reset): PolarCrossPlot
Highlights the selected indices
| Name | Type | Description |
|---|---|---|
indices | number[] | indices to be highlighted |
reset | boolean | un-highlights previously selected indices |
▸ hitTest(area, radius?, ignoreOrientation?): Object
Hit test in the device coordinates
| Name | Type | Description |
|---|---|---|
area | Point | Rect | model area or position |
Optional radius | number | radius of selection |
Optional ignoreOrientation | Orientation | Orientation to ignore - this parameter is ignored for arrays of points |
Object
a collection of selected data
| Name | Type |
|---|---|
indices | number[] |
▸ invalidate(bounds?, force?): PolarCrossPlot
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
▸ invalidateLayout(): PolarCrossPlot
Notify that layout is invalidated. Send event Events.LayoutInvalidated
this
▸ invalidateParent(bounds?, force?): PolarCrossPlot
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
▸ isClippingEnabled(): boolean
Returns if clipping is enabled or not for this node.
boolean
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isEmpty(): boolean
Return false if bounds is equal to zero
boolean
▸ isEventPropagationEnabled(): boolean
Return true if event propagation is enabled from child to parent
boolean
CrossPlot.isEventPropagationEnabled
▸ isNotificationEnabled(): boolean
return state of notification
boolean
current notification state
CrossPlot.isNotificationEnabled
▸ 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>(event, source, args?): PolarCrossPlot
Notify listeners of the Node
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
event | E | type of event |
source | AbstractNode | source who called the event |
Optional args | EventMap[E] | event arguments |
this
▸ off<E>(type?, callback?): PolarCrossPlot
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: PolarCrossPlot, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): PolarCrossPlot
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: PolarCrossPlot, args: EventMap[E]) => void | to be called |
this
▸ Protected onParentChanged(node): PolarCrossPlot
This method is called when parent changes. Do not call it directly.
| Name | Type | Description |
|---|---|---|
node | Node | node to change parent |
this
▸ Protected onRectChanged(newRect): PolarCrossPlot
| Name | Type |
|---|---|
newRect | Rect |
▸ Protected onVisibilityChanged(): void
This method is called if visibility is changed. Send event Events.VisibilityChanged
void
▸ polarToCartesian(r, theta): Point
Converting a point from polar to Cartesian coordinates, where x and y are offsets from the polar grid center
| Name | Type | Description |
|---|---|---|
r | number | radius |
theta | number | angle in grad |
▸ 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
CrossPlot.registerAnimationStyle
▸ removeCssClass(cssclass): PolarCrossPlot
Removes css class from node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ removeInvalidateHandler(handler): PolarCrossPlot
Remove invalidate handler
Deprecated
since 4.0, use Node.off instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
CrossPlot.removeInvalidateHandler
▸ 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
▸ rotate(theta, x, y): PolarCrossPlot
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): PolarCrossPlot
Scale node
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
this
▸ setAnimationStyle(animationStyle): PolarCrossPlot
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
▸ setBounds(rect): PolarCrossPlot
Sets the location and size of the framing rectangle of this rectangular shape to the specified values. This method is the same as setRect.
| Name | Type | Description |
|---|---|---|
rect | Rect | bounds rect |
this
▸ setBounds(x1, y1?, x2?, y2?): PolarCrossPlot
Sets the location and size of the framing rectangle of this rectangular shape to the specified values. This method is the same as setRect.
| Name | Type | Description |
|---|---|---|
x1 | number | x coordinate of the top left corner |
Optional y1 | number | y coordinate of the top left corner |
Optional x2 | number | x coordinate of the bottom right corner |
Optional y2 | number | y coordinate of the bottom right corner |
this
▸ setClipStyle(style): PolarCrossPlot
Sets a new clipping style
| Name | Type | Description |
|---|---|---|
style | GraphicsPath | ClipStyle | Options | a new clipping style |
this
▸ setCss(style, merge?): PolarCrossPlot
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): PolarCrossPlot
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): PolarCrossPlot
Set CSS transformation
| Name | Type | Description |
|---|---|---|
transform | string | Transformation | transformation css transformation instruction or Transformation instance |
this
▸ setData(options): PolarCrossPlot
Sets data
| Name | Type | Description |
|---|---|---|
options | DataOptions | options |
this
▸ setFillStyle(fillStyle, merge?): PolarCrossPlot
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
▸ setHighLightColors(colors): PolarCrossPlot
| Name | Type |
|---|---|
colors | Record<string, RgbaColor> |
▸ setId(id): PolarCrossPlot
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setLayoutStyle(layoutStyle, merge?): PolarCrossPlot
Specify desired layout style
| Name | Type | Description |
|---|---|---|
layoutStyle | LayoutStyle<string | number> | Options<string | number> | desired layout style or layout style params |
Optional merge | boolean | true if you want to merge layoutStyle with existing attribute, false by default |
▸ setLineStyle(lineStyle, merge?): PolarCrossPlot
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?): PolarCrossPlot
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
▸ setMarginsStyle(margins, merge?): PolarCrossPlot
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): PolarCrossPlot
Sets name of the node
| Name | Type | Description |
|---|---|---|
name | string | The node name |
this
▸ setNotification(notify, force?): PolarCrossPlot
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?): PolarCrossPlot
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
▸ setProperties(properties?): PolarCrossPlot
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional properties | Options | properties |
this
▸ setProperty(name, value): PolarCrossPlot
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
▸ setRect(rect): PolarCrossPlot
Sets the location and size of the framing rectangle of this rectangular shape to the specified values.
| Name | Type | Description |
|---|---|---|
rect | Rect | rect |
▸ setRect(params): PolarCrossPlot
Sets the location and size of the framing rectangle of this rectangular shape to the specified values.
| Name | Type | Description |
|---|---|---|
params | Options | rect params |
▸ setRect(x1, y1, x2, y2): PolarCrossPlot
Sets the location and size of the framing rectangle of this rectangular shape to the specified values.
| Name | Type | Description |
|---|---|---|
x1 | number | x coordinate of the top left corner |
y1 | number | y coordinate of the top left corner |
x2 | number | x coordinate of the bottom right corner |
y2 | number | y coordinate of the bottom right corner |
▸ setRenderingFilter(filter): PolarCrossPlot
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
▸ setResponsiveStyle(style): PolarCrossPlot
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
▸ setScaleScrollStrategy(strategy?): PolarCrossPlot
Sets scale scroll strategy
| Name | Type | Description |
|---|---|---|
Optional strategy | Delegate | scale scroll strategy |
this
CrossPlot.setScaleScrollStrategy
▸ setSelectable(selectable): PolarCrossPlot
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): PolarCrossPlot
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setSymbolPainter(painter): PolarCrossPlot
Sets the painter that will be used to draw crossplot points
| Name | Type | Description |
|---|---|---|
painter | Painter | The symbol painter function to draw |
▸ setTag(tag): PolarCrossPlot
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
▸ setVisible(value): PolarCrossPlot
Sets visibility of the node. Send event Events.VisibilityChanged
| Name | Type | Description |
|---|---|---|
value | boolean | flag specifying visibility of the node |
this
▸ setZIndex(value): PolarCrossPlot
Sets z-index for node (set null for default)
| Name | Type | Description |
|---|---|---|
value | number | index determining node z-position |
this
▸ shear(shx, shy): PolarCrossPlot
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): PolarCrossPlot
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
CrossPlot.unregisterAnimationStyle
▸ updateLimits(): boolean
Update limits
boolean
result true if worked
▸ updateSceneTransformation(): PolarCrossPlot
Update scene transformation
this
CrossPlot.updateSceneTransformation
▸ updateState(regions?, changes?): PolarCrossPlot
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(): PolarCrossPlot
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
CrossPlot.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