UNPKG

scichart

Version:

Fast WebGL JavaScript Charting Library and Framework

67 lines (66 loc) 3.64 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.StackedMountainCollection = void 0; var SeriesType_1 = require("../../../types/SeriesType"); var StackedXyCollection_1 = require("./StackedXyCollection"); /** * @summary A {@link StackedMountainCollection} allows grouping multiple {@link StackedMountainRenderableSeries} * to create a JavaScript Stacked Mountain chart, or 100% Stacked Mountain chart * @description * Multiple {@link StackedMountainRenderableSeries} are required to create a stacked mountain chart type in SciChart. * These are grouped with a {@link StackedMountainCollection}, which implements {@link IRenderableSeries} and may be added * directly to a {@link SciChartSurface.renderableSeries} collection. * * Code sample below: * ```ts * const stackedMountain0 = new StackedMountainRenderableSeries(wasmContext); * // .. configure mountain 1, including set dataSeries * const stackedMountain1 = new StackedMountainRenderableSeries(wasmContext); * // .. configure mountain 2, including set dataSeries * const stackedMountain2 = new StackedMountainRenderableSeries(wasmContext); * // .. configure mountain 3, including set dataSeries * const stackedMountainCollection = new StackedMountainCollection(wasmContext); * stackedMountainCollection.add(stackedMountain0, stackedMountain1, stackedMountain2); * * sciChartSurface.renderableSeries.add(stackedMountainCollection); * ```` * @remarks This type implements {@link IRenderableSeries} but it is not a renderable series, instead it wraps multiple * {@link StackedMountainRenderableSeries} to create a stacked mountain chart * * --- * 📚 Docs: {@link https://www.scichart.com/documentation/js/v4/2d-charts/chart-types/stacked-mountain-renderable-series/} */ var StackedMountainCollection = /** @class */ (function (_super) { __extends(StackedMountainCollection, _super); /** * Creates an instance of the {@link StackedMountainCollection} * @param webAssemblyContext The {@link TSciChart | SciChart WebAssembly Context} containing * native methods and access to our WebGL2 WebAssembly Drawing Engine * @param options Optional parameters of type {@link IBaseStackedCollectionOptions} to configure the series * * --- * 📚 Docs: {@link https://www.scichart.com/documentation/js/v4/2d-charts/chart-types/stacked-mountain-renderable-series/} */ function StackedMountainCollection(webAssemblyContext, options) { var _this = _super.call(this, webAssemblyContext, options) || this; _this.type = SeriesType_1.ESeriesType.StackedMountainCollection; return _this; } return StackedMountainCollection; }(StackedXyCollection_1.StackedXyCollection)); exports.StackedMountainCollection = StackedMountainCollection;