Interface for readonly configuration of PointLineAreaSeries.

Example usage:

 // Example 1, create series with default configuration.
const series = ChartXY.addPointLineAreaSeries({})
 // Example 2, attach series to non-default X Axis.
const series = ChartXY.addPointLineAreaSeries({
xAxis: myNonDefaultAxisX
})
 // Example 3, specify schema.
const series = ChartXY.addPointLineAreaSeries({
schema: {
timestamps: { pattern: 'progressive' },
temperature: { pattern: null }
}
})

See SeriesOptionsXY and DataSetXYOptions for more detailed information about available properties.

Hierarchy

Properties

allowDataGrouping?: boolean

Optional flag that can be used to disable automatic grouping of progressive data that is packed very tightly together.

Even if data grouping is enabled, data will be automatically displayed according to the active zoom level so that the data looks accurate at all times.

Set to true or omit for maximum performance.

 // Example, disable data grouping
const series = ChartXY.addPointLineAreaSeries({ allowDataGrouping: false })
allowInputModification?: boolean

Optional flag that can be used to prevent DataSetXY from modifying arrays that user passes to its methods. This can happen when supplying Typed arrays to DataSetXY methods, for example:

 const myArr = new Float32Array([ 0, 1, 2, 3, 4 ])
DataSetXY.appendSamples({ yValues: myArr })
DataSetXY.alterSamples(...)
// values inside `myArr` may be affected by operation!

Utilizing this behavior is under no circumstance recommended. However, this flag is added in case this behavior would result in undesired consequences in an user application. In this case, you can simply disable it:

 // Example, disallow DataSetXY methods from altering any data array supplied by user.
const dataSet = new DataSetXY({ allowInputModification: false })

This can have some disadvantages to performance, but should not be anything too major.

autoDetectPatterns?: boolean

Optional flag that can be used to prevent automatic pattern detection. This is useful in use cases where you don't exactly know what data properties will be received, or simply don't want to explicitly configure each one.

 // Example, specify any known progressive data properties, and prevent any others from being detected automatically
const dataSet = new DataSetXY({
schema: {
time: { pattern: 'progressive' }
},
autoDetectPatterns: false
})
autoSortingEnabled?: boolean

Controls whether automatic sorting of data according is enabled or disabled. If dataPattern is any kind of progressive pattern, then input data can be automatically sorted to remain in that progressive order. This can be useful when data is arriving in the application asynchronously and it can't be guaranteed that it arrives in the correct order.

Please note that auto sorting only sorts by BATCH, not by SAMPLE. For example, if you supply batches of for example 10 samples at a time, auto sorting is capable of identifying the scenario where a newer batch arrives before one that should be displayed first. However, auto sorting is not capable of sorting any samples that are in wrong order within a BATCH. This is intentional due to effects on performance, and since its not a realistic need scenario.

Defaults to true.

 // Example, disable auto sorting.
const dataSet = new DataSetXY({ autoSortingEnabled: false })
 // Example, works same way if using series API directly instead of via DataSetXY
const series = ChartXY.addLineSeries({ autoSortingEnabled: false })

Auto sorting is never applied on automatically detected data patterns.

automaticColorIndex?: number

Optional index to use for automatic coloring of series.

Normally series are automatically colored differently when you create several series in the same chart. However, in some cases you might want to alter this order of automatic coloring, or use the automatic color palettes on series that belong to different charts.

In these scenarios you can use automaticColorIndex to tell each series individually what is its place in the default color palette.

 // Create series using the first color in default Theme palette.
const series1 = chart.addLineSeries({ automaticColorIndex: 0 })
// Create another series colored with the 3rd color.
const series2 = chart.addLineSeries({ automaticColorIndex: 2 })
axisX?: Axis

Optional non-default X Axis to attach series to.

By default, series are attached to the same X Axis, that is returned by getDefaultAxisX.

axisY?: Axis

Optional non-default Y Axis to attach series to.

By default, series are attached to the same Y Axis, that is returned by getDefaultAxisY.

includesNaN?: boolean

Optional flag that can be used to inform that data set will not include NaN values. By default, it is assumed that the data provided might include NaN values. This results in extra processing to properly handle NaN values.

In case where you know that your data points will NOT include NaN values, you can set this to false for slight performance increase.

 const series = ChartXY.addLineSeries({ includesNaN: false })
legend?: null | LegendEntryOptions

Legend options for the series. If null, no legend entry will be created for the series.

Define what data can be stored in the data set.

 // Example
const series = chart.addLineSeries({
schema: {
index: { auto: true },
x: { pattern: 'progressive' },
y: { storage: Float32Array },
pointSize: {}
}
})

If schema is not defined, it is automatically configured to match first incoming data. First pushed data can also expand the configured schema - meaning you can configure known data properties, and still be able to consume other data properties that you may not know beforehand.

For more detailed documentation, please see Developer documentation.

strictMode?: boolean

Optional flag that can be used to enable strict mode.

By default, data set class is quite lenient in its use for purposes of backwards compatibility and easier learning curve. If user wishes to ensure that data set is controlled very strictly, rather than leaning on automatic "quality of life" behaviors, strict mode can be enabled.

Behavior differences if enabled:

  • Schema must be defined when data set is created.
  • All schema properties must include a data pattern specification.
  • Schema can never be changed afterwards during runtime.
  • Input data must always include all values as expected by the schema.
  • Series data mapping must be explicitly specified.
  • Data mapping must refer to properties that exist in the schema.

If any condition is not respected, an Error will be thrown.

useSharedArrayBuffers?: boolean | {
    onNewBuffers?: ((sharedArrayBuffers: Record<string, SharedArrayBuffer>) => void);
    onRemovedBuffers?: ((sharedArrayBuffers: Record<string, SharedArrayBuffer>) => void);
}

API for enabling SharedArrayBuffer mode. When enabled, the dataset makes sure that its internal data storage is backed by SharedArrayBuffer as opposed to default ArrayBuffer.

Shared array buffers have strict restrictions when they can be used. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer for more information.

Some visualization features can take advantage of SAB backed datasets to enable powerful performance optimizations.

Introduced in v8.2. API may be changed according to user feedback and reports.
warnings?: boolean

Optional flag to allow disabling all data set related warnings.

Usage is strongly discouraged unless use case specifically needs it

In majority of cases Data set warnings should be disabled by applying proper configurations. This bloats up application code a bit but is important for:

  • Ensuring application functions same regardless of what data is supplied (rather than automatic quality of life behaviors having chance of behaving differently)
  • Improving performance by disabling automatic quality of life checks.

In use cases where your application doesn't know what data is coming and you need to prepare data set before first sample arrives, disabling warnings can be OK as long as you know what you are doing.

xAxis?: Axis

Optional non-default X Axis to attach series to.

By default, series are attached to the same X Axis, that is returned by getDefaultAxisX.

yAxis?: Axis

Optional non-default Y Axis to attach series to.

By default, series are attached to the same Y Axis, that is returned by getDefaultAxisY.