UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

355 lines (349 loc) 13.3 kB
import { EventEmitter, Output, Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core'; import { delegateCombine } from "igniteui-angular-core"; import { IgxNumericXAxisComponent } from "./igx-numeric-x-axis-component"; import { IgxNumericYAxisComponent } from "./igx-numeric-y-axis-component"; import { IgxProgressiveLoadStatusEventArgs } from "./igx-progressive-load-status-event-args"; import { IgxSeriesComponent } from "./igx-series-component"; import { HighDensityScatterSeries } from "./HighDensityScatterSeries"; import { ensureBool, colorToString, stringToColor, toPoint } from "igniteui-angular-core"; import * as i0 from "@angular/core"; /** * Represents a IgxDataChartComponent series where a high volume of scatter points can be displayed. */ export let IgxHighDensityScatterSeriesComponent = /*@__PURE__*/ (() => { class IgxHighDensityScatterSeriesComponent extends IgxSeriesComponent { constructor() { super(); this._progressiveLoadStatusChanged = null; } createImplementation() { return new HighDensityScatterSeries(); } /** * @hidden */ get i() { return this._implementation; } /** * Gets whether the current series shows pixels. */ get isPixel() { return this.i.fr; } /** * Checks if this series is a scatter series */ get isScatter() { return this.i.fz; } /** * Gets or sets the effective x-axis for the current object. */ get xAxis() { const r = this.i.xp; if (r == null) { return null; } if (!r.externalObject) { let e = IgxNumericXAxisComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; } set xAxis(v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.xp = null : this.i.xp = v.i; } /** * Gets or sets the effective y-axis for the current object. */ get yAxis() { const r = this.i.xr; if (r == null) { return null; } if (!r.externalObject) { let e = IgxNumericYAxisComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; } set yAxis(v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.xr = null : this.i.xr = v.i; } /** * Gets or sets the x value mapping property for the current series object. */ get xMemberPath() { return this.i.zt; } set xMemberPath(v) { this.i.zt = v; } /** * Gets or sets the label displayed before series X value in the Data Legend. */ get xMemberAsLegendLabel() { return this.i.zp; } set xMemberAsLegendLabel(v) { this.i.zp = v; } /** * Gets or sets the label displayed before series Y value in the Data Legend. */ get yMemberAsLegendLabel() { return this.i.zx; } set yMemberAsLegendLabel(v) { this.i.zx = v; } /** * Gets or sets the unit after displayed after series X value in the Data Legend. */ get xMemberAsLegendUnit() { return this.i.zr; } set xMemberAsLegendUnit(v) { this.i.zr = v; } /** * Gets or sets the unit after displayed after series Y value in the Data Legend. */ get yMemberAsLegendUnit() { return this.i.zz; } set yMemberAsLegendUnit(v) { this.i.zz = v; } /** * Gets or sets the y value mapping property for the current series object. */ get yMemberPath() { return this.i.z1; } set yMemberPath(v) { this.i.z1 = v; } /** * Gets or sets the whether to use use brute force mode. */ get useBruteForce() { return this.i.x6; } set useBruteForce(v) { this.i.x6 = ensureBool(v); } /** * Gets or sets the whether to progressively load the data into the chart. */ get progressiveLoad() { return this.i.x5; } set progressiveLoad(v) { this.i.x5 = ensureBool(v); } /** * Gets or sets the density value that maps to the minimum heat color. */ get heatMinimum() { return this.i.y1; } set heatMinimum(v) { this.i.y1 = +v; } /** * Gets or sets the value that maps to the maximum heat color. */ get heatMaximum() { return this.i.y0; } set heatMaximum(v) { this.i.y0 = +v; } /** * Gets or sets the color to use for the minimum end of the scale. */ get heatMinimumColor() { return colorToString(this.i.aaz); } set heatMinimumColor(v) { this.i.aaz = stringToColor(v); } /** * Gets or sets the color to use for the maximum end of the scale. */ get heatMaximumColor() { return colorToString(this.i.aay); } set heatMaximumColor(v) { this.i.aay = stringToColor(v); } /** * Gets or sets the the pixel extent of the square data points that are rendered. */ get pointExtent() { return this.i.zd; } set pointExtent(v) { this.i.zd = +v; } /** * Represents the current status of the progressive load of the series. It will range from 0 to 100, where 100 is fully loaded. */ get progressiveStatus() { return this.i.ze; } set progressiveStatus(v) { this.i.ze = +v; } findByName(name) { var baseResult = super.findByName(name); if (baseResult) { return baseResult; } if (this.xAxis && this.xAxis.name && this.xAxis.name == name) { return this.xAxis; } if (this.yAxis && this.yAxis.name && this.yAxis.name == name) { return this.yAxis; } return null; } _styling(container, component, parent) { super._styling(container, component, parent); this._inStyling = true; if (this.xAxis && this.xAxis._styling) { this.xAxis._styling(container, component, this); } if (this.yAxis && this.yAxis._styling) { this.yAxis._styling(container, component, this); } this._inStyling = false; } getItemValue(item, memberPathName) { let iv = this.i.kz(item, memberPathName); return (iv); } /** * Gets the value of a requested member path from the series. * @param memberPathName * The property name of a valid member path for the series */ getMemberPathValue(memberPathName) { let iv = this.i.mo(memberPathName); return (iv); } /** * Determine if object can be used as YAxis * @param axis * The object to check */ canUseAsYAxis(axis) { let iv = this.i.x4(axis); return (iv); } /** * Determine if object can be used as XAxis * @param axis * The object to check */ canUseAsXAxis(axis) { let iv = this.i.x3(axis); return (iv); } /** * Scrolls the series to display the item for the specified data item. * The series is scrolled by the minimum amount required to place the specified data item within * the central 80% of the visible axis. * @param item * The data item (item) to scroll to. */ scrollIntoView(item) { let iv = this.i.gj(item); return (iv); } /** * Gets the item that is the best match for the specified world coordinates. * @param world * The world coordinates to use. */ getItem(world) { let iv = this.i.kw(toPoint(world)); return (iv); } /** * Raised when the progressive loading state of the series has changed. */ get progressiveLoadStatusChanged() { if (this._progressiveLoadStatusChanged == null) { this._progressiveLoadStatusChanged = new EventEmitter(); this.i.progressiveLoadStatusChanged = delegateCombine(this.i.progressiveLoadStatusChanged, (o, e) => { this._runInZone(() => { let outerArgs = new IgxProgressiveLoadStatusEventArgs(); outerArgs._provideImplementation(e); if (this.beforeProgressiveLoadStatusChanged) { this.beforeProgressiveLoadStatusChanged(this, outerArgs); } this._progressiveLoadStatusChanged.emit({ sender: this, args: outerArgs }); }); }); } return this._progressiveLoadStatusChanged; } } IgxHighDensityScatterSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxHighDensityScatterSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxHighDensityScatterSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxHighDensityScatterSeriesComponent, selector: "igx-high-density-scatter-series", inputs: { xAxis: "xAxis", yAxis: "yAxis", xMemberPath: "xMemberPath", xMemberAsLegendLabel: "xMemberAsLegendLabel", yMemberAsLegendLabel: "yMemberAsLegendLabel", xMemberAsLegendUnit: "xMemberAsLegendUnit", yMemberAsLegendUnit: "yMemberAsLegendUnit", yMemberPath: "yMemberPath", useBruteForce: "useBruteForce", progressiveLoad: "progressiveLoad", heatMinimum: "heatMinimum", heatMaximum: "heatMaximum", heatMinimumColor: "heatMinimumColor", heatMaximumColor: "heatMaximumColor", pointExtent: "pointExtent", progressiveStatus: "progressiveStatus" }, outputs: { progressiveLoadStatusChanged: "progressiveLoadStatusChanged" }, providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxHighDensityScatterSeriesComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxHighDensityScatterSeriesComponent; })(); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxHighDensityScatterSeriesComponent, decorators: [{ type: Component, args: [{ selector: 'igx-high-density-scatter-series', template: ``, providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxHighDensityScatterSeriesComponent) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; }, propDecorators: { xAxis: [{ type: Input }], yAxis: [{ type: Input }], xMemberPath: [{ type: Input }], xMemberAsLegendLabel: [{ type: Input }], yMemberAsLegendLabel: [{ type: Input }], xMemberAsLegendUnit: [{ type: Input }], yMemberAsLegendUnit: [{ type: Input }], yMemberPath: [{ type: Input }], useBruteForce: [{ type: Input }], progressiveLoad: [{ type: Input }], heatMinimum: [{ type: Input }], heatMaximum: [{ type: Input }], heatMinimumColor: [{ type: Input }], heatMaximumColor: [{ type: Input }], pointExtent: [{ type: Input }], progressiveStatus: [{ type: Input }], progressiveLoadStatusChanged: [{ type: Output }] } });