igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
284 lines (280 loc) • 11.1 kB
JavaScript
import { EventEmitter, Output, Component, Input } 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 { IgxTriangulationStatusEventArgs } from "igniteui-angular-core";
import { IgxSeriesComponent } from "./igx-series-component";
import * as i0 from "@angular/core";
/**
* Base class for series which triangulate XY data prior to rendering.
*/
export let IgxScatterTriangulationSeriesComponent = /*@__PURE__*/ (() => {
class IgxScatterTriangulationSeriesComponent extends IgxSeriesComponent {
constructor() {
super();
this._triangulationStatusChanged = null;
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
/**
* The name of the property from which to extract the X-coordinate for each item in the ItemsSource.
*/
get xMemberPath() {
return this.i.xz;
}
set xMemberPath(v) {
this.i.xz = v;
}
/**
* The name of the property from which to extract the Y-coordinate for each item in the ItemsSource.
*/
get yMemberPath() {
return this.i.x7;
}
set yMemberPath(v) {
this.i.x7 = v;
}
/**
* The X-Axis for this series.
*/
get xAxis() {
const r = this.i.wx;
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.wx = null : this.i.wx = v.i;
}
/**
* The Y-Axis for this series.
*/
get yAxis() {
const r = this.i.wy;
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.wy = null : this.i.wy = v.i;
}
/**
* The source of triangulation data.
* This property is optional. If it is left as null, the triangulation will be created based on the items in the ItemsSource. Triangulation is a demanding operation, so the runtime performance will be better when specifying a TriangulationSource, especially when a large number of data items are present.
*/
get trianglesSource() {
return this.i.trianglesSource;
}
set trianglesSource(v) {
this.i.trianglesSource = v;
}
/**
* The name of the property of the TrianglesSource items which, for each triangle, contains the index of the first vertex point in the ItemsSource.
*/
get triangleVertexMemberPath1() {
return this.i.xn;
}
set triangleVertexMemberPath1(v) {
this.i.xn = v;
}
/**
* The name of the property of the TrianglesSource items which, for each triangle, contains the index of the second vertex point in the ItemsSource.
*/
get triangleVertexMemberPath2() {
return this.i.xp;
}
set triangleVertexMemberPath2(v) {
this.i.xp = v;
}
/**
* The name of the property of the TrianglesSource items which, for each triangle, contains the index of the third vertex point in the ItemsSource.
*/
get triangleVertexMemberPath3() {
return this.i.xr;
}
set triangleVertexMemberPath3(v) {
this.i.xr = v;
}
/**
* Gets whether or not this series is a shape series
*/
get isShape() {
return this.i.fw;
}
/**
* Overridden by derived series classes to indicate when marker-less display is preferred or not.
*/
get isMarkerlessDisplayPreferred() {
return this.i.fk;
}
/**
* Gets or sets the label displayed before series X value in the Data Legend.
*/
get xMemberAsLegendLabel() {
return this.i.xv;
}
set xMemberAsLegendLabel(v) {
this.i.xv = v;
}
/**
* Gets or sets the label displayed before series Y value in the Data Legend.
*/
get yMemberAsLegendLabel() {
return this.i.x3;
}
set yMemberAsLegendLabel(v) {
this.i.x3 = v;
}
/**
* Gets or sets the unit after displayed after series X value in the Data Legend.
*/
get xMemberAsLegendUnit() {
return this.i.xx;
}
set xMemberAsLegendUnit(v) {
this.i.xx = v;
}
/**
* Gets or sets the unit after displayed after series Y value in the Data Legend.
*/
get yMemberAsLegendUnit() {
return this.i.x5;
}
set yMemberAsLegendUnit(v) {
this.i.x5 = 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.kp(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.mc(memberPathName);
return (iv);
}
/**
* Determine if object can be used as YAxis
* @param axis * The object to check
*/
canUseAsYAxis(axis) {
let iv = this.i.xf(axis);
return (iv);
}
/**
* Determine if object can be used as XAxis
* @param axis * The object to check
*/
canUseAsXAxis(axis) {
let iv = this.i.xe(axis);
return (iv);
}
/**
* Raised when the status of an ongoing Triangulation has changed.
*/
get triangulationStatusChanged() {
if (this._triangulationStatusChanged == null) {
this._triangulationStatusChanged = new EventEmitter();
this.i.triangulationStatusChanged = delegateCombine(this.i.triangulationStatusChanged, (o, e) => {
this._runInZone(() => {
let outerArgs = new IgxTriangulationStatusEventArgs();
outerArgs._provideImplementation(e);
if (this.beforeTriangulationStatusChanged) {
this.beforeTriangulationStatusChanged(this, outerArgs);
}
this._triangulationStatusChanged.emit({
sender: this,
args: outerArgs
});
});
});
}
return this._triangulationStatusChanged;
}
}
IgxScatterTriangulationSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxScatterTriangulationSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
IgxScatterTriangulationSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxScatterTriangulationSeriesComponent, selector: "ng-component", inputs: { xMemberPath: "xMemberPath", yMemberPath: "yMemberPath", xAxis: "xAxis", yAxis: "yAxis", trianglesSource: "trianglesSource", triangleVertexMemberPath1: "triangleVertexMemberPath1", triangleVertexMemberPath2: "triangleVertexMemberPath2", triangleVertexMemberPath3: "triangleVertexMemberPath3", xMemberAsLegendLabel: "xMemberAsLegendLabel", yMemberAsLegendLabel: "yMemberAsLegendLabel", xMemberAsLegendUnit: "xMemberAsLegendUnit", yMemberAsLegendUnit: "yMemberAsLegendUnit" }, outputs: { triangulationStatusChanged: "triangulationStatusChanged" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
return IgxScatterTriangulationSeriesComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxScatterTriangulationSeriesComponent, decorators: [{
type: Component,
args: [{
template: ``,
}]
}], ctorParameters: function () { return []; }, propDecorators: { xMemberPath: [{
type: Input
}], yMemberPath: [{
type: Input
}], xAxis: [{
type: Input
}], yAxis: [{
type: Input
}], trianglesSource: [{
type: Input
}], triangleVertexMemberPath1: [{
type: Input
}], triangleVertexMemberPath2: [{
type: Input
}], triangleVertexMemberPath3: [{
type: Input
}], xMemberAsLegendLabel: [{
type: Input
}], yMemberAsLegendLabel: [{
type: Input
}], xMemberAsLegendUnit: [{
type: Input
}], yMemberAsLegendUnit: [{
type: Input
}], triangulationStatusChanged: [{
type: Output
}] } });