Options
All
  • Public
  • Public/Protected
  • All
Menu
summary

Defines the interface to a Render Series (or Chart Type) in SciChart's High Performance Real-time JavaScript Charts

remarks

A RenderableSeries defines how data should be rendered. e.g. as a Line Chart, Mountain Chart, Candlestick Chart etc... This is independent from the DataSeries which stores the data to render

See derived types of BaseDataSeries to find out what data-series are available. See derived types of IRenderableSeries to find out what 2D JavaScript Chart types are available.

Hierarchy

Implemented by

Index

Properties

dataLabelProvider

dataLabelProvider: BaseDataLabelProvider

Gets or sets the BaseDataLabelProvider used for creating and drawing per-point text

dataSeries

dataSeries: IDataSeries

The DataSeries which provides a datasource for this IRenderableSeries to draw

drawNaNAs

drawNaNAs: ELineDrawMode

How to treat NAN (Not a number) values in the input dataSeries. See ELineDrawMode for a list of values.

drawingProviders

drawingProviders: ISeriesDrawingProvider[]

Gets a list of Series Drawing Providers, which perform specific drawing operations in the series

enableDrawingOptimisations

enableDrawingOptimisations: boolean

Readonly. When true, resampling modes are enabled for faster drawing performance.

hitTestProvider

hitTestProvider: IHitTestProvider

Gets the current IHitTestProvider, used to call methods IHitTestProvider.hitTest, IHitTestProvider.hitTestXSlice and IHitTestProvider.hitTestDataPoint and provide info about the series data-points at mouse or touch locations

Readonly hovered

A hovered EventHandler. This event fires whenever the Series is hovered or unhovered by a mouse or pointer.

remarks

See EventHandler for how to subscribe

Readonly id

id: string

A unique Id for the IRenderableSeries

invalidateParentCallback

invalidateParentCallback: () => void

A callback which tells the parent SciChartSurface that it must be redrawn, e.g. when a property changes

Type declaration

    • (): void
    • Returns void

isDigitalLine

isDigitalLine: boolean

When true, if this series draws a line, the line will be a digital (step) line

isHovered

isHovered: boolean

Gets or sets whether the Series is hovered by a mouse or pointer device. Setting programmatically will trigger hovered logic

isRunningAnimation

isRunningAnimation: boolean

gets if the animation is currently running

isSelected

isSelected: boolean

Gets or sets whether the Series is selected. Setting programmatically will trigger selection logic

Readonly isSpline

isSpline: boolean

Returns true if the series uses spline interpolation

Readonly isStacked

isStacked: boolean

Returns true if the series is a stacked series or not

isVisible

isVisible: boolean

When true, the series is visible and drawn

Readonly isVisibleChanged

An isVisible changed EventHandler. This event fires whenever the Series isVisible changes.

remarks

See EventHandler for how to subscribe

opacity

opacity: number

An Opacity factor of the Series that controls its semi-transparency level, where value 1 means the Series is opaque; 0 - transparent.

paletteProvider

paletteProvider: IPaletteProvider

An optional IPaletteProvider which is used to provide per data-point coloring or paletting.

remarks

See IStrokePaletteProvider for per data-point coloring of lines or strokes, IFillPaletteProvider for per data-point coloring of fills or series bodies, and IPointMarkerPaletteProvider for per data-point coloring of point-markers

parentSurface

parentSurface: SciChartSurface

The parent SciChartSurface that this RenderableSeries is attached to

pointMarker

pointMarker: IPointMarker | undefined

A Point Marker which is used to draw an optional point-marker at each data-point. Applicable to some series types only

resamplingMode

resamplingMode: EResamplingMode

Gets or sets the EResamplingMode used when drawing this series. Default value is Auto. To disable resampling for this series set mode = None. Also see resamplingPrecision which specifies the precision applied when resampling. To globally enable/disable resampling for debug purposes set SciChartDefaults.debugDisableResampling

resamplingPrecision

resamplingPrecision: number

Gets or sets the resampling precision for this series.

Default value is 0.0. Value of 1.0 means double precision: the resampler outputs 2x the number of points. Value of 2.0 means quadruple precision: the resampler outputs 4x the number of points.

If experiencing visual artefacts, try setting the precision to 1.0 or 2.0. This will come at a minor performance cost of around 20% for large datasets.

Readonly rolloverModifierProps

Readonly rolloverModifierProps1

Gets or sets RolloverModifierRenderableSeriesProps for RolloverModifier tooltips Is being used for Y1 tooltips for FastBandRenderableSeries

Readonly selected

A selected EventHandler. This event fires whenever the Series is selected or deselected.

remarks

See EventHandler for how to subscribe

stroke

stroke: string

A Stroke for lines, outlines and edges of this RenderableSeries

remarks

Acceptable values include RGB format e.g. #FF0000, RGBA format e.g. #FF000077 and RGBA format e.g. rgba(255,0,0,0.5)

strokeThickness

strokeThickness: number

The Stroke Thickness for lines, outlines and edges of this RenderableSeries

Readonly supportsResampling

supportsResampling: boolean

Returns true if the series supports resampling

Readonly type

Returns the type of the series. See ESeriesType for a list of values

Readonly xAxis

xAxis: AxisCore

Gets the bound XAxis for this BaseRenderableSeries.

remarks

Does a lookup search on SciChartSurface.xAxes collection by Id matching this.xAxisId

xAxisId

xAxisId: string
summary

The current XAxis Id that this IRenderableSeries is bound to

description

By default all series will draw on the first X,Y axis pair in SciChart. If you want this to change, you must add a second axis to your SciChartSurface and link the BaseRenderableSeries by Axis Id.

For example:

const sciChartSurface: SciChartSurface;
const primaryXAxis = new NumericAxis(wasmContext); // Has Id = AxisCore.DEFAULT_AXIS_ID
const primaryYAxis = new NumericAxis(wasmContext); // Has Id = AxisCore.DEFAULT_AXIS_ID

const secondaryXAxis = new NumericAxis(wasmContext); // For subsequent X,Y axis set an Id
secondaryXAxis.id = "SecondaryXAxis";
const secondaryYAxis = new NumericAxis(wasmContext);
secondaryYAxis.id = "SecondaryYAxis";

// Add all Axis to the chart
sciChartSurface.xAxes.add(primaryXAxis);
sciChartSurface.yAxes.add(primaryYAxis);
sciChartSurface.xAxes.add(secondaryXAxis);
sciChartSurface.yAxes.add(secondaryYAxis);

// Add a series on the default axis
const renderSeries = new FastLineRenderableSeries(wasmContext); // xAxisId, yAxisId Defaults to AxisCore.DEFAULT_AXIS_ID
sciChartSurface.renderableSeries.add(renderSeries);

// Add a series on the specific axis
const renderSeries2 = new FastLineRenderableSeries(wasmContext);
renderSeries2.xAxisId = "SecondaryXAxis";
renderSeries2.yAxisId = "SecondaryYAxis";
sciChartSurface.renderableSeries.add(renderSeries2);
remarks

The default value is set to AxisCore.DEFAULT_AXIS_ID.

Readonly yAxis

yAxis: AxisCore

Gets the bound YAxis for this BaseRenderableSeries.

remarks

Does a lookup search on SciChartSurface.yAxes collection by Id matching this.yAxisId

yAxisId

yAxisId: string
summary

The current YAxis Id that this IRenderableSeries is bound to

description

By default all series will draw on the first X,Y axis pair in SciChart. If you want this to change, you must add a second axis to your SciChartSurface and link the BaseRenderableSeries by Axis Id.

For example:

const sciChartSurface: SciChartSurface;
const primaryXAxis = new NumericAxis(wasmContext); // Has Id = AxisCore.DEFAULT_AXIS_ID
const primaryYAxis = new NumericAxis(wasmContext); // Has Id = AxisCore.DEFAULT_AXIS_ID

const secondaryXAxis = new NumericAxis(wasmContext); // For subsequent X,Y axis set an Id
secondaryXAxis.id = "SecondaryXAxis";
const secondaryYAxis = new NumericAxis(wasmContext);
secondaryYAxis.id = "SecondaryYAxis";

// Add all Axis to the chart
sciChartSurface.xAxes.add(primaryXAxis);
sciChartSurface.yAxes.add(primaryYAxis);
sciChartSurface.xAxes.add(secondaryXAxis);
sciChartSurface.yAxes.add(secondaryYAxis);

// Add a series on the default axis
const renderSeries = new FastLineRenderableSeries(wasmContext); // xAxisId, yAxisId Defaults to AxisCore.DEFAULT_AXIS_ID
sciChartSurface.renderableSeries.add(renderSeries);

// Add a series on the specific axis
const renderSeries2 = new FastLineRenderableSeries(wasmContext);
renderSeries2.xAxisId = "SecondaryXAxis";
renderSeries2.yAxisId = "SecondaryYAxis";
sciChartSurface.renderableSeries.add(renderSeries2);
remarks

The default value is set to AxisCore.DEFAULT_AXIS_ID.

yRangeMode

yRangeMode: EYRangeMode

Determines whether the y range for this series should consider only the visible data (the default), or include the drawn points just outside the visible range

Methods

adjustAutoColor

  • adjustAutoColor(propertyName: string, color: string): string
  • Replace this to do custom adjustments to the auto color for a particular property

    Parameters

    • propertyName: string
    • color: string

    Returns string

applyTheme

checkIsOutOfDataRange

  • checkIsOutOfDataRange(xValue: number, yValue: number): boolean
  • Checks is the point is out of the data range. For sorted data only. Is used to hide tooltips for RolloverModifier

    Parameters

    • xValue: number

      The X value of the point

    • yValue: number

      The Y value of the point

    Returns boolean

delete

  • delete(): void
  • Deletes native (WebAssembly) memory used by this type, after which it cannot be used.

    remarks

    Call .delete() before finishing with the object to ensure that WebAssmembly memory leaks do not occur.

    All elements within SciChart's High Performance Realtime JavaScript Charts which implement IDeletable must be deleted manually to free native (WebAssembly) memory

    Returns void

draw

  • Called when the BaseRenderableSeries must be drawn

    Parameters

    • renderContext: WebGlRenderContext2D

      The {@link WebGL2RenderingContext} with methods for drawing on the WebGL Canvas via our WebAssembly Rendering Engine

    • renderPassData: RenderPassData

      The RenderPassData containing data about the current rendering pass

    Returns void

enqueueAnimation

  • Add the animation into the queue

    Parameters

    Returns void

getCurrentRenderPassData

  • Gets the RenderPassData instance used for this render pass

    Returns RenderPassData

getDataSeriesName

  • getDataSeriesName(): string
  • Returns the associated IDataSeries.dataSeriesName

    Returns string

getDataSeriesValuesCount

  • getDataSeriesValuesCount(): number
  • Returns IDataSeries.count for the linked dataSeries

    Returns number

getIndicesRange

  • Returns the indices range of data points in xRange of the associated IDataSeries

    Parameters

    • xRange: NumberRange

      The X-Axis Range currently in view

    • Optional isCategoryData: boolean

      If True the renderable series uses CategoryAxis

    Returns NumberRange

getNativeXValues

  • getNativeXValues(): SCRTDoubleVector

getResamplingParams

  • Gets the ResamplingParams for this render. This will be undefined until needsResampling is called.

    Returns ResamplingParams

getSeriesInfo

  • Get a SeiesInfo object for this series based on the given hitTest

    Parameters

    Returns SeriesInfo

getXRange

  • Gets the X-Range of the series. Override in derived classes to provide series specific implementations

    Returns NumberRange

getYRange

  • Gets the Y-Range of the series for the current X-Range. Override in derived classes to provide series specific implementations

    Parameters

    Returns NumberRange

hasDataSeries

  • hasDataSeries(): boolean

hasDataSeriesValues

  • hasDataSeriesValues(): boolean

hasFillPaletteProvider

  • hasFillPaletteProvider(): boolean
  • Returns true if the BaseRenderableSeries has an

    Returns boolean

hasPointMarkerPaletteProvider

  • hasPointMarkerPaletteProvider(): boolean

hasStrokePaletteProvider

  • hasStrokePaletteProvider(): boolean

onAnimate

  • onAnimate(timeElapsed: number): void
  • Is called for each render

    Parameters

    • timeElapsed: number

    Returns void

onAttach

onDetach

  • onDetach(): void

Protected onDpiChanged

  • Called when the Dpi changes in the browser. This could be due to user zooming the browser, or changing DPI settings in Windows, or moving the browser containing SciChart to another monitor

    Parameters

    Returns void

Optional pushPalettedColors

  • Parameters

    Returns void

resolveAutoColors

  • resolveAutoColors(index: number, maxSeries: number, theme: IThemeProvider): void
  • Resolve colors marked AUTO_COLOR using the theme's strokePalette and fillPalette To do custom adjustments to the resolved colors, override the adjustAutoColor method

    Parameters

    Returns void

runAnimation

  • Cancel all previous animations and run the current one

    Parameters

    Returns void

setCurrentRenderPassData

  • Sets the RenderPassData instance used for this render pass

    Parameters

    Returns void

toJSON

  • Convert the object to a definition that can be serialized to JSON, or used directly with the builder api

    Parameters

    • Optional excludeData: boolean

      if set true, data values will not be included in the json.

    Returns TSeriesDefinition

toPointSeries

  • Returns a dataset for drawing on the viewport

    Parameters

    Returns IPointSeries

Generated using TypeDoc