scichart
Version:
Fast WebGL JavaScript Charting Library and Framework
115 lines (114 loc) • 6.28 kB
JavaScript
;
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.PolarStackedMountainRenderableSeries = void 0;
var SeriesType_1 = require("../../../../types/SeriesType");
var IThemeProvider_1 = require("../../../Themes/IThemeProvider");
var BaseLineRenderableSeries_1 = require("../BaseLineRenderableSeries");
var constants_1 = require("../constants");
var StackedMountainRenderableSeries_1 = require("../StackedMountainRenderableSeries");
var PolarBandSeriesDrawingProvider_1 = require("./DrawingProviders/PolarBandSeriesDrawingProvider");
var PolarLineSeriesDrawingProvider_1 = require("./DrawingProviders/PolarLineSeriesDrawingProvider");
var PolarPointMarkerDrawingProvider_1 = require("./DrawingProviders/PolarPointMarkerDrawingProvider");
/**
* Defines a polar stacked mountain-series or polar stacked mountain chart type in the SciChart's High Performance Real-time
* {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}, which needs to be paired within a
* {@link PolarStackedMountainCollection | Collection} to function correctly.
*
* ---
* 📚 Docs: {@link https://www.scichart.com/documentation/js/v4/2d-charts/chart-types/polar-stacked-mountain-renderable-series/}
*/
var PolarStackedMountainRenderableSeries = /** @class */ (function (_super) {
__extends(PolarStackedMountainRenderableSeries, _super);
/**
* Creates an instance of the {@link PolarLineRenderableSeries}
* @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 IPolarStackedMountainRenderableSeriesOptions} applied when constructing the series type
*
* ---
* 📚 Docs: {@link https://www.scichart.com/documentation/js/v4/2d-charts/chart-types/polar-stacked-mountain-renderable-series/}
*/
function PolarStackedMountainRenderableSeries(webAssemblyContext, options) {
var _this = this;
var _a, _b;
_this = _super.call(this, webAssemblyContext, options) || this;
_this.isPolar = true;
_this.type = SeriesType_1.ESeriesType.PolarStackedMountainSeries;
_this.lineType = BaseLineRenderableSeries_1.ELineType.Normal;
// Must be called here for the series type to be available
if ((_a = _this.paletteProvider) === null || _a === void 0 ? void 0 : _a.onAttached) {
(_b = _this.paletteProvider) === null || _b === void 0 ? void 0 : _b.onAttached(_this);
}
return _this;
}
Object.defineProperty(PolarStackedMountainRenderableSeries.prototype, "isDigitalLine", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(PolarStackedMountainRenderableSeries.prototype, "fillY1", {
/**
* Gets or sets the fill color for the region below the zero line as an HTML Color code
*/
get: function () {
return (0, IThemeProvider_1.stripAutoColor)(this.fillY1Property);
},
/**
* Gets or sets the fill color for the region below the zero line as an HTML Color code
*/
set: function (htmlColorCode) {
this.fillY1Property = htmlColorCode;
this.notifyPropertyChanged(constants_1.PROPERTY.FILL_Y1);
},
enumerable: false,
configurable: true
});
Object.defineProperty(PolarStackedMountainRenderableSeries.prototype, "fillLinearGradient1", {
/**
* Gets or sets the fill for the region below the zero line as a gradient brush
*/
get: function () {
return this.fillLinearGradient1Property;
},
enumerable: false,
configurable: true
});
Object.defineProperty(PolarStackedMountainRenderableSeries.prototype, "fillLinear1Gradient", {
/**
* Gets or sets the fill for the region below the zero line as a gradient brush
*/
set: function (gradientBrushParams) {
// We need this check, to prevent creating new Texture if we set the same value
if (gradientBrushParams !== this.fillLinearGradient1Property) {
this.fillLinearGradient1Property = gradientBrushParams;
this.notifyPropertyChanged(constants_1.PROPERTY.FILL_LINEAR_GRADIENT);
}
},
enumerable: false,
configurable: true
});
PolarStackedMountainRenderableSeries.prototype.addDrawingProviders = function (webAssemblyContext, options) {
this.drawingProviders.push(new PolarBandSeriesDrawingProvider_1.PolarBandSeriesDrawingProvider(webAssemblyContext, this, function (ps) { return ps.y1Values; }, function (ps) { return ps.yValues; }));
this.drawingProviders.push(new PolarLineSeriesDrawingProvider_1.PolarLineSeriesDrawingProvider(webAssemblyContext, this, function (ps) { return ps.y1Values; }));
this.drawingProviders.push(new PolarPointMarkerDrawingProvider_1.PolarPointMarkerDrawingProvider(webAssemblyContext, this, function (ps) { return ps.y1Values; }));
};
return PolarStackedMountainRenderableSeries;
}(StackedMountainRenderableSeries_1.StackedMountainRenderableSeries));
exports.PolarStackedMountainRenderableSeries = PolarStackedMountainRenderableSeries;