API / geotoolkit / widgets / TimeSeriesWidget / TimeSeriesWidget
widgets.TimeSeriesWidget.TimeSeriesWidget
The time series widget plots data points horizontally along a time axis. It inherits from BaseWidget. Curves are added to the widget by calling the addCurve() function:
- name -- curve name
- uri -- unique dataset id
- data -- [DataTableView](../classes/geotoolkit.data.datatableview.datatableview.md)
- properties //visual properties
setVisibleRange() can be used to set the visiblemodellimits programmatically
In addition to plotting the data, the widget also supports fills via the addFill() function and annotations via addAnnotation() and addAnnotationLine() functions.
Configuring the various options of the widget can be achieved by calling setOptions().
Selection is handled in the application by using the onSelectionChanged event.
Some of the default tools are available to support:
- Zoom
- Crosshair
- Rubberband
- Selection
- Panning
Example
import {Group} from '@int/geotoolkit/scene/Group';
import {Rect} from '@int/geotoolkit/util/Rect';
import {TimeSeriesWidget} from '@int/geotoolkit/widgets/TimeSeriesWidget';
// Initialize widget
const options = {
'title': {
'visible': false
},
'model': new Group()
.setModelLimits(new Rect(startDate, 0, endDate, 1)),
'curveaxis': {
'visible': true,
'autocoloraxis': true,
'autocolorlabel': true,
'titlevisible': true,
'axiswidth': 30,
'compact': true
},
'curvelimits': {
'visible': false
}
};
const widget = new TimeSeriesWidget(options);
// Add Data/Curve to the widget
widget.addCurve({
'name': 'CALI',
'uri': '//test//cali',
'data': dataTableView, // @int/geotoolkit/data/DataTableView
'properties': {
'autoscale': true,
'axisautolabelrotation': true, // curve properties can be modified here as well.
'neatlimits': true,
'unit': 'INS',
'linestyle': {
'color': 'blue',
'width': 2
}
}
});↳
TimeSeriesWidget
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
alignaxis | boolean | Align axis |
automodellimitsmode | boolean | Automodellimits mode |
barmode | BarMode | Options for bar mode |
barmode-barvaluevisibility | boolean | number | Bar values visible distance in device space of TimeSeriesBar |
cursorselectionlimit | number | Threshold distance indevice space, from vertical cursor line to show symbol, update legend and show tooltip |
curve | CurveOptions | |
curve-autoscale | boolean | True if curve in auto-scaling mode |
curve-axisposition | string | 'left'/'right' |
curve-borderlinestyle | string | Timeseriesshape border line style |
curve-borderlinestyle | LineStyle | Timeseriesshape border line style |
curve-borderlinestyle-color | string | Color in CSS form |
curve-borderlinestyle-fill | string | Optional fill style to be used to fill lines generated with this style |
curve-borderlinestyle-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
curve-borderlinestyle-fill-color | string | Color in CSS form |
curve-borderlinestyle-fill-evenoddmode | boolean | Even-odd fill mode |
curve-borderlinestyle-fill-fillpattern | Pattern | Pattern |
curve-borderlinestyle-fill-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 |
curve-borderlinestyle-fill-fillpattern-patternname | string | Name of this pattern for indexing |
curve-borderlinestyle-fill-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
curve-borderlinestyle-fill-foreground | string | Foreground color |
curve-borderlinestyle-fill-pattern | Pattern | Pattern |
curve-borderlinestyle-linecap | CapStyle | The line cap style |
curve-borderlinestyle-linedashoffset | number | Line dash offset of dashed line |
curve-borderlinestyle-linejoin | JoinStyle | The line join style |
curve-borderlinestyle-pixelsnapmode | boolean | Pixel Snap Mode, default( |
curve-borderlinestyle-scalable | boolean | True if width should depend on transformation |
curve-borderlinestyle-unit | string | Optional unit for the width |
curve-borderlinestyle-width | number | string | The line thickness |
curve-curvevisible | boolean | Curve line visibility flag |
curve-decimationspacing | number | |
curve-interpolationtype | InterpolationType | Interpolation type |
curve-linestyle | string | Curve linestyle |
curve-linestyle | LineStyle | Curve linestyle |
curve-logarithmicscale | boolean | Logarithmic scale |
curve-marker | SymbolShape | Object containing marker symbol |
curve-marker-alignment | AnchorType | Alignment according to the anchor point |
curve-marker-alignment | AnchorType | Anchor type of symbol |
curve-marker-ax | number | Anchor x position |
curve-marker-ay | number | Anchor y position |
curve-marker-cache | boolean | Set it to true if you want to cache complex geometry to raster |
curve-marker-clipstyle | ClipStyle | Clipping style |
curve-marker-clipstyle-evenodd | boolean | True if evenodd mode is on ('nonzero' mode otherwise) |
curve-marker-clipstyle-geometry | GraphicsPath | Clipping geometry |
curve-marker-clipstyle-geometry-bounds | Rect | Bounds |
curve-marker-clipstyle-geometry-bounds-height | number | Height |
curve-marker-clipstyle-geometry-bounds-readonly | boolean | Readonly |
curve-marker-clipstyle-geometry-bounds-width | number | Width |
curve-marker-clipstyle-geometry-bounds-x | number | Left |
curve-marker-clipstyle-geometry-bounds-y | number | Top |
curve-marker-clipstyle | GraphicsPath | Clipping style |
curve-marker-cssclass | string | The css class name of this node |
curve-marker-csscursor | string | CSS cursor associated with node |
curve-marker-cssstyle | string | CSS style to be applied to inserted elements |
curve-marker-fillstyle | string | Style applied on fill |
curve-marker-fillstyle | FillStyle | Style applied on fill |
curve-marker-height | number | Shape height |
curve-marker-id | string | number | Id of the node, its a unique identifier |
curve-marker-ispointingup | boolean | Defines whether the shape is always pointing up |
curve-marker-layoutstyle | LayoutStyle | Layout style to specify how to lay out shape |
curve-marker-layoutstyle-constraint | SizeConstraint | Layout constrains |
curve-marker-layoutstyle-flexgrow | number | Number specifying how much the item will grow relative to the rest of the items inside the same container |
curve-marker-layoutstyle-flexshrink | number | Number specifying how much the item will shrink relative to the rest of the items inside the same container |
curve-marker-layoutstyle-float | string | Float position |
curve-marker-layoutstyle-position | string | Layout position |
curve-marker-layoutstyle-size | number | string | Layout size |
curve-marker-linestyle | string | Style applied on outline |
curve-marker-linestyle | LineStyle | Style applied on outline |
curve-marker-localtransform | Transformation | Local transformation |
curve-marker-localtransform-dx | number | X axis translation |
curve-marker-localtransform-dy | number | Y axis translation |
curve-marker-localtransform-xx | number | X scale |
curve-marker-localtransform-xy | number | Xy skew |
curve-marker-localtransform-yx | number | Yx skew |
curve-marker-localtransform-yy | number | Y scale |
curve-marker-margins | number | string | It has properties for specifying the margins for each side |
curve-marker-maxdimension | Dimension | Maximum size for rendering |
curve-marker-maxdimension-height | number | Height of dimension |
curve-marker-maxdimension-width | number | Width of dimension or properties |
curve-marker-mindimension | Dimension | Minimum size for rendering |
curve-marker-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
curve-marker-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 |
curve-marker-opacityblendmode | BlendMode | Node opacity mode to blend it |
curve-marker-painter | string | A function with has parameters: symbol, box, context |
curve-marker-painterproperties | any | Symbol's painter's properties |
curve-marker-preserveaspectratio | boolean | Preserve aspect ratio of the anchored shape |
curve-marker-preservereadingorientation | boolean | Preserve reading orientation for local transform |
curve-marker-preserverightangle | boolean | Preserve right angle for local transformation |
curve-marker-rotationangle | number | Rotation angle at anchor |
curve-marker-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
curve-marker-scalescrollstrategy-enabled | boolean | Enable flag |
curve-marker-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
curve-marker-sizeisindevicespace | boolean | Is coordinate in device space |
curve-marker-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 |
curve-marker-transform | string | Additional CSS transformation applied to node or 'none' |
curve-marker-transform | Transformation | Additional CSS transformation applied to node or 'none' |
curve-marker-useminmaxdimensions | boolean | Use the min max dimensions to limit visual size |
curve-marker-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
curve-marker-width | number | Shape width |
curve-marker-z-index | number | Define node z-index |
curve-markervisible | boolean | Visibility of point markers |
curve-max | number | Curve max value |
curve-min | number | Curve min value |
curve-name | string | Name of curve |
curve-neatlimits | boolean | Neatlimits setting, true of set neatlimits object to enable, false or null|undefined to disable |
curve-neatlimitscenteredonzero | boolean | True if curve in neat-limits mode |
curve-spline | boolean | Toggle spline interpolation |
curve-unit | string | Unit string |
curve-values | Values | Object containing point values options |
curve-values-anchor | AnchorType | |
curve-values-color | string | Color of value text font |
curve-values-fillstyle | string | Fillstyle of value text container |
curve-values-fillstyle | FillStyle | Fillstyle of value text container |
curve-values-font | string | Value text font |
curve-values-format | NumberFormat | Formatter for value text |
curve-values-format-fulllocale | boolean | Specify format how to provide locale |
curve-values-format-grouplength | number | Specify group length of numbers |
curve-values-format-locale | string | Format locale |
curve-values-format-locale | Locale | Format locale |
curve-values-format-locale-locale | string | The name of the locale |
curve-values-format-locale-numberformat | NumberFormatInfo | Defines number format |
curve-values-format-locale-numberformat-dec | string | Defines decimal symbol |
curve-values-format-locale-numberformat-group | string | Defines group symbol |
curve-values-format-locale-numberformat-infinity | string | Defines infinity text |
curve-values-format-locale-numberformat-neg | string | Defines negative symbol |
curve-values-format-maximumfractiondigits | number | Specify maximum fraction digits |
curve-values-format-minimumfractiondigits | number | Specify minimum fraction digits, have to be less or equal to maximumfractiondigits |
curve-values-format-round | boolean | Round number |
curve-values-linestyle | string | Linestyle of value text container |
curve-values-linestyle | LineStyle | Linestyle of value text container |
curve-values-offset | number | |
curve-values-offsetx | number | |
curve-values-offsety | number | |
curve-values-padding | number | |
curve-values-paddingstyle | number | string | Inner padding style in device coordinates |
curve-values-textstyle | string | Texttyle of value text container |
curve-values-textstyle | TextStyle | Texttyle of value text container |
curve-values-textstyle-alignment | AlignmentStyle | Alignment |
curve-values-textstyle-autosize | boolean | Auto font size on high definition display |
curve-values-textstyle-background | string | Background style |
curve-values-textstyle-background | FillStyle | Background style |
curve-values-textstyle-baseline | BaseLineStyle | Base line |
curve-values-textstyle-color | string | Color in CSS form |
curve-values-textstyle-fill | FillStyle | Text fill style |
curve-values-textstyle-font | string | Font see |
curve-values-textstyle-fonturl | string | The place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword |
curve-values-textstyle-lineheight | string | number | Line height |
curve-values-textstyle-multiline | boolean | Allow multi-line text |
curve-values-textstyle-outline | string | Outline style |
curve-values-textstyle-outline | LineStyle | Outline style |
curve-values-textstyle-overflowwrap | OverflowWrapStyle | Overflow wrap |
curve-values-textstyle-strikethrough | string | Strikethrough style |
curve-values-textstyle-strikethrough | LineStyle | Strikethrough style |
curve-values-textstyle-textoverflow | TextOverflowStyle | Text overflow |
curve-values-textstyle-underline | string | Underline style |
curve-values-textstyle-underline | LineStyle | Underline style |
curve-values-textstyle-underlineoffset | string | number | Underline offset distance |
curve-values-textstyle-whitespace | WhiteSpaceStyle | White space |
curve-values-textstyle-wordbreak | WordBreakStyle | Word break |
curve-values-visible | boolean | Visibility of point values |
curve-visible | boolean | Visibility of curve |
curveaxis | AxisOptions | JSON which defines curve axis |
curveaxis-autocoloraxis | boolean | Synchronize axis color with curve color |
curveaxis-autocolorlabel | boolean | Synchronize axis and label color with curve color |
curveaxis-autolabelrotation | boolean | Automatic label rotation |
curveaxis-axisautolabelrotation | boolean | Axis automatic label rotation |
curveaxis-axiscolor | string | Axis color is autocoloraxis is false |
curveaxis-axisvisible | boolean | Axis visibility |
curveaxis-axiswidth | number | Curve axis width |
curveaxis-baselinestyle | LineStyle | Base line style. Color set to curve's color, width = 1 by default |
curveaxis-compact | boolean | Compact |
curveaxis-font | string | Curve axis text font |
curveaxis-labelorientation | string | number | Rotation of the curveaxis labels; can be automatic, vertical, horizontal |
curveaxis-labelorientation | Orientation | Rotation of the curveaxis labels; can be automatic, vertical, horizontal |
curveaxis-labeltext | string | Title text override |
curveaxis-logarithmicscale | boolean | Logarithmic scale |
curveaxis-position | string | Curve axis position 'left'/'right' |
curveaxis-textcolor | string | Text color if autocolorlabel is false |
curveaxis-textwidth | number | Curve text width |
curveaxis-tickgenerator | NumericTickGenerator | Tick generator |
curveaxis-tickgenerator-labelstyles | TextStyle | An object containing label style for specified grades |
curveaxis-tickgenerator-tag | any | Tag user can specify info associated with current object |
curveaxis-tickgenerator-tickstyles | LineStyle | An object containing tick styles for specified grades |
curveaxis-titlerotateangle | number | Title rotate angle |
curveaxis-titlevisible | boolean | Curve axis label visibility |
curveaxis-visible | boolean | Visibility of curve axis |
curvelimits | CurveLimitsOptions | JSON which defines curve limits area |
curvelimits-font | string | 10px Arial] curve limits text font |
curvelimits-margin | number | Curve limits area margin (top and bottom) |
curvelimits-visible | boolean | Visibility of curve limits area |
curvelimits-width | number | Width for each curve limits column |
curvesymbol | SymbolOptions | JSON which defines curve highlighting symbol |
curvesymbol-fillstyle | string | Fillstyle of symbol |
curvesymbol-fillstyle | FillStyle | Fillstyle of symbol |
curvesymbol-height | number | Height of symbol |
curvesymbol-painter | string | Painter |
curvesymbol-visible | boolean | Visibility of curve highlighting symbol |
curvesymbol-width | number | Width of symbol |
model | Group | Timeseries' center model limits can be specified using this option |
model-automodellimitsmode | boolean | Auto model limits mode |
model-bounds | Rect | Define position of the group in the parent |
model-clipping | boolean | Enable clipping, this does not consider the clipstyle, it is related to bounds-clipping |
model-clipstyle | ClipStyle | Clipping style |
model-clipstyle | GraphicsPath | Clipping style |
model-contentorientation | Orientation | Content orientation |
model-cssclass | string | The css class name of this node |
model-csscursor | string | CSS cursor associated with node |
model-cssstyle | string | CSS style to be applied to inserted elements |
model-fillstyle | string | Fill style |
model-fillstyle | FillStyle | Fill style |
model-horizontalflip | boolean | Horizontal axis goes from right to left |
model-id | string | number | Id of the node, its a unique identifier |
model-infinity | boolean | Mode to render outside the model limits |
model-layoutstyle | LayoutStyle | Layout style to be used for parent layout |
model-linestyle | string | Line style |
model-linestyle | LineStyle | Line style |
model-localtransform | Transformation | Local transformation |
model-margins | number | string | It has properties for specifying the margins for each side |
model-modellimits | Rect | Define inner model coordinates of the group |
model-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
model-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 |
model-opacityblendmode | BlendMode | Node opacity mode to blend it |
model-padding | number | string | It has properties for specifying the padding for each side |
model-pickingchildren | boolean | Enable picking children |
model-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
model-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
model-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 |
model-transform | string | Additional CSS transformation applied to node or 'none' |
model-transform | Transformation | Additional CSS transformation applied to node or 'none' |
model-verticalflip | boolean | Vertical axis goes from bottom to top |
model-viewcache | boolean | View cache to cache child nodes |
model-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
model-z-index | number | Define node z-index |
modeloffsets | ModelOffsets | Options for model padding offsets |
modeloffsets-left | string | number | Model left offset |
modeloffsets-right | string | number | Model right offset |
percent | PercentMode | Percent TimesSeriesWidget settings |
percent-enabled | boolean | True to enable time series percent mode, false otherwise |
stack | StackMode | Stack TimesSeriesWidget settings |
stack-enabled | boolean | True to enable time series stack area mode, false otherwise |
timezone | TimeZone | UTC or local time |
viewcache | boolean |
Methods
▸ addAnnotation(options): string
add an Annotation object at the specific point : [curveid, time] note: it will try to find the nearest point at the specific time.
| Name | Type | Description |
|---|---|---|
options | AddAnnotationOptions | json object that represents the annotation options |
string
id of the created Annotation object or null if it cannot be inserted at the following time
▸ addAnnotationLine(options): string
Add Annotation Line
| Name | Type | Description |
|---|---|---|
options | AnnotationLineOptions | JSON for annotation properties |
string
id
▸ addAnnotationLineCollection(optionsArray): string
Add Annotation Line Group.
See
TimeSeriesWidget.addAnnotationLine for options description
| Name | Type | Description |
|---|---|---|
optionsArray | AnnotationLineOptions[] | array of options of JSON for annotation properties |
string
the group id (or null if an array was not passed in)
▸ addBaseLayer(baseLayer): TimeSeriesWidget
Add baseLayer to container
this
▸ addChild(node): TimeSeriesWidget
Add a child node
this
▸ addCssClass(cssclass): TimeSeriesWidget
Adds new css class to node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ addCurve(name, uri?, data?, properties?, id?): string
Adds a curve to the widget
| Name | Type | Description |
|---|---|---|
name | string | CurveOptions | curve name or object containing all parameters |
Optional uri | string | curve uri |
Optional data | DataTableView | DataTableView object for this curve |
Optional properties | CurveProperties | object |
Optional id | string | unique id for added curve |
string
id unique id for the curve added
▸ addCurves(curves): number | string[]
Adds an array of curves
| Name | Type | Description |
|---|---|---|
curves | CurveOptions[] | Array of objects containing curve definitions |
number | string[]
Array of curve ids added or -1 if no curves added
▸ addFill(id1, id2, fillStyle, fillType, fillDirection, targetCurveId?): void
Add a fill to a curve(id1)
| Name | Type | Description |
|---|---|---|
id1 | string | (From curve) |
id2 | string | number | (To curve/referenceline/null) |
fillStyle | Type | the fill style |
fillType | FillType | fill type |
fillDirection | FillDirection | Direction of the fill |
Optional targetCurveId | string | target curve id to associate fill with |
void
▸ addInvalidateHandler(handler): TimeSeriesWidget
Add invalidate handler
Deprecated
since 4.0, use Node.on instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
BaseWidget.addInvalidateHandler
▸ addOverlay(overlay): TimeSeriesWidget
Add overlay to container
this
▸ addReferenceLine(options): TimeSeriesWidget
Create and add a reference line to the widget
| Name | Type | Description |
|---|---|---|
options | ReferenceLineData | Options for reference line |
this
▸ adjustPosition(area?, vAlign?, hAlign?): TimeSeriesWidget
Adjust position of node to specified area
| Name | Type | Description |
|---|---|---|
Optional area | Rect | specified area. Default to Parent Model Limits |
Optional vAlign | string | vertical alignment. It can be "top", "bottom", "center". Defaults to "top". |
Optional hAlign | string | horizontal alignment It can be "left", "right", "center". Defaults to "left". |
this
▸ Protected applyOpacity(context): TimeSeriesWidget
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
BaseWidget.applyResponsiveStyle
▸ changeBaseLayerOrder(overlay, order, anchor?): TimeSeriesWidget
Changes the z-order of the baseLayer.
| Name | Type | Description |
|---|---|---|
overlay | Node | |
order | NodeOrder | position to be added |
Optional anchor | Node | anchor node to specify changeOrder with respect to this node |
this
BaseWidget.changeBaseLayerOrder
▸ changeChildOrder(node, order, anchor?): TimeSeriesWidget
changes the z-order of the nodes being rendered.
| Name | Type | Description |
|---|---|---|
node | Node | any child added in the Composite node |
order | NodeOrder | position to be added |
Optional anchor | Node | anchor node to specify changeOrder with respect to this node |
this
▸ changeOverlayOrder(overlay, order, anchor?): TimeSeriesWidget
Changes the z-order of the overlay.
| Name | Type | Description |
|---|---|---|
overlay | Node | child overlay |
order | NodeOrder | position to be added |
Optional anchor | Node | anchor node to specify changeOrder with respect to this node |
this
▸ changeVisualOrder(curve, order, anchor?): TimeSeriesWidget
| Name | Type | Description |
|---|---|---|
curve | string | id of curve to re-ordered |
order | NodeOrder | type of node re-ordering |
Optional anchor | string | id of anchor for re-ordering |
this
▸ checkCollision(context): boolean
Check culling Returns true if object is inside of renderable area
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
true if node is collided
▸ clearBaseLayers(disposeBaseLayers?): TimeSeriesWidget
Remove all child baseLayers from group
| Name | Type | Description |
|---|---|---|
Optional disposeBaseLayers | boolean | automatically dispose baseLayers. If it is true then method dispose is called for each baseLayer, false by default |
this
▸ clearCache(): TimeSeriesWidget
Clear cache
this
▸ clearChildren(disposeChildren?): TimeSeriesWidget
Remove all child nodes from this composite group
| Name | Type | Description |
|---|---|---|
Optional disposeChildren | boolean | automatically dispose children. If it is true then method dispose is called for each child. |
this
▸ clearOverlays(disposeOverlays?): TimeSeriesWidget
Remove all child overlays from group
| Name | Type | Description |
|---|---|---|
Optional disposeOverlays | boolean | automatically dispose overlays. If it is true then method dispose is called for each overlay, false by default |
this
All subclasses should override copyConstructor or provide custom implementation for this method
clone
▸ connectReferenceLine(refLineId, curveId): TimeSeriesWidget
Connect a reference line with a curve/time series object using curve/time series object id
| Name | Type | Description |
|---|---|---|
refLineId | string | The reference line id to connect |
curveId | string | curve/time series object id to connect to |
this
▸ connectStyle(style, type, callback): TimeSeriesWidget
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
▸ connectTool(tool): TimeSeriesWidget
Connect a new tool with a toolname to the widget
| Name | Type | Description |
|---|---|---|
tool | AbstractTool | AbstractTool[] | tool associated with the widget |
this
▸ Protected copyConstructor(src, deepCopy?): TimeSeriesWidget
Copy constructor function.
Function used as part of the cloning mechanism.
Implementations should copy the given instance state to this instance.
this
▸ createGroup(id, curveIDs?, min?, max?, options?): string
Add a time series group, which shares axis and limits only
| Name | Type | Description |
|---|---|---|
id | string | GroupOptions | group id |
Optional curveIDs | string[] | curve ids |
Optional min | number | min |
Optional max | number | max |
Optional options | AxisOptions | See TimeSeriesObject axis options |
string
id
▸ Protected createTimeSeriesObject(curveData, silent, axisOnly?): TimeSeriesObject
Internal method of creating TS object
| Name | Type | Description |
|---|---|---|
curveData | CurveOptions | object containing curve definitions |
silent | boolean | flag for adding curves silently |
Optional axisOnly | boolean | if only axis need to create |
timeseriesobject created
▸ disconnectReferenceLine(refLineId): TimeSeriesWidget
Disconnect a reference line with a curve/time series object the line connecting to
| Name | Type | Description |
|---|---|---|
refLineId | string | The reference line id to disconnect |
this
▸ disconnectStyle(style, type, callback): TimeSeriesWidget
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
▸ disconnectTool(tool): TimeSeriesWidget
Disconnect the tool from the widget
| Name | Type | Description |
|---|---|---|
tool | AbstractTool | AbstractTool[] | tool to disconnect |
this
▸ dispose(): void
Dispose node. Clear all listeners and disconnect style to avoid memory leaks
void
▸ Protected drawBorder(localContext, bounds?): TimeSeriesWidget
Draws a rectangle at the bounding box (in parent coordinates)
| Name | Type | Description |
|---|---|---|
localContext | RenderingContext | The local rendering context |
Optional bounds | Rect | group bounds |
this
▸ editAnnotation(id, options): string
| Name | Type | Description |
|---|---|---|
id | string | annotation id |
options | EditAnnotation | annotation options |
string
▸ editAnnotationLine(id, options): string
Edit annotation line
| Name | Type | Description |
|---|---|---|
id | string | annotation id |
options | Pick<EditAnnotation, "opacity" | "transform" | "text" | "fillstyle" | "linestyle" | "alignment" | "animationstyle" | "textstyle" | keyof Options | "localtransform" | "clipstyle" | "responsivestyle" | "cssstyle" | "csscursor" | "margins" | "renderingfilter" | "scalescrollstrategy" | "opacityblendmode" | "angle" | "point" | "textvisible" | "linevisible"> | JSON for annotation options |
string
id
▸ enableClipping(doClip): TimeSeriesWidget
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 |
this
▸ enableEventPropagation(enable): TimeSeriesWidget
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
BaseWidget.enableEventPropagation
▸ enablePickingChildren(enable): TimeSeriesWidget
Enables or disables picking children
| Name | Type | Description |
|---|---|---|
enable | boolean | enable picking children |
this
BaseWidget.enablePickingChildren
▸ enumerateNodes(callback, target?): void
Executes a provided function once for each child node
| Name | Type | Description |
|---|---|---|
callback | Callback<Node> | provided function |
Optional target | QueryBuilder<any> | target to pass to callback as a second parameter |
void
▸ execute(delegate): TimeSeriesWidget
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: TimeSeriesWidget) => void | Function to execute |
The result if any or this
▸ execute<T>(delegate): T
| Name |
|---|
T |
| Name | Type |
|---|---|
delegate | (this: TimeSeriesWidget) => T |
T
▸ exportToPDF(options?): Promise<IWritable>
Exports the widget content as a PDF file
| Name | Type | Description |
|---|---|---|
Optional options | ExportToPDFOptions | PDF options |
Promise<IWritable>
promise with output stream
▸ Protected filter(context): boolean
Filter node
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
flag filter flag ("true" to render node; "false" otherwise)
▸ fitToBounds(): TimeSeriesWidget
Fits bounds to model limits
this
▸ getAnimationStyle(): AnimationStyle
Return animation style
animationStyle current animation style
▸ getAnnotationLineProperties(id): AnnotationLineOptionsOut
Gets properties of the annotation line
| Name | Type | Description |
|---|---|---|
id | string | id of annotation line to get properties |
JSON that contains all properties of the annotation line
▸ getAnnotationProperties(id): AnnotationLineOptionsOut | AnnotationOptionsOut
Gets properties of the annotation
| Name | Type | Description |
|---|---|---|
id | string | id of annotation line to get properties |
AnnotationLineOptionsOut | AnnotationOptionsOut
JSON that contains all properties of the annotation line
▸ getAutoModelLimitsMode(): boolean
Get Model Limits Logics to use when no Model Limits have been set set to true: will use parents width and height, starting at 0 set to false: will use parents bounds
boolean
mode
BaseWidget.getAutoModelLimitsMode
▸ getAutoModelLimitsStrategy(): ModelLimitsStrategy
Get Model Limits Logics Strategy
strategy
BaseWidget.getAutoModelLimitsStrategy
▸ getBarMode(): Required<BarMode>
Get bar mode
Required<BarMode>
Options for bar mode
▸ getBaseLayer(index): Node
Return baseLayer at specified index
| Name | Type | Description |
|---|---|---|
index | number | index at which to get the baseLayer for |
track
▸ getBaseLayers<S>(predicate, modify?): Iterator<Node>
Return iterator by baseLayers nodes
| Name | Type |
|---|---|
S | extends Node<S> |
| Name | Type | Description |
|---|---|---|
predicate | (value: Node) => value is S | a filter function |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
▸ getBaseLayers(filter?, modify?): Iterator<Node>
Returns an iterator for child baseLayers. The iterator does not support adding or deleting items from overlays by default. If it is necessary to modify a collection of overlays, pass true as the last parameter.
Example
// Gets a writable iterator
const it = node.getOverlays(null, true);| Name | Type | Description |
|---|---|---|
Optional filter | (node: Node) => boolean | A filter function. Returns all overlays if null. |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
An iterator for child overlays.
▸ getBaseLayersCount(): number
Returns amount of baseLayers
number
▸ getBounds(): Rect
Get the bounds in the parents model space. If bounds are not set, then parent model limits are used.
current bounds
▸ getCache(): Cache
Return cache strategy to be used to cache children nodes
cache
▸ getChild(i): Node
Return node by index
| Name | Type | Description |
|---|---|---|
i | number | index of the node |
▸ getChildren<S>(predicate, modify?): Iterator<S>
Return iterator by child nodes
| Name | Type |
|---|---|
S | extends Node<S> |
| Name | Type | Description |
|---|---|---|
predicate | (value: Node) => value is S | a filter function |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
Iterator<S>
▸ getChildren(filter?, modify?): Iterator<Node>
Returns an iterator for child nodes. The iterator does not support adding or deleting items from children by default. If it is necessary to modify a collection of children, pass true as the last parameter.
Example
// Gets a writable iterator
const it = node.getChildren(null, true);| Name | Type | Description |
|---|---|---|
Optional filter | (node: Node) => boolean | A filter function. Returns all nodes if null. |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
An iterator for child nodes.
▸ getChildrenCount(): number
Return number of child nodes
number
▸ getClassName(): string
string
▸ getClipStyle(): ClipStyle
Gets the current clipping style
clipping style
▸ getContentOrientation(): Orientation
Return content orientation
content orientation
BaseWidget.getContentOrientation
▸ getContentsArea(transformation?): Rect
Return area without paddings. Model limits are mapped to content area, where children are layout.
| Name | Type | Description |
|---|---|---|
Optional transformation | Transformation | scene transformation |
▸ getContentsTransform(): Transformation
getContentsTransform() retrieves the world transformation of the node.
transformation from model coordinates to bounds of the group
BaseWidget.getContentsTransform
▸ 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
▸ getCurveFillStyle(curveId, filldirection): FillStyle
Get the fill style associated with a curve in a specific direction
| Name | Type | Description |
|---|---|---|
curveId | string | unique curve id |
filldirection | FillDirection | direction on the fill |
fillstyle
▸ getCurveFills(curveId): Partial<Record<FillDirection, FillData>>
Gets both top and bottom fillstyles associated with curve
| Name | Type | Description |
|---|---|---|
curveId | string | unique curve id |
Partial<Record<FillDirection, FillData>>
object containing top and bottom fillstyles of curve
▸ getCurveProperties(id): CurveOptionsOut
Gets properties of a curve
| Name | Type | Description |
|---|---|---|
id | string | id of the curve to get properties |
properties object contains properties of the curve having that id
▸ getCurves(): string[]
Gets all curves id
string[]
▸ getData(data?): object
get options
| Name | Type | Description |
|---|---|---|
Optional data | unknown | how to extract data, null by default |
object
▸ getDataById(id): AbstractDataTable
retrieve data element with specified id
| Name | Type | Description |
|---|---|---|
id | string | specified id of data element |
▸ getDesiredHeight(): string | number
Returns desired height of the group as a layoutable object This method is a helper method to get access to getLayoutStyle()
string | number
desired height ("undefined" by default)
▸ getDesiredWidth(): string | number
Returns desired width of the group as a layoutable object. This method is a helper method to get access to getLayoutStyle()
string | number
desired width ("undefined" by default)
▸ getDeviceLimits(): Rect
Return device limits
▸ getFillStyle(): FillStyle
Return fill style
fillStyle current fill style
▸ getGroupById(groupid): TimeSeriesObjectGroup
Get TimeSeriesObjectGroup by ID
| Name | Type | Description |
|---|---|---|
groupid | string | group id |
▸ getHorizontalGridCurveReference(): string
Return curve associates with the horizontal grid.
string
curveId unique curve id
▸ getId(): string | number
Returns the associated identifier of the node
string | number
The node's id
▸ getInfiniteMode(): boolean
Return infinity mode flag
boolean
flag
▸ Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>
Gets invalidate method
AttributeCallback<EventDispatcher>
method to invalidate this object
BaseWidget.getInvalidateMethod
▸ getLayout(): Layout
Returns layout associated with the group
layout
▸ getLayoutStyle(): LayoutStyle<string | number>
return desired layout style
LayoutStyle<string | number>
▸ getLineStyle(): LineStyle
Return border style
▸ getLocalTransform(): Transformation
Retrieves the transformation of bounds to parent
transform the local transform.
▸ getLocale(): Locale
Returns Current Locale
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
▸ getModelLimits(): Rect
Gets model limits, the limits of this groups inside space
the current model limits
▸ getModelOffsets(): ModelOffsets
Return model offsets
model offsets
▸ getName(): string
Returns the node name
string
The node name
▸ getNowButtonWidget(): ButtonWidget
Returns Button widget contains 'Now' button
▸ getOpacity(): number
Returns current node opacity
number
opacity
▸ getOpacityBlendMode(): BlendMode
Returns current node opacity
opacity blend mode
BaseWidget.getOpacityBlendMode
▸ getOptions(): OptionsBase
Gets options from this widget
options
▸ getOverlay(index): Node
Return overlay at specified index
| Name | Type | Description |
|---|---|---|
index | number | index at which to get the overlay for |
track
▸ getOverlayAt(index): Node
Return overlay at specified index
Deprecated
since 4.2 use getOverlay instead
| Name | Type | Description |
|---|---|---|
index | number | index at which to get the overlay for |
track
▸ getOverlayLayer(): Layer<Node>
Returns manipulator overlay to draw shapes that should move with the model
▸ getOverlays<S>(predicate, modify?): Iterator<Node>
Return iterator by overlays nodes
| Name | Type |
|---|---|
S | extends Node<S> |
| Name | Type | Description |
|---|---|---|
predicate | (value: Node) => value is S | a filter function |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
▸ getOverlays(filter?, modify?): Iterator<Node>
Returns an iterator for child overlays. The iterator does not support adding or deleting items from overlays by default. If it is necessary to modify a collection of overlays, pass true as the last parameter.
Example
// Gets a writable iterator
const it = node.getOverlays(null, true);| Name | Type | Description |
|---|---|---|
Optional filter | (node: Node) => boolean | A filter function. Returns all overlays if null. |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
An iterator for child overlays.
▸ getOverlaysCount(): number
Returns amount of overlays
number
▸ getPaddingStyle(): SpaceStyle<string | number>
Return padding style
SpaceStyle<string | number>
padding
▸ getParent(): Node
Return parent node
parent node
▸ getPercentMode(): Required<PercentMode>
Get percent mode settings
Required<PercentMode>
Percent TimesSeriesWidget settings
▸ getPreferredSize(): Rect
Return preferred size to layout children
▸ getProperties(): OptionsOut
Gets properties from this widget (same as getOptions)
properties options
▸ 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[]
▸ getRange(): Range
Gets the model range
▸ getReferenceLineIds(timeSeriesObjectId?): string[]
Get reference line ids using curve/time series object id. If none provided, return all reference line ids connected to the widget
| Name | Type | Description |
|---|---|---|
Optional timeSeriesObjectId | string | curve/time series object id |
string[]
Array of reference line ids
▸ getReferenceLineOptions(refLineId): ReferenceLineOptionsOuts
Get reference line options using id
| Name | Type | Description |
|---|---|---|
refLineId | string | Reference line id |
Reference line options
▸ 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
BaseWidget.getScaleScrollStrategy
▸ getScalesButtonWidget(): ButtonWidget
Returns Button widget contains 'Scales' buttons
▸ getSceneTransform(): Transformation
Returns transformation from node to root scene
a transformation from node to root scene
▸ getStackMode(): Required<StackMode>
Get stack mode settings
Required<StackMode>
Stack TimesSeriesWidget settings
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getTimeSeriesObjectById(id): TimeSeriesObject
Get TimeSeriesObject by id
Example
widget.getTimeSeriesObjectById(id).setAxisOptions({'visible': false});| Name | Type | Description |
|---|---|---|
id | string | number | timeseries object id |
▸ getTool(): CompositeTool
Returns root tool associated to this widget
▸ getToolByName<T>(toolName): Tools[T]
Returns the tool matching the given name.
This function also accepts tool 'path' instead of absolute name.
For example:
getToolByName("compositeTool.panningTools.trackPanning.TrackPanning")
Would return the same tool as
getToolByName("TrackPanning")
As long as there is only one tool named "TrackPanning" in this composite
See listToolsNames()
| Name | Type |
|---|---|
T | extends string |
| Name | Type | Description |
|---|---|---|
toolName | T | The tool name or path |
Tools[T]
▸ getToolByType(toolType): AbstractTool
Returns the tool matching the given type. or null if nothing is matching the tool type
For example:
getToolByType(geotoolkit.controls.tools.Selection)
Would return the same tool as
getToolByName("pick")
| Name | Type | Description |
|---|---|---|
toolType | ClassType<any> | toolType of the tool |
▸ getVisible(): boolean
Return visibility of the node
boolean
true if node is visible
▸ getVisibleDeviceLimits(ignoreModelLimits?): Rect
Return visible device limits
| Name | Type | Description |
|---|---|---|
Optional ignoreModelLimits | boolean | flag defines whether to ignore ModelLimits or not |
BaseWidget.getVisibleDeviceLimits
▸ getVisibleModelLimits(ignoreModelLimits?): Rect
Return visible model limits
| Name | Type | Description |
|---|---|---|
Optional ignoreModelLimits | boolean | flag defines whether to ignore ModelLimits or not |
BaseWidget.getVisibleModelLimits
▸ getVisibleRange(): Range
Gets the visible model range
range
▸ getVisualBackLayer(): Group<Node>
Returns visual layer
▸ getVisualFrontLayer(): Group<Node>
Returns visual layer
▸ getWorldTransform(): Transformation
Retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.
▸ 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
▸ highlightBars(highlightBars): TimeSeriesWidget
Highlight bars
Example
const highlightBars = [{
// highlight bar at index 2 of series 0
'datapointindex': 2,
'lineindex': 0
}, {
// highlight bar at index 4 of series 0
'datapointindex': 4,
'lineindex': 0
}, {
// highlight bar at index 3 of series 1
'datapointindex': 3,
'lineindex': 1
}];
this.highlightBars(highlightBars);| Name | Type | Description |
|---|---|---|
highlightBars | BarHighlighting[] | Array of bars to highlight |
this
▸ hitTest(devicePoint): CurveData[]
Perform hit test on Time Series curve and get curve data
| Name | Type | Description |
|---|---|---|
devicePoint | Point | Mouse coordinate in deivce space |
Array of curveData Curve data
▸ indexOfBaseLayer(baseLayer): number
Return index of overlay ( index of the specified child or -1 if baseLayer is not found)
| Name | Type | Description |
|---|---|---|
baseLayer | Node | baseLayer to check index |
number
▸ indexOfChild(node): number
Return index of child ( index of the specified child or -1 if node is not found)
| Name | Type | Description |
|---|---|---|
node | Node | node to check index |
number
▸ indexOfOverlay(overlay): number
Return index of overlay ( index of the specified child or -1 if overlay is not found)
| Name | Type | Description |
|---|---|---|
overlay | Node | overlay to check index |
number
▸ Protected initializeTools(options?): TimeSeriesWidget
function call in the constructor to initialize tools in the widget
| Name | Type | Description |
|---|---|---|
Optional options | AnyRecord | tools options |
this
▸ insertBaseLayer(index, baseLayer): TimeSeriesWidget
Insert child baseLayer at specified index
| Name | Type | Description |
|---|---|---|
index | number | specified index |
baseLayer | Node | a baseLayer to add |
this
▸ insertChild(index, node): TimeSeriesWidget
Insert child node at specified index
| Name | Type | Description |
|---|---|---|
index | number | specified index |
node | Node | a child node to add |
this
▸ insertCurve(name, uri?, data?, properties?, position?, id?): string
Inserts a curve to the widget at a desired position.
| Name | Type | Description |
|---|---|---|
name | string | CurveOptions | curve name or object containing all parameters |
Optional uri | string | dataset uri |
Optional data | DataTableView | DataTableView object for this curve |
Optional properties | CurveProperties | object |
Optional position | number | desired position of curve in TimeSeriesWidget.getCurves() |
Optional id | string | desired id of curve, defaults to uri if unspecified |
string
id unique id for the curve added
▸ insertCurves(curves): number | string[]
Inserts an array of curves
| Name | Type | Description |
|---|---|---|
curves | CurveOptions[] | Array of objects containing curve definitions |
number | string[]
array of curve ids added or -1 if no curves added
▸ insertOverlay(index, overlay): TimeSeriesWidget
Insert child overlay at specified index
| Name | Type | Description |
|---|---|---|
index | number | specified index |
overlay | Node | a overlay to add |
this
▸ invalidate(bounds?, force?): TimeSeriesWidget
Invalidate node
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | optional rectangular area to be invalidated, or force flag if rectangle is empty |
Optional force | boolean | optional boolean parameter that can force invalidation |
this
▸ invalidateLayout(propagate?): TimeSeriesWidget
Notify that layout is invalidated. Send event Events.LayoutInvalidated
| Name | Type | Description |
|---|---|---|
Optional propagate | boolean | propagate invalidate layout to parent |
this
▸ invalidateParent(bounds?, force?): TimeSeriesWidget
Invalidate parent area
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | area to invalidate |
Optional force | boolean | force |
this
▸ isClippingEnabled(): boolean
Returns if clipping is enabled or not for this node.
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
BaseWidget.isEventPropagationEnabled
▸ isHorizontalFlip(): boolean
Return true if the representation is flipped horizontally
boolean
flip
▸ isLayoutInvalidated(): boolean
Return true if layout is invalid
boolean
BaseWidget.isLayoutInvalidated
▸ isNotificationEnabled(): boolean
return state of notification
boolean
current notification state
BaseWidget.isNotificationEnabled
▸ isPickingChildrenEnabled(): boolean
Returns if picking children is enabled or not for this node.
boolean
pickingChildren
BaseWidget.isPickingChildrenEnabled
▸ 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
▸ isVerticalFlip(): boolean
Return true if the representation is flipped vertically
boolean
flip
▸ listToolsNames(): string[]
List all the tools contained in this composite. Prepend their parent tools parent using a '.'.
string[]
▸ loadTemplate(template, registry?): void
Load template loads the saved visual properties of the current template. It is only a visual representation of the current widget. It does not contain any data
| Name | Type | Description |
|---|---|---|
template | string | template to be applied to current widget |
Optional registry | Registry | registry |
void
▸ moveTo(area, vAlign?, hAlign?): TimeSeriesWidget
MoveTo position of node to specified area
| Name | Type | Description |
|---|---|---|
area | Rect | specified area |
Optional vAlign | string | vertical alignment. It can be "top", "bottom", "center". |
Optional hAlign | string | horizontal alignment It can be "left", "right", "center". |
this
▸ notify<E>(type, source, args?): TimeSeriesWidget
Notify listeners of the Node
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event |
source | TimeSeriesWidget | source who called the event |
Optional args | EventMap[E] | event arguments |
this
▸ Protected notifyRoot(event, source, args?): Node
Notify an even to root node
| Name | Type | Description |
|---|---|---|
event | string | type of event |
source | Node | source who called the event |
Optional args | any | event arguments |
this
▸ off<E>(type?, callback?): TimeSeriesWidget
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: TimeSeriesWidget, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): TimeSeriesWidget
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: TimeSeriesWidget, args: EventMap[E]) => void | to be called |
this
▸ Protected onBoundsChanged(bounds): TimeSeriesWidget
Occurs when bounds has been changed
| Name | Type | Description |
|---|---|---|
bounds | Rect | bound of the node in the parent coordinates |
this
▸ Protected onChildAdded(child): void
This method is called it child or children are added
void
▸ Protected onChildRemoved(child): void
This method is called it child or children are removed
| Name | Type | Description |
|---|---|---|
child | Node | removed child |
void
▸ Protected onParentChanged(node): TimeSeriesWidget
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
BaseWidget.onVisibilityChanged
▸ Protected postRendering(context, callback?): void
To be called after rendering, used for PDF output
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
Optional callback | () => void | callback to be called after rendering |
void
▸ Protected preRendering(context, callback?): void
Occurs before child rendering
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
Optional callback | () => void | callback to be called after rendering of geometry |
void
▸ rebuild(force?, changes?): TimeSeriesWidget
Rebuild node. This method resets state, cache, and invalidate node.
| Name | Type | Description |
|---|---|---|
Optional force | boolean | optional boolean parameter that can force invalidation |
Optional changes | StateChanges | optional parameter to specify a reason of changes |
this
▸ rebuildLayers(): TimeSeriesWidget
Rebuilds all layers
this
▸ registerAnimationStyle(root): void
Register animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
BaseWidget.registerAnimationStyle
▸ removeAnnotation(id): TimeSeriesWidget
remove annotation with the specified id.
| Name | Type | Description |
|---|---|---|
id | string | of the annotation to remove |
this
▸ removeAnnotationLine(id): TimeSeriesWidget
Remove annotation line
| Name | Type | Description |
|---|---|---|
id | string | annotation id |
this
▸ removeAnnotationLineCollection(id): TimeSeriesWidget
Remove annotation line collection by ID.
| Name | Type | Description |
|---|---|---|
id | string | annotation line collection id |
this
▸ removeBaseLayer(baseLayer): TimeSeriesWidget
Remove child baseLayer
this
▸ removeChild(node, disposeChildren?): TimeSeriesWidget
Remove child node
| Name | Type | Description |
|---|---|---|
node | Node | Node[] | node or array of nodes to be removed |
Optional disposeChildren | boolean | automatically dispose children. If it is true then method dispose is called for each child. |
this
▸ removeCssClass(cssclass): TimeSeriesWidget
Removes css class from node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ removeCurve(id): TimeSeriesWidget
Removes a curve
| Name | Type | Description |
|---|---|---|
id | string | string[] | array of curve ids |
this
▸ removeCurveFill(curveId, filldirection): void
Removes a fillstyle associated with a curve in a specific direction
| Name | Type | Description |
|---|---|---|
curveId | string | curve id for which fillstyle is to be removed |
filldirection | FillDirection | direction of the fill |
void
▸ removeGroup(groupid): TimeSeriesWidget
Remove a timeseries group
| Name | Type | Description |
|---|---|---|
groupid | string | group id |
this
▸ removeInvalidateHandler(handler): TimeSeriesWidget
Remove invalidate handler
Deprecated
since 4.0, use Node.off instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
BaseWidget.removeInvalidateHandler
▸ removeOverlay(overlay): TimeSeriesWidget
Remove child overlay
this
▸ removeReferenceLine(id): TimeSeriesWidget
Remove a reference line using id
| Name | Type | Description |
|---|---|---|
id | string | The reference line id to remove |
this
▸ render(context): void
Render group
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render group |
void
▸ renderAsync(context, callback): void
Render node in asynchronous mode. This implementation doesn't support cache for now.
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
callback | () => void | callback function |
void
▸ Protected renderBackground(context, bounds): TimeSeriesWidget
Render background
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render background |
bounds | Rect | group bounds |
this
▸ Protected renderBaseLayers(context): TimeSeriesWidget
Render baseLayers on bottom of cache. This method does nothing, but can be implemented to render graphics on bottom of cache and between borders
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render baseLayers |
this
▸ Protected renderBaseLayersAsync(context, callback): void
Render baseLayers on bottom of cache in asynchronous mode. This method calls renderBaseLayers
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render overlays |
callback | () => void | callback function |
void
BaseWidget.renderBaseLayersAsync
▸ Protected renderChildren(context): void
Render children
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ Protected renderChildrenAsync(context, callback): void
Render children async
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
callback | () => void | callback function to be called then all children are rendered |
void
BaseWidget.renderChildrenAsync
▸ Protected renderContent(context): void
render to specified context. This method calls preRendering, renderChildren, postRendering
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ Protected renderContentAsync(context, callback): void
Render children in asynchronous mode
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
callback | () => void | callback function to be called then all children are rendered |
void
▸ Protected renderOverlays(context): TimeSeriesWidget
Render overlays on top of cache. This method does nothing, but can be implemented to render graphics on top of cache and between borders
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render overlays |
this
▸ Protected renderOverlaysAsync(context, callback): void
Render overlays on top of cache in asynchronous mode. This method calls renderOverlays
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render overlays |
callback | () => void | callback function |
void
BaseWidget.renderOverlaysAsync
▸ resumeUpdate(rebuild?, changes?): TimeSeriesWidget
Resume auto update
| Name | Type | Description |
|---|---|---|
Optional rebuild | boolean | force rebuild |
Optional changes | StateChanges | optional parameter to specify a reason of changes |
this
▸ rotate(theta, x, y): TimeSeriesWidget
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
▸ saveTemplate(registry?): string
Save template saves visual properties of the current template. It is only a visual representation of the current widget. It does not contain any data
| Name | Type | Description |
|---|---|---|
Optional registry | Registry | registry |
string
▸ scale(xx, yy): TimeSeriesWidget
Scale node
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
this
▸ scaleModel(scaleX): TimeSeriesWidget
Scale widget's contents
| Name | Type | Description |
|---|---|---|
scaleX | number | x scale factor |
this
▸ selectCurveById(id): void
Select Curve By ID. The widget will trigger the event TimeSeriesWidget.Events.onSelectionChanged, if the selection has changed.
| Name | Type | Description |
|---|---|---|
id | string | (null to deselect) |
void
▸ setAnimationStyle(animationStyle): TimeSeriesWidget
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
▸ setAutoModelLimitsMode(mode): TimeSeriesWidget
Set Model Limits Logics to use when no Model Limits have been set set to true: will use parents width and height, starting at 0 set to false: will use parents bounds. This is convenient method. It creates AutoModelLimitsStrategy
| Name | Type | Description |
|---|---|---|
mode | boolean | Model Limits Logics to be used |
this
BaseWidget.setAutoModelLimitsMode
▸ setAutoModelLimitsStrategy(strategy): TimeSeriesWidget
Set Model Limits Logics Strategy
| Name | Type | Description |
|---|---|---|
strategy | ModelLimitsStrategy | Model Limits logic strategy to use |
this
BaseWidget.setAutoModelLimitsStrategy
▸ setBarMode(barMode?): TimeSeriesWidget
Set bar mode
| Name | Type | Description |
|---|---|---|
Optional barMode | BarMode | Options for bar mode |
this
▸ setBounds(bounds): TimeSeriesWidget
Sets bounds of the node in the parent coordinates
| Name | Type | Description |
|---|---|---|
bounds | Type | bound of the node in the parent coordinates |
this
▸ setCache(cache, rebuild?): TimeSeriesWidget
Sets cache to be used to cache
| Name | Type | Description |
|---|---|---|
cache | Cache | cache to be used |
Optional rebuild | boolean | rebuild cache |
this
▸ setChild(index, node): TimeSeriesWidget
Replace child node by index
| Name | Type | Description |
|---|---|---|
index | number | index of the node |
node | Node | node |
this
▸ setClipStyle(style): TimeSeriesWidget
Sets a new clipping style
| Name | Type | Description |
|---|---|---|
style | GraphicsPath | ClipStyle | Options | a new clipping style |
this
▸ setContentOrientation(orientation): TimeSeriesWidget
Set content orientation
| Name | Type | Description |
|---|---|---|
orientation | Orientation | content orientation |
this
BaseWidget.setContentOrientation
▸ setCss(style, merge?): TimeSeriesWidget
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): TimeSeriesWidget
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): TimeSeriesWidget
Set CSS transformation
| Name | Type | Description |
|---|---|---|
transform | string | Transformation | transformation css transformation instruction or Transformation instance |
this
▸ setDesiredHeight(value, silent?): TimeSeriesWidget
Sets desired height of the group as a layoutable object
| Name | Type | Description |
|---|---|---|
value | string | number | desired height to set, use 'auto' for automatic desired height |
Optional silent | boolean | silent setting |
this
▸ setDesiredWidth(value, silent?): TimeSeriesWidget
Sets desired width of the group as a layoutable object
| Name | Type | Description |
|---|---|---|
value | string | number | desired width to set |
Optional silent | boolean | silent setting |
this
▸ setFillStyle(fillStyle, merge?): TimeSeriesWidget
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
▸ setHorizontalFlip(enable): TimeSeriesWidget
Set horizontal flip of the representation
| Name | Type | Description |
|---|---|---|
enable | boolean | enable flip |
this
▸ setHorizontalGridCurveReference(curveId): TimeSeriesWidget
Associates the horizontal grid with a curve. If null is passed in or curve is not found, it defaults to the first curve
| Name | Type | Description |
|---|---|---|
curveId | string | unique curve id |
this
▸ setId(id): TimeSeriesWidget
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setInfiniteMode(infinityMode): TimeSeriesWidget
Set infinity mode flag to draw composite without collision check
| Name | Type | Description |
|---|---|---|
infinityMode | boolean | infinity mode flag |
this
▸ setLayout(layout): TimeSeriesWidget
Associate layout with a group.
| Name | Type | Description |
|---|---|---|
layout | Record<string, any> | Layout | layout instance to be set or layout properties to apply |
this
▸ Protected setLayoutInvalidated(invalidated): void
Set invalidation status
| Name | Type | Description |
|---|---|---|
invalidated | boolean | invalidated layout |
void
BaseWidget.setLayoutInvalidated
▸ setLayoutStyle(layoutStyle, silent?, merge?): TimeSeriesWidget
specify desired layout style
| Name | Type | Description |
|---|---|---|
layoutStyle | LayoutStyle<string | number> | Options<string | number> | desired layout style |
Optional silent | boolean | silent setting |
Optional merge | boolean | true if you want to merge layoutStyle with existing attribute, false by default |
this
▸ setLineStyle(lineStyle, merge?): TimeSeriesWidget
Sets border color Returns this
| 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?): TimeSeriesWidget
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
▸ setLocale(locale): TimeSeriesWidget
Sets locale
| Name | Type | Description |
|---|---|---|
locale | Locale | locale |
▸ setMarginsStyle(margins, merge?): TimeSeriesWidget
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
▸ setModelLimits(limits): TimeSeriesWidget
Sets inner model limits
| Name | Type | Description |
|---|---|---|
limits | Type | inner limits |
this
▸ setModelOffsets(modelOffsets): TimeSeriesWidget
Sets model padding style
| Name | Type | Description |
|---|---|---|
modelOffsets | string | number | ModelOffsets | model offsets |
this
▸ setName(name): TimeSeriesWidget
Sets name of the node
| Name | Type | Description |
|---|---|---|
name | string | The node name |
this
▸ setNotification(notify, force?): TimeSeriesWidget
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?): TimeSeriesWidget
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?): TimeSeriesWidget
Sets options
Example
// To configure margins/white space in the canvas
widget.setOptions({
// [top, right, bottom, left]
'margin': [0, 0, 0, 0]
});Example
widget.setOptions({'selectionstrategy': (widget, newSelection, oldSelection) => { ... }});Example
// To format tooltip data
widget.setOptions({
'tooltips': {
'tooltipoptions': {
'formatdatahandler': (data) => (
{
'name': data['name'],
'symbol': data['symbol'],
'valuetext': data['valuetext'],
'unittext': data['id'] === 'Delta' ? ' ft' + ' degF' : data['unittext']
}}
}
}
}
});| Name | Type | Description |
|---|---|---|
Optional options | Options | object containing widget options |
this
▸ setPaddingStyle(paddingStyle, merge?): TimeSeriesWidget
Sets padding style
| Name | Type | Description |
|---|---|---|
paddingStyle | Type<string | number> | padding style |
Optional merge | boolean | true if you want to merge paddingStyle with existing attribute, false by default |
this
▸ setPercentMode(percent?): TimeSeriesWidget
Set time series percent mode
| Name | Type | Description |
|---|---|---|
Optional percent | PercentMode | Percent TimesSeriesWidget settings |
this
▸ setProperties(properties?): TimeSeriesWidget
Sets Properties
| Name | Type | Description |
|---|---|---|
Optional properties | Options | object containing widget options |
this
▸ setProperty(name, value): TimeSeriesWidget
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
▸ setRange(range): TimeSeriesWidget
Sets the model range
| Name | Type | Description |
|---|---|---|
range | Range | the model range |
this
▸ setReferenceLineOptions(refLineId, options): TimeSeriesWidget
Set reference line options using id
| Name | Type | Description |
|---|---|---|
refLineId | string | Reference line id to set options on |
options | ReferenceLineOptions | New reference line options |
this
▸ setRenderingFilter(filter): TimeSeriesWidget
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
▸ setResponsiveStyle(style): TimeSeriesWidget
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
▸ setScaleScrollStrategy(strategy?): TimeSeriesWidget
Sets scale scroll strategy
| Name | Type | Description |
|---|---|---|
Optional strategy | Delegate | scale scroll strategy |
this
BaseWidget.setScaleScrollStrategy
▸ setSelectable(selectable): TimeSeriesWidget
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): TimeSeriesWidget
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setStackMode(stack?): TimeSeriesWidget
Set time series stack area mode
| Name | Type | Description |
|---|---|---|
Optional stack | StackMode | Stack TimesSeriesWidget settings |
this
▸ setTag(tag): TimeSeriesWidget
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
▸ Protected setTool(tool): TimeSeriesWidget
Set root tool associated to this widget
| Name | Type | Description |
|---|---|---|
tool | CompositeTool | tool to be set |
▸ setVerticalFlip(flip): TimeSeriesWidget
Set vertical flip of the representation
| Name | Type | Description |
|---|---|---|
flip | boolean | flag to set the vertical flip of the representation |
this
▸ setVisible(value): TimeSeriesWidget
Sets visibility of the node. Send event Events.VisibilityChanged
| Name | Type | Description |
|---|---|---|
value | boolean | flag specifying visibility of the node |
this
▸ setVisibleModelLimits(visibleModelBounds, deviceBounds?): TimeSeriesWidget
Set visible model limits
| Name | Type | Description |
|---|---|---|
visibleModelBounds | Rect | visible model limits or bounds |
Optional deviceBounds | Rect | device bounds |
this
BaseWidget.setVisibleModelLimits
▸ setVisibleRange(range): TimeSeriesWidget
Sets the visible model range If the range is less than 1ms the range will be expanded and applied within the model's range If the model's limits are less than the minimum range, the range will be set to the model's limits
| Name | Type | Description |
|---|---|---|
range | Range | visible model range |
this
▸ setZIndex(value): TimeSeriesWidget
Sets z-index for node (set null for default)
| Name | Type | Description |
|---|---|---|
value | number | index determining node z-position |
this
▸ shear(shx, shy): TimeSeriesWidget
Shear this node's bounds
| Name | Type | Description |
|---|---|---|
shx | number | x-axis shear |
shy | number | y-axis shear |
this
▸ suspendUpdate(): TimeSeriesWidget
Suspend auto update
this
▸ toString(): string
Returns a string representation of this object (generally the classname)
string
A string representation
▸ translate(tx, ty): TimeSeriesWidget
Translate bounds
| Name | Type | Description |
|---|---|---|
tx | number | x translation |
ty | number | y translation |
this
▸ translateModel(dx): TimeSeriesWidget
Translates widget's contents
| Name | Type | Description |
|---|---|---|
dx | number | x translate |
this
▸ unregisterAnimationStyle(root): void
Unregister animation style.
| Name | Type | Description |
|---|---|---|
root | AnimatedNode | root node for node |
void
BaseWidget.unregisterAnimationStyle
▸ updateLayout(targets?): TimeSeriesWidget
Updates layout(s)
Fires
| Name | Type | Description |
|---|---|---|
Optional targets | ILayoutable[] | optional parameter about which element to layout |
this
▸ updateSceneTransformation(): TimeSeriesWidget
Update scene transformation
this
BaseWidget.updateSceneTransformation
▸ updateState(regions?, changes?): TimeSeriesWidget
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
▸ updateSuspended(): boolean
Return state of suspend state
boolean
state of update
▸ Protected updateTimeStamp(): TimeSeriesWidget
Update time stamp to indicate that Node or Children has been changed.
this
▸ zoomIn(): TimeSeriesWidget
Zoom in with default factor
See
TimeSeriesWidget.scaleModel to set desired factor
this
▸ zoomOut(): TimeSeriesWidget
Zoom out with default factor
See
TimeSeriesWidget.scaleModel to set desired factor
this
▸ Static enableSceneGraphNotification(enabled): void
Enable / disable all notifications
| Name | Type | Description |
|---|---|---|
enabled | boolean | sets if this object sends notifications |
void
BaseWidget.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 isSceneGraphNotificationEnabled(): boolean
Return status of the global notification for all nodes.
boolean