visualization-tools

Home > @visualization-tools/core

core package

Classes

Class Description
AEntityGroup A group of entities that implement TRequiredTraits.
AGlAttribute Wrapper for dirty checked GL attributes with VAO and shared mutable buffer support. ChangeIds must be generated program wide to avoid collisions IncrementingIdentifierFactory (rc-js-util) is a suitable implementation.
AGlBinder Data binder for webgl graphics components.
AGlInstancedBinder Instanced data binder for webgl graphics components.
AGlUniformArray Wrapper for webgl uniform.
AGlUniformValue wrapper for a single uniform value.
AInterleavedConnector Interleaved implementation of IIndexedDataConnector
AttributeState Sharable state of a webgl attribute.
BufferLayout  
CanvasChartFactory Creates canvas charts.
CanvasComponentRenderer Canvas renderer entity draw hooks.
CanvasComponentRendererProvider Canvas implementation of IComponentRendererProvider.
CanvasContextAdapter Canvas implementation of IContextAdapter.
CanvasDimensions Canvas element dimensions and useful transforms.
CanvasNoOpGraphicsComponent A graphics component for canvas renderer that doesn’t draw.
CanvasRenderer Canvas implementation of IRenderer.
CanvasRendererFactory Canvas IComponentRendererFactory.
CanvasRendererSharedState Canvas state shared between draw calls. Some methods use the state stack, refer to documentation on individual methods for usage notes.
CanvasTransforms Provides a set of common 2d transforms from pixel to clip space etc.
CategoryStore A store of categories of entities in an entity group (effectively sub group).
ChartComponent Root component. Orchestrates updates and events.
ChartConfig Construction config for IChartComponent.
ChartDataEntity An entity that represents a simple data entity. Use is not required, create a specific type as required.
ChartEntity Base chart entity.
ChartPointerEvent Wrapper of MouseEvent with position translated into chart coordinate systems.
ChartTransformFactory  
CompositeGraphicsComponent Refer to update strategy documentation for draw call behavior.
DefaultInteractionGroups A set of interaction groups that should meet most use cases.
EntityBufferStore  
EntityCategory Implementation of IEntityCategory, handles initialization of graphics components.
EntityComponentStore Place to store components for entity groups. It is taken as a membership requirement that the component be present, if this is not the case the TComponent type should include undefined in the union.
EntityUpdateGrouping A plain update grouping.
EntityUpdateTransformGrouping A grouping of a graphics component with its renderer and transform.
EventService A store of event categories that can be used to emit events.
FrameProvider Handles rollup of draw calls and incremental updating of interaction handlers.
Gl1ContextAdapter Webgl1 context adapter. Handles viewport and context loss.
Gl2ContextAdapter Webgl2 context adapter. Handles viewport and context loss.
GlBuffer Dirty checked wrapper of WebGLBuffer. Modify via IGlAttribute.
GlChartFactory Factory to make TGlChart.
GlComponentRenderer Webgl / webgl2 component renderer implementation.
GlComponentRendererFactory Webgl component renderer factory.
GlComponentRendererProvider Webgl1/2 implementation of IComponentRendererProvider.
GlContextAdapter Base webgl context adapter. Handles viewport and context loss.
GlFloatAttribute A Float32 IGlAttribute.
GlFloatBuffer Float32 GlBuffer.
GlFloatUniform wrapper for a single uniform float.
GlIVec2Uniform Wrapper for webgl int32 vector2 uniform.
GlIVec3Uniform Wrapper for webgl int32 vector3 uniform.
GlIVec4Uniform Wrapper for webgl int32 vector4 uniform.
GlMat2Uniform Wrapper for webgl float matrix2 uniform.
GlMat3Uniform Wrapper for webgl float matrix3 uniform.
GlMat4Uniform Wrapper for webgl float matrix4 uniform.
GlNoOpGraphicsComponent A graphics component for webgl/webgl2 renderer that doesn’t draw.
GlProgramSpecification Specification of a webgl program to build.
GlRenderer WebGl system hooks and config (clearing bits, TGlFeatureFlags etc). Most WebGl state is handled at the TGlComponentRenderer level.
GlRendererOptions WebGl Renderer construction options.
GlRendererSharedState Webgl state that is shred between entity renderers.
GlShader WebGl shader specification.
GlTexture2d Currently only supports canvas as texture.
GlTransformComponentFactory  
GlTransformFeedback  
GlTransformProvider  
GlVec2Uniform Wrapper for webgl float vector2 uniform.
GlVec3Uniform Wrapper for webgl float vector3 uniform.
GlVec4Uniform Wrapper for webgl float vector4 uniform.
GraphAttachPoint Wrapper of DOM element that contains the chart, houses hidden canvases as required.
GraphAttachPointProvider Takes a DOM node and inserts a IChartComponent into it.
GraphicsComponentStore Stores both graphics components and transform components.
GraphicsSubComponents Children components of a ICompositeGraphicsComponent.
HitAlwaysAllowedComponent A IHitAllowedComponent that always returns true.
HitTestableGroup Entities in this group must implement IHitTestableTrait and have an associated IHitAllowedComponent and IHitTestComponent which can be accessed through the group. Hit test composition is not currently supported.
HitTestResult An entity that user has interacted with.
IdleState The initial state of the default user interaction state machine.
InteractionGroup Entities in this group have the same requirements as IHitTestableGroup. Allows up to 32 IInteractionGroups per plot for click / hover handlers etc.
InterleavedConnector Interleaved implementation of IIndexedDataConnector
NoOpHitTestComponent A hit test component that will never hit.
NoTransformProvider  
OnCanvasMouseEvent Provides raw mouse events. Shouldn’t typically be used unless implementing custom interaction handler.
OnCanvasPointerEvent Provides raw pointer events. Shouldn’t typically be used unless implementing custom interaction handler.
OnCanvasResized Provides events for chart resizing, emitted on IChartComponent.resize() call.
OnDprChanged Event emitted on screen DPI changing, or when the user zooms the page (browser page scaling).
OnEntityAdded Emitted on entity added to plot.
OnEntityAddedToGroup Emitted on entity being added to a group, not emitted if entity is already in the group.
OnEntityModified Emit on a plot to indicate that an entity has been modified and that caches should be regenerated. Refer to the group’s documentation as to the conditions where this is required.
OnEntityRemoved Emitted on entity removed from plot, if the entity is not present this is not emitted.
OnEntityRemovedFromGroup Emitted on entity removed from group, if the entity is not present this is not emitted.
OnGraphicsComponentAdded Emitted on graphics component added to chart.
OnHoverResult  
OnPlotAttachChanged Emitted on plot attaching or detaching from chart.
OnPlotRequiresUpdate Used to indicate that a redraw is required, which is performed by IChartComponent.updateOnNextFrame(). Multiple calls will be rolled up into a single update.
OnRendererContextLost Emitted when the renderer context is lost due to e.g. resource contention. Emitted on both chart and plots.
Plot Basic drawing unit to which entities and behaviors can be attached.
PlotArea The space a plot takes up on a chart.
PlotCtorArg Default plot construction args.
PlotDimensions The space a plot takes up on a chart in various coordinate systems.
PlotInteractionConnector Provides a reasonably generic attach point for behaviors on events. A default state machine will be supplied which provides both mouse and touch events for: click, double click, pinch and mouse zooming, dragging and entity hover.
PlotInteractionProviders Providers required by the user interaction state machine.
PlotStateFactories State providers for user interaction state machine.
QuadEventTargetProvider Wrapper of ISharedEntityQuadTree, maps pointer events to entities.
QuadTreeEventTargetProvider Incrementally updatable entity quad tree target provider. The yield time can be configured by setting IQuadTreeTargetOptions.yieldTime.
RenderList Provides a grouping of entities and graphics components to update.
SharedEntityQuadTree Wrapper of ISharedQuadTree. Passing the hit test doesn’t guarantee that the pointer is within the AABB, an additional check should be made in the IHitTestComponent.
SharedInterleavedConnector Provides a structured view into a SharedArray. Will take a claim on the SharedArray and release it when the object is disposed of.
SharedQuadTree Emscripten quad tree.
SpriteLookup Store for sprite positions.
SpriteProvider Creates a hidden 2d canvas, useful for sprites etc.
TransformBufferProvider  
TransformComponentStore A store for transform components (feedback transforms in wgl).
UpdateTransformGroupingByEntity An update grouping corresponding to ICompositeGraphicsComponent.groupUpdatesByEntity with transforms.
UserEventHandlerCallbacks Hooks for user interaction events.

Enumerations

Enumeration Description
EEntityUpdateFlag Flags to indicate required state changes when entities change. Can be combined by bitwise OR.
EGraphicsComponentType May be used as filter mask.
EHoverState State changes of IHoverableTrait. Events are emitted to entities in the order listed in the enum.
EMouseEventType Supported mouse event types, most events are handled through EPointerEventType.
EPointerEventType Supported pointer events (both mouse and touch events).

Functions

Function Description
addEntityToCategory(category, entity, graphicsComponent, hooks)  
assertBinder(binder, id) debug utility for checking binder type in graphics / transform component.
emitToPlots(chart, event, args) Emits the event on all connected plots.
getChartInitialState(options, stateProviders) Provides user interaction state machine initial state.
linkGraphicsComponents(graphicsComponents) Shares compatible buffers between components, so updates to one affect all.
resetEntityBuffers(renderer)  
resetTransformComponents(renderer)  

Interfaces

Interface Description
IAttributeState Sharable state of a webgl attribute.
IBaseComponentRenderer Renderer invariant entity renderer. See extensions for specific implementations.
IBinder Base data binder, provides a key which indicates that it meets a specification for binding data in e.g. shaders. This is used to match up transform components with an appropriate binder.
IBuffer  
IBufferLayout  
ICacheable Uniquely identifiable by string identifier generated by getCacheId.
ICanvasChartOptions Options for CanvasChartFactory
ICanvasComponentRenderer Canvas renderer entity draw hooks.
ICanvasDimensions Canvas element dimensions and useful transforms.
ICanvasRenderer Canvas implementation of IRenderer.
ICanvasTransforms Provides a set of common 2d transforms from pixel to clip space etc.
ICategoryStore A store of categories of entities in an entity group (effectively sub group).
ICategoryUpdateHooks Update hooks of IEntityCategory.
IChangeDetectionConfig If your application is using a change detection shim like Zone.js, you can improve performance by providing a custom object. Refer to the library’s documentation on how to do this.
IChartComponent Root component. Orchestrates updates and events.
IChartConfig Construction config for IChartComponent.
IChartEntity Base chart entity.
IChartOptions Base chart construction options.
IChartPointerEvent Wrapper of MouseEvent with position translated into chart coordinate systems.
IChartState Base user interaction state.
IChartTransformFactory  
IChartUpdateOptions Options for how to update plots, like whether updating one plot requires updating all other plots.
IChartWideInteractionOptions These are set for the whole chart as opposed to per plot.
IClickableTrait An entity that may handle click events.
IComponentRendererFactory Generic factory for creating IBaseComponentRenderers for graphics component specifications.
IComponentRendererProvider Wrapper of IComponentRendererFactory to get entity renderers.
ICompositeGraphicsComponent Refer to update strategy documentation for draw call behavior.
ICompositeGraphicsComponentFactory  
IContextAdapter Wrapper of renderer context.
IDataTrait Slot for entity data.
IDefaultInteractionGroups A set of interaction groups that should meet most use cases.
IDefaultTargets The default target providers for user interactions.
IDraggableTrait An entity that may handle hover events. Unlike other interaction traits, if a redraw is required this must be done through the plot wide interaction handler.
IEntityBufferStore  
IEntityCategory An entity sub-grouping. Provides hooks for entity membership changes, useful for normalization of e.g. display parameters. Entity groups may optionally define categories.
IEntityCategoryRead The non-mutative methods of an IEntityCategory.
IEntityCategoryWrite The mutative methods of an IEntityCategory.
IEntityChangeHooks Group entity membership hooks.
IEntityComponentStore Place to store components for entity groups. It is taken as a membership requirement that the component be present, if this is not the case the TComponent type should include undefined in the union.
IEntityGroup A group of entities that implement TRequiredTraits.
IEntityUpdateArgProvider  
IEntityUpdateGrouping A grouping graphics components (and optionally transforms) ready to draw.
IErrorLocalization  
IEventCategoryCtor Utility type for extracting types out of event categories.
IEventService A store of event categories that can be used to emit events.
IFrameProvider Handles rollup of draw calls and incremental updating of interaction handlers.
IGlAttribute Wrapper for dirty checked GL attributes with VAO and shared mutable buffer support. ChangeIds must be generated program wide to avoid collisions IncrementingIdentifierFactory (rc-js-util) is a suitable implementation.
IGlBinder Data binder for webgl graphics components.
IGlBuffer Dirty checked wrapper of WebGLBuffer. Modify via IGlAttribute.
IGlChartOptions Options for GlChartFactory.
IGlComponentInstancedRenderer ANGLE_instanced_arrays or webgl2 equivalent.
IGlComponentRenderer Base gl entity renderer.
IGlComponentVAORenderer OES_vertex_array_object or webgl2 equivalent.
IGlExtensions  
IGlInstancedBinder Instanced data binder for webgl graphics components.
IGlProgramSpec Specification of a webgl program to build.
IGlRenderer WebGl system hooks and config (clearing bits, TGlFeatureFlags etc). Most WebGl state is handled at the TGlComponentRenderer level.
IGlRendererCreationOptions WebGL on create options.
IGlRendererOnFrameOptions WebGl parameters to set before each frame.
IGlRendererOptions WebGl Renderer construction options.
IGlRendererSharedState Webgl state that is shred between entity renderers.
IGlShader WebGl shader specification.
IGlTexture2d Currently only supports canvas as texture.
IGlTransformBinder Data binder for webgl transform feedback components.
IGlTransformComponent  
IGlTransformFeedback  
IGlUniform  
IGraphAttachPoint Wrapper of DOM element that contains the chart, houses hidden canvases as required.
IGraphAttachPointProvider Takes a DOM node and inserts a IChartComponent into it.
IGraphicsComponent Base graphics component.
IGraphicsComponentSettingsTrait A slot for draw options specific to the entity.
IGraphicsComponentSpecification The minimum specification of a graphics component such that IComponentRendererFactory can generate entity renderers.
IGraphicsComponentStore Stores both graphics components and transform components.
IGraphicsSubComponents Children components of a ICompositeGraphicsComponent.
IHitAllowedComponent Called before hit testing an entity, return false to prevent the entity from being included in the result.
IHitTestableGroup Entities in this group must implement IHitTestableTrait and have an associated IHitAllowedComponent and IHitTestComponent which can be accessed through the group. Hit test composition is not currently supported.
IHitTestableGroupOptions  
IHitTestableTrait An entity that is hit testable.
IHitTestComponent A component to test if an entity is under the cursor / finger.
IHoverableTrait An entity that may handle hover events.
IIndexedDataConnector Generic descriptor of indexable data, good for parallel or interleaved buffers. Makes the assumption that each index has one or more associated values, accessed via offsets.
IInteractionGroup Entities in this group have the same requirements as IHitTestableGroup. Allows up to 32 IInteractionGroups per plot for click / hover handlers etc.
IInteractionOptions  
IInteractionSharedState  
IInteractionStateChangeCallbacks  
IInterleavedBindingDescriptor  
IInterleavedConfig Construction options of AInterleavedConnector.
IInterleavedConnector Interleaved implementation of IIndexedDataConnector
ILinkableBinder An automatically sharable binder.
ILinkableBinderProvider Components can implement this to indicate that they can automatically share buffers.
ILinkableCompositeGraphicsComponentFactory  
ILinkableGraphicsComponent WebGl components may optionally implement this instead of IGraphicsComponent to indicate that they have linkable attributes. Use in conjunction with ILinkableBinderProvider is recommended if transforms are used.
IOnHoverResult  
IPlot Basic drawing unit to which entities and behaviors can be attached.
IPlotArea The space a plot takes up on a chart.
IPlotConstructionOptions  
IPlotCtorArg Default plot construction args.
IPlotDimensions The space a plot takes up on a chart in various coordinate systems.
IPlotInteractionConnector  
IPlotInteractionProviders Providers required by the user interaction state machine.
IPlotRange Base plot range.
IPlotStateFactories State providers for user interaction state machine.
IPlotUpdateStrategy  
IPointerEventHitTargetProvider Maps pointer events to entities.
IPointerEventTimestamp  
IQuadTreeTargetOptions  
IReadonlyEntityGroup Provides a way to check if an entity is in this group.
IReadonlyPlot Non-mutative methods of a plot.
IRenderer Base wrapper for the underlying drawing technology, use to get specific drawing programs. Implementations provide hooks (IRendererCallbacks) on plot draw.
IRendererCallbacks  
IRendererSharedState Render state that persists between draw calls.
ISharedEntityQuadTree Wrapper of ISharedQuadTree. Passing the hit test doesn’t guarantee that the pointer is within the AABB, an additional check should be made in the IHitTestComponent.
ISharedInterleavedConnector Provides a structured view into a SharedArray. Will take a claim on the SharedArray and release it when the object is disposed of.
ISharedInterleavedConnectorBindings  
ISharedQuadTree Emscripten quad tree.
ISharedQuadTreeBindings  
ITransformBinder  
ITransformBinderProvider  
ITransformComponent  
ITransformComponentFactory Transforms components can define a factory / factories so that ChartTransformFactory can automatically hook these up at run time. Usage not mandatory, transforms can be registered directly with the renderer.
ITransformComponentStore A store for transform components (feedback transforms in wgl).
ITransformProvider  
ITransformProviderBufferProvider  
IUpdateArg Base update arg for components, dimension agnostic.
IUpdateGroupOptions  
IUserTransform Base user transform, defines a symbol which transform components can use to indicate they are appropriate for that transform
IVisualizationToolBindings Emscripten bindings exposed by core.
IWritableEntityGroup Provides hooks for changes to membership of this group.
IWritablePlot Mutative methods of a plot.

Variables

Variable Description
dummyGlProgramSpecification  
emptyShader  
fullClipSpaceRange2d  
fullClipSpaceSize2d  
generate2LinedNormalShader Generates normal to a line. If the points a & b are the same it instead returns fallback.
mat2MultiplyValueShader Pad float up to vec2 up with additional 1 and multiply.
mat3MultiplyVec2Shader Pad vec2 up with additional 1 and multiply.
mixComponentsShader Component-wise mix on vec2.
reverseYFullClipSpaceRange2d  
unpackColorShader Takes a float32 which is used to store a packed int24 storing RGB.

Type Aliases

Type Alias Description
IPlotEventTargetProvider  
TAttachPointListeners  
TCanvasChart Canvas chart.
TChangeTrackedTrait Used for dirty checking of entity state.
TChartEventHandlerProvider  
TCompositeGraphicsComponent  
TEntitiesByHitTester  
TEntityAddedArgs Args for TOnEntityAdded.
TEntityAddedToGroupArgs Args for TOnEntityAddedToGroup.
TEntityGroupRequiredTraits  
TEntityModifiedArgs Args for TOnEntityModified.
TEntityRemovedArgs Args for TOnEntityRemoved.
TEntityRemovedFromGroupArgs Args for TOnEntityRemovedFromGroup.
TEntityTrait Base entity with additional trait.
TExtractGcContext  
TExtractGcSpec  
TFilteredIterateCallback  
TGetChartEventTargetProviders  
TGl1ComponentRenderer Webgl1 renderer, without extensions by default.
TGl2ComponentRenderer Webgl2 renderer, without extensions by default.
TGlBasicComponentRenderer Either wgl1 or wgl2, without extensions by default.
TGlBindings All supported attribute and uniform types.
TGlBufferBitKeys keys to buffer bits such as DEPTH_BUFFER_BIT.
TGlChart WebGL IChartComponent.
TGlComponentRenderer Gl entity renderer with extensions.
TGlContext  
TGlContextAdapterCtor Constructor signature for Gl1ContextAdapter or Gl2ContextAdapter.
TGlExtensionKeys  
TGlExtensions Maps extension keys to extensions.
TGlF32BufferLayout  
TGlFeatureFlags Features to enable, e.g. SCISSOR_TEST.
TGlHasExtension true if TKey is present in TExts, false otherwise.
TGlInstancedComponentRenderer Either a wgl1 renderer with extension ANGLE_instanced_arrays or wgl2 renderer.
TGlUniformArray Supported uniform types.
TGlUnknownBinder  
TGraphicsComponent  
TGraphicsComponentAddedArgs Args for TOnGraphicsComponentAdded.
TInitialChartStateFactory  
TIsGl2 true if TCtx extends WebGL2RenderingContext, false otherwise.
TLinkableCompositeGraphicsComponent  
TOnCanvasMouseEvent Mouse event listener.
TOnCanvasPointerEvent Mouse / touch event listener.
TOnCanvasResized Resize listener, event emitted on IChartComponent.resize() call.
TOnDprChanged Device pixel ratio listener.
TOnEntityAdded Listener for entity added to plot.
TOnEntityAddedToGroup Listener for entity being added to group.
TOnEntityModified Listener for entity modification.
TOnEntityRemoved Listener for entity removed form plot.
TOnEntityRemovedFromGroup Listener for entity removed form group.
TOnGraphicsComponentAdded Listener for graphics components added to chart.
TOnPlotAttachChanged Listener for plot attach / detach to chart.
TOnPlotAttachChangedArgs Args for OnPlotAttachChanged.
TOnPlotRequiresUpdate Plot requires update/redraw listener.
TRendererOnContextLost Listener for renderer context loss.
TSharedInterleavedConnectorPrefix  
TUnfilteredIterateCallback  
TUnknownBufferLayout  
TUnknownComponentRenderer Useful where the component renderer is not important, i.e. draw calls are not allowed.
TUnknownEntity  
TUnknownRenderer  
TUnknownTransformComponent