igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
1,441 lines (1,439 loc) • 60.3 kB
JavaScript
import { Output, EventEmitter, Component, ViewContainerRef, ViewChild, ContentChildren, Input, ChangeDetectionStrategy } from '@angular/core';
import { Treemap } from "./Treemap";
import { toPoint, ensureEnum, brushToString, stringToBrush, ensureBool, toSpinal, initializePropertiesFromCss, NamePatcher, fromBrushCollection, toBrushCollection } from "igniteui-angular-core";
import { FontInfo } from "igniteui-angular-core";
import { AngularRenderer } from "igniteui-angular-core";
import { delegateCombine } from "igniteui-angular-core";
import { DataChartStylingDefaults } from './DataChartStylingDefaults';
import { IgxTreemapNodeStyleMappingComponent } from './igx-treemap-node-style-mapping-component';
import { IgxTreemapNodeStyleMappingCollection } from './igx-treemap-node-style-mapping-collection';
import { CollectionAdapter } from "igniteui-angular-core";
import { NotifyCollectionChangedAction } from "igniteui-angular-core";
import { TreemapFillScaleMode_$type } from "./TreemapFillScaleMode";
import { IgxTreemapNodeStylingEventArgs } from "./igx-treemap-node-styling-event-args";
import { TreemapOrientation_$type } from './TreemapOrientation';
import { TreemapLayoutType_$type } from './TreemapLayoutType';
import { IgxTreemapNodePointerEventArgs } from './igx-treemap-node-pointer-event-args';
import { TreemapHeaderDisplayMode_$type } from './TreemapHeaderDisplayMode';
import { HorizontalAlignment_$type } from "igniteui-angular-core";
import { VerticalAlignment_$type } from "igniteui-angular-core";
import { TreemapLabelHorizontalFitMode_$type } from './TreemapLabelHorizontalFitMode';
import { TreemapLabelVerticalFitMode_$type } from './TreemapLabelVerticalFitMode';
import { TreemapHighlightingMode_$type } from './TreemapHighlightingMode';
import { TreemapHighlightedValueDisplayMode_$type } from './TreemapHighlightedValueDisplayMode';
import * as i0 from "@angular/core";
var IgxTreemapComponent = /** @class */ /*@__PURE__*/ (function () {
function IgxTreemapComponent(renderer, _elRef, ngZone, injector, componentFactoryResolver) {
var _this = this;
this.renderer = renderer;
this._elRef = _elRef;
this.ngZone = ngZone;
this.injector = injector;
this.componentFactoryResolver = componentFactoryResolver;
/**
* The style mappings actually present in the chart. Do not directly modify this array.
* This array's contents can be modified by causing Angular to reproject the child content.
* Or adding and removing stye mappings from the manual style mapping collection on the styleMappings property.
*/
this.actualStyleMappings = [];
this._styleMappings = null;
this._styleMappingsAdapter = null;
this._wrapper = null;
this._root = null;
this._implementation = null;
this.__p = null;
this._hasUserValues = new Set();
this._stylingContainer = null;
this._stylingParent = null;
this._inStyling = false;
this._nodeStyling = null;
this._nodeRenderStyling = null;
this._nodePointerOver = null;
this._nodePointerEnter = null;
this._nodePointerLeave = null;
this._nodePointerPressed = null;
this._nodePointerReleased = null;
this._zoneRunner = null;
if (this._styling) {
NamePatcher.ensureStylablePatched(Object.getPrototypeOf(this));
}
this._implementation = this.createImplementation();
if (renderer) {
this.container = renderer.createElement("div");
renderer.appendChild(_elRef.element.nativeElement, this.container);
renderer.setStyle(this.container, "display", "block");
renderer.setStyle(this.container, "width", "100%");
renderer.setStyle(this.container, "height", "100%");
}
var root;
root = this.container;
if (this.container != null) {
root = this.container;
}
if (root && root.nativeElement) {
root = root.nativeElement;
}
this._root = root;
var treemap = this.i;
this._treeMap = treemap;
this._styleMappingsAdapter = new CollectionAdapter([], this.i.styleMappings, this.actualStyleMappings, function (c) { return c.i; }, function (i) {
if (_this._root && _this._root.parentElement) {
i._styling(_this._root, _this, _this);
}
}, function (i) { });
if (renderer) {
var ren = new AngularRenderer(root, this.renderer, window.document, this.ngZone, true, DataChartStylingDefaults);
this._wrapper = ren;
treemap.provideContainer(ren);
treemap.notifySizeChanged();
ren.addSizeWatcher(function () {
_this._treeMap.notifySizeChanged();
});
}
}
Object.defineProperty(IgxTreemapComponent.prototype, "height", {
get: function () {
return this._height;
},
set: function (value) {
this._height = value;
this.renderer.setStyle(this._elRef.element.nativeElement, "height", value);
this._treeMap.notifySizeChanged();
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "width", {
get: function () {
return this._width;
},
set: function (value) {
this._width = value;
this.renderer.setStyle(this._elRef.element.nativeElement, "width", value);
this._treeMap.notifySizeChanged();
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "styleMappings", {
/**
* A collection or manually added axes for the chart.
*/
get: function () {
var _this = this;
if (this._styleMappings === null) {
var coll = new IgxTreemapNodeStyleMappingCollection();
var inner = coll._innerColl;
inner.addListener(function (sender, e) {
switch (e.action) {
case NotifyCollectionChangedAction.Add:
_this._styleMappingsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0));
break;
case NotifyCollectionChangedAction.Remove:
_this._styleMappingsAdapter.removeManualItemAt(e.oldStartingIndex);
break;
case NotifyCollectionChangedAction.Replace:
_this._styleMappingsAdapter.removeManualItemAt(e.oldStartingIndex);
_this._styleMappingsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0));
break;
case NotifyCollectionChangedAction.Reset:
_this._styleMappingsAdapter.clearManualItems();
break;
}
});
this._styleMappings = coll;
}
return this._styleMappings;
},
enumerable: false,
configurable: true
});
// supports angular themes or custom properties set in CSS
IgxTreemapComponent.prototype.updateStyle = function () {
this._styling(this._root, this);
};
IgxTreemapComponent.prototype.ngOnDestroy = function () {
this._treeMap.destroy();
this._wrapper.destroy();
};
IgxTreemapComponent.prototype.ngAfterContentInit = function () {
this._styleMappingsAdapter.updateQuery(this.contentStyleMappings);
this._styling(this._root, this);
if (this.actualStyleMappings && this.actualStyleMappings.length > 0) {
var currStyleMapping = this.actualStyleMappings;
for (var i = 0; i < currStyleMapping.length; i++) {
currStyleMapping[i]._styling(this._root, this, this);
}
}
this.i.notifySizeChanged();
this.updateStyle();
};
IgxTreemapComponent.prototype.createImplementation = function () {
return new Treemap();
};
Object.defineProperty(IgxTreemapComponent.prototype, "i", {
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "valueMemberPath", {
/**
* Gets or sets path to use to get the values from the items.
*/
get: function () {
return this.i.hx;
},
set: function (v) {
this.i.hx = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "rootTitle", {
/**
* Gets or sets the root title to use for breadcrumbs.
*/
get: function () {
return this.i.hn;
},
set: function (v) {
this.i.hn = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "breadcrumbSequence", {
/**
* Gets or sets the root title to use for breadcrumbs.
*/
get: function () {
return this.i.fh;
},
set: function (v) {
this.i.fh = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "parentIdMemberPath", {
/**
* Gets or sets the path to use to get the Parent of the items.
*/
get: function () {
return this.i.hb;
},
set: function (v) {
this.i.hb = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "labelMemberPath", {
/**
* Gets or sets the path to use to get the Label of the items.
*/
get: function () {
return this.i.gt;
},
set: function (v) {
this.i.gt = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "customValueMemberPath", {
/**
* Gets or sets the path to use to get the custom value of the items.
*/
get: function () {
return this.i.fk;
},
set: function (v) {
this.i.fk = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "idMemberPath", {
/**
* Gets or sets the path to use to get the id of the items.
*/
get: function () {
return this.i.gj;
},
set: function (v) {
this.i.gj = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "dataSource", {
/**
* Gets or sets the (possibly hierarchical) data to assign to the TreeMap.
*/
get: function () {
return this.i.dataSource;
},
set: function (v) {
this.i.dataSource = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "highlightedDataSource", {
/**
* Gets or sets the data to highlight.
*/
get: function () {
return this.i.highlightedDataSource;
},
set: function (v) {
this.i.highlightedDataSource = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "highlightedValueMemberPath", {
/**
* Gets or sets the highlighted value mapping property.
*/
get: function () {
return this.i.gb;
},
set: function (v) {
this.i.gb = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "highlightedValueOpacity", {
/**
* Gets or sets the opacity applied to the node underneath the highlighted value.
*/
get: function () {
return this.i.dt;
},
set: function (v) {
this.i.dt = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "highlightedValuesDisplayMode", {
/**
* Gets or sets the display mode for highlighted values.
*/
get: function () {
return this.i.l;
},
set: function (v) {
this.i.l = ensureEnum(TreemapHighlightedValueDisplayMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "fillBrushes", {
/**
* Gets or sets brushes to use for the fill scale.
*/
get: function () {
return fromBrushCollection(this.i.b);
},
set: function (v) {
this.i.b = toBrushCollection(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "fillScaleMode", {
/**
* Gets or sets mode to use for the fill scale.
*/
get: function () {
return this.i.d;
},
set: function (v) {
this.i.d = ensureEnum(TreemapFillScaleMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "isFillScaleLogarithmic", {
/**
* Gets or sets whether the fill scale is logarithmic.
*/
get: function () {
return this.i.bx;
},
set: function (v) {
this.i.bx = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "fillScaleLogarithmBase", {
/**
* Gets or sets the logarithm base to use if the fill scale is logarithmic.
*/
get: function () {
return this.i.ez;
},
set: function (v) {
this.i.ez = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "fillScaleMinimumValue", {
/**
* Gets or sets the minimum value to use for the fill scale.
*/
get: function () {
return this.i.dl;
},
set: function (v) {
this.i.dl = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "fillScaleMaximumValue", {
/**
* Gets or sets the maximum value to use for the fill scale.
*/
get: function () {
return this.i.dk;
},
set: function (v) {
this.i.dk = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "labelVerticalFitMode", {
/**
* Gets or sets the vertical fit mode to use for the node labels.
*/
get: function () {
return this.i.r;
},
set: function (v) {
this.i.r = ensureEnum(TreemapLabelVerticalFitMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "labelHorizontalFitMode", {
/**
* Gets or sets the horizontal fit mode to use for the node labels.
*/
get: function () {
return this.i.o;
},
set: function (v) {
this.i.o = ensureEnum(TreemapLabelHorizontalFitMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "overlayHeaderHoverBackground", {
/**
* Gets or sets the background to use for the overlay header when it is hovered.
*/
get: function () {
return brushToString(this.i.jx);
},
set: function (v) {
this.i.jx = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "headerHoverBackground", {
/**
* Gets or sets the background to use for the header when it is hovered.
*/
get: function () {
return brushToString(this.i.jr);
},
set: function (v) {
this.i.jr = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "headerBackground", {
/**
* Gets or sets the background to use for the header.
*/
get: function () {
return brushToString(this.i.jp);
},
set: function (v) {
this.i.jp = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "overlayHeaderBackground", {
/**
* Gets or sets the background to use for the overlay header.
*/
get: function () {
return brushToString(this.i.jw);
},
set: function (v) {
this.i.jw = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "headerTextColor", {
/**
* Gets or sets the text color to use for the header.
*/
get: function () {
return brushToString(this.i.ju);
},
set: function (v) {
this.i.ju = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "headerDarkTextColor", {
/**
* Gets or sets the dark text color to use for the header.
*/
get: function () {
return brushToString(this.i.jq);
},
set: function (v) {
this.i.jq = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "textColor", {
/**
* Gets or sets the text color to use for the nodes.
*/
get: function () {
return brushToString(this.i.j7);
},
set: function (v) {
this.i.j7 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "darkTextColor", {
/**
* Gets or sets the dark text color to use for the nodes.
*/
get: function () {
return brushToString(this.i.jo);
},
set: function (v) {
this.i.jo = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "headerHoverTextColor", {
/**
* Gets or sets the text color to use for the header.
*/
get: function () {
return brushToString(this.i.jt);
},
set: function (v) {
this.i.jt = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "headerHoverDarkTextColor", {
/**
* Gets or sets the dark text color to use for the header when hovered.
*/
get: function () {
return brushToString(this.i.js);
},
set: function (v) {
this.i.js = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "textStyle", {
/**
* Gets or sets the font to use for content nodes
*/
get: function () {
if (this.i.a8 == null) {
return null;
}
return this.i.a8.fontString;
},
set: function (v) {
var fi = new FontInfo();
fi.fontString = v;
this.i.a8 = fi;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "headerTextStyle", {
/**
* Gets or sets the font to use for header nodes
*/
get: function () {
if (this.i.a6 == null) {
return null;
}
return this.i.a6.fontString;
},
set: function (v) {
var fi = new FontInfo();
fi.fontString = v;
this.i.a6 = fi;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "headerDisplayMode", {
/**
* Gets or sets the font to use for header nodes
*/
get: function () {
return this.i.j;
},
set: function (v) {
this.i.j = ensureEnum(TreemapHeaderDisplayMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "headerLabelLeftMargin", {
/**
* Gets or sets the left margin to use for the header.
*/
get: function () {
return this.i.dq;
},
set: function (v) {
this.i.dq = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "headerLabelTopMargin", {
/**
* Gets or sets the top margin to use for the header.
*/
get: function () {
return this.i.ds;
},
set: function (v) {
this.i.ds = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "headerLabelRightMargin", {
/**
* Gets or sets the right margin to use for the header.
*/
get: function () {
return this.i.dr;
},
set: function (v) {
this.i.dr = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "headerLabelBottomMargin", {
/**
* Gets or sets the bottom margin to use for the header.
*/
get: function () {
return this.i.dp;
},
set: function (v) {
this.i.dp = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "overlayHeaderLabelLeftMargin", {
/**
* Gets or sets the left margin to use for the overlay header.
*/
get: function () {
return this.i.d3;
},
set: function (v) {
this.i.d3 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "overlayHeaderLabelTopMargin", {
/**
* Gets or sets the top margin to use for the overlay header.
*/
get: function () {
return this.i.d5;
},
set: function (v) {
this.i.d5 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "overlayHeaderLabelRightMargin", {
/**
* Gets or sets the right margin to use for the overlay header.
*/
get: function () {
return this.i.d4;
},
set: function (v) {
this.i.d4 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "overlayHeaderLabelBottomMargin", {
/**
* Gets or sets the bottom margin to use for the overlay header.
*/
get: function () {
return this.i.d2;
},
set: function (v) {
this.i.d2 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "labelLeftMargin", {
/**
* Gets or sets the left margin to use for the labels.
*/
get: function () {
return this.i.dx;
},
set: function (v) {
this.i.dx = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "labelTopMargin", {
/**
* Gets or sets the top margin to use for the labels.
*/
get: function () {
return this.i.dz;
},
set: function (v) {
this.i.dz = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "labelRightMargin", {
/**
* Gets or sets the right margin to use for the labels.
*/
get: function () {
return this.i.dy;
},
set: function (v) {
this.i.dy = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "labelBottomMargin", {
/**
* Gets or sets the bottom margin to use for the labels.
*/
get: function () {
return this.i.dw;
},
set: function (v) {
this.i.dw = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeLeftMargin", {
/**
* Gets or sets the left margin to use for the parent nodes.
*/
get: function () {
return this.i.d8;
},
set: function (v) {
this.i.d8 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeTopMargin", {
/**
* Gets or sets the top margin to use for the parent nodes.
*/
get: function () {
return this.i.ec;
},
set: function (v) {
this.i.ec = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeRightMargin", {
/**
* Gets or sets the right margin to use for the parent nodes.
*/
get: function () {
return this.i.ea;
},
set: function (v) {
this.i.ea = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeBottomMargin", {
/**
* Gets or sets the bottom margin to use for the parent nodes.
*/
get: function () {
return this.i.d6;
},
set: function (v) {
this.i.d6 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeLeftPadding", {
/**
* Gets or sets the left padding to use for the parent nodes.
*/
get: function () {
return this.i.d9;
},
set: function (v) {
this.i.d9 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeTopPadding", {
/**
* Gets or sets the top padding to use for the parent nodes.
*/
get: function () {
return this.i.ed;
},
set: function (v) {
this.i.ed = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeRightPadding", {
/**
* Gets or sets the right padding to use for the parent nodes.
*/
get: function () {
return this.i.eb;
},
set: function (v) {
this.i.eb = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeBottomPadding", {
/**
* Gets or sets the bottom padding to use for the parent nodes.
*/
get: function () {
return this.i.d7;
},
set: function (v) {
this.i.d7 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "labelHorizontalAlignment", {
/**
* Gets or sets the horizontal alignment to use for the node labels.
*/
get: function () {
return this.i.ja;
},
set: function (v) {
this.i.ja = ensureEnum(HorizontalAlignment_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "labelVerticalAlignment", {
/**
* Gets or sets the vertical alignment to use for the node labels.
*/
get: function () {
return this.i.kd;
},
set: function (v) {
this.i.kd = ensureEnum(VerticalAlignment_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "headerHeight", {
/**
* Gets or sets the height to use for the header.
*/
get: function () {
return this.i.dn;
},
set: function (v) {
this.i.dn = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "outline", {
/**
* Gets or sets the outline to use for the nodes.
*/
get: function () {
return brushToString(this.i.jv);
},
set: function (v) {
this.i.jv = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "strokeThickness", {
/**
* Gets or sets the stroke thickness to use for the node outline.
*/
get: function () {
return this.i.es;
},
set: function (v) {
this.i.es = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "nodeOpacity", {
/**
* Gets or sets the opacity to use for the nodes.
*/
get: function () {
return this.i.d1;
},
set: function (v) {
this.i.d1 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "layoutOrientation", {
/**
* Gets or sets the orientation to use for the stripped and slice and dice layout types.
*/
get: function () {
return this.i.al;
},
set: function (v) {
this.i.al = ensureEnum(TreemapOrientation_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "layoutType", {
/**
* Gets or sets the type of layout to use for the nodes.
*/
get: function () {
return this.i.u;
},
set: function (v) {
this.i.u = ensureEnum(TreemapLayoutType_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "minimumDisplaySize", {
/**
* Gets or sets the minimum size (width or height) to display a node.
*/
get: function () {
return this.i.d0;
},
set: function (v) {
this.i.d0 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "transitionDuration", {
/**
* Gets or sets the number of milliseconds over which changes to the gauge should be animated.
*/
get: function () {
return this.i.e3;
},
set: function (v) {
this.i.e3 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "pixelScalingRatio", {
/**
* Gets or sets the scaling value used to affect the pixel density of the control.
* A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control
* to appear blurry.
*/
get: function () {
return this.i.ee;
},
set: function (v) {
this.i.ee = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "actualPixelScalingRatio", {
get: function () {
return this.i.dg;
},
set: function (v) {
this.i.dg = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "interactionPixelScalingRatio", {
/**
* Gets or sets the scaling value used to affect the pixel density of the control while it is animating.
* A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control
* to appear blurry.
*/
get: function () {
return this.i.dv;
},
set: function (v) {
this.i.dv = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "actualInteractionPixelScalingRatio", {
/**
* Gets or sets the resolved scaling value used to affect the pixel density of the control while it is animating.
* A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control
* to appear blurry.
*/
get: function () {
return this.i.df;
},
set: function (v) {
this.i.df = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "highlightingTransitionDuration", {
/**
* Gets or sets the number of milliseconds over which the highlighting effect will render.
*/
get: function () {
return this.i.e1;
},
set: function (v) {
this.i.e1 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "highlightingMode", {
/**
* Gets or sets the highlighting mode to use.
*/
get: function () {
return this.i.aw;
},
set: function (v) {
this.i.aw = ensureEnum(TreemapHighlightingMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "actualHighlightingMode", {
/**
* Gets the actual highlighting mode used.
*/
get: function () {
return this.i.au;
},
set: function (v) {
this.i.au = ensureEnum(TreemapHighlightingMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "highlightingFadeOpacity", {
/**
* Gets or sets the opacity to use for nodes that are not highlighted when HighlightingMode is set to FadeOthers.
*/
get: function () {
return this.i.du;
},
set: function (v) {
this.i.du = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "animating", {
get: function () {
return this.i.bs;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "focusItem", {
/**
* Gets or sets the item to drill to in the treemap.
*/
get: function () {
return this.i.e5;
},
set: function (v) {
this.i.e5 = v;
},
enumerable: false,
configurable: true
});
IgxTreemapComponent.prototype.findByName = function (name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
if (this.styleMappings != null && this.styleMappings.findByName && this.styleMappings.findByName(name)) {
return this.styleMappings.findByName(name);
}
return null;
};
Object.defineProperty(IgxTreemapComponent.prototype, "hasUserValues", {
get: function () {
return this._hasUserValues;
},
enumerable: false,
configurable: true
});
IgxTreemapComponent.prototype.__m = function (propertyName) {
if (!this._inStyling) {
this._hasUserValues.add(propertyName);
}
};
IgxTreemapComponent.prototype._styling = function (container, component, parent) {
if (this._inStyling) {
return;
}
this._inStyling = true;
this._stylingContainer = container;
this._stylingParent = component;
var genericPrefix = "";
var typeName = this.i.$type.name;
if (typeName.indexOf("Xam") === 0) {
typeName = typeName.substring(3);
}
genericPrefix = toSpinal("TreemapComponent");
var additionalPrefixes = [];
var prefix = toSpinal(typeName);
additionalPrefixes.push(prefix + "-");
var b = this.i.$type.baseType;
while (b && b.name != "Object" &&
b.name != "Base" &&
b.name != "Control" &&
b.Name != "DependencyObject" &&
b.Name != "FrameworkElement") {
typeName = b.name;
if (typeName.indexOf("Xam") === 0) {
typeName = typeName.substring(3);
}
var basePrefix = toSpinal(typeName);
additionalPrefixes.push(basePrefix + "-");
b = b.baseType;
}
if (parent) {
var parentTypeName = parent.i.$type.name;
if (parentTypeName.indexOf("Xam") === 0) {
parentTypeName = parentTypeName.substring(3);
}
var parentPrefix = toSpinal(parentTypeName);
additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-");
additionalPrefixes.push(parentPrefix + "-" + prefix + "-");
}
initializePropertiesFromCss(container, this, genericPrefix + "-", this.hasUserValues, false, additionalPrefixes);
if (this._otherStyling) {
this._otherStyling(container, component, parent);
}
this._inStyling = false;
};
IgxTreemapComponent.prototype.notifySizeChanged = function () {
this.i.notifySizeChanged();
};
/**
* Returns visuals as a serialized string.
*/
IgxTreemapComponent.prototype.exportSerializedVisualData = function () {
var iv = this.i.fn();
return (iv);
};
IgxTreemapComponent.prototype.markDirty = function () {
this.i.ic();
};
IgxTreemapComponent.prototype.onDetachedFromUI = function () {
this.i.onDetachedFromUI();
};
IgxTreemapComponent.prototype.onAttachedToUI = function () {
this.i.onAttachedToUI();
};
IgxTreemapComponent.prototype.flush = function () {
this.i.h9();
};
IgxTreemapComponent.prototype.notifySetItem = function (source_, index, oldItem, newItem) {
this.i.ii(source_, index, oldItem, newItem);
};
/**
* Manually notifies the treemap's data source that the data it has bound to has been cleared and needs to be re-examined.
* This should not be called if the data that the pie chart is bound to is already observable.
* @param source_ * The data source.
*/
IgxTreemapComponent.prototype.notifyClearItems = function (source_) {
this.i.ie(source_);
};
IgxTreemapComponent.prototype.notifyInsertItem = function (source_, index, newItem) {
this.i.ig(source_, index, newItem);
};
IgxTreemapComponent.prototype.notifyRemoveItem = function (source_, index, oldItem) {
this.i.ih(source_, index, oldItem);
};
IgxTreemapComponent.prototype.simulateHover = function (point) {
this.i.i2(toPoint(point));
};
Object.defineProperty(IgxTreemapComponent.prototype, "nodeStyling", {
/**
* Fired when a node is being styled. Provides an opportunity to customize node styling.
*/
get: function () {
var _this = this;
if (this._nodeStyling == null) {
this._nodeStyling = new EventEmitter();
this.i.nodeStyling = delegateCombine(this.i.nodeStyling, function (o, e) {
_this._runInZone(function () {
var outerArgs = new IgxTreemapNodeStylingEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeNodeStyling) {
_this.beforeNodeStyling(_this, outerArgs);
}
_this._nodeStyling.emit({
sender: _this,
args: outerArgs
});
});
});
}
return this._nodeStyling;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "nodeRenderStyling", {
/**
* Fired before a node is rendered for last minute style changes.
*/
get: function () {
var _this = this;
if (this._nodeRenderStyling == null) {
this._nodeRenderStyling = new EventEmitter();
this.i.nodeRenderStyling = delegateCombine(this.i.nodeRenderStyling, function (o, e) {
_this._runInZone(function () {
var outerArgs = new IgxTreemapNodeStylingEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeNodeRenderStyling) {
_this.beforeNodeRenderStyling(_this, outerArgs);
}
_this._nodeRenderStyling.emit({
sender: _this,
args: outerArgs
});
});
});
}
return this._nodeRenderStyling;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "nodePointerOver", {
/**
* Fired with the pointer is moving over a node.
*/
get: function () {
var _this = this;
if (this._nodePointerOver == null) {
this._nodePointerOver = new EventEmitter();
this.i.nodePointerOver = delegateCombine(this.i.nodePointerOver, function (o, e) {
var outerArgs = new IgxTreemapNodePointerEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeNodePointerOver) {
_this.beforeNodePointerOver(_this, outerArgs);
}
_this._nodePointerOver.emit({
sender: _this,
args: outerArgs
});
});
}
return this._nodePointerOver;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "nodePointerEnter", {
/**
* Fired when the pointer enters a node.
*/
get: function () {
var _this = this;
if (this._nodePointerEnter == null) {
this._nodePointerEnter = new EventEmitter();
this.i.nodePointerEnter = delegateCombine(this.i.nodePointerEnter, function (o, e) {
var outerArgs = new IgxTreemapNodePointerEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeNodePointerEnter) {
_this.beforeNodePointerEnter(_this, outerArgs);
}
_this._nodePointerEnter.emit({
sender: _this,
args: outerArgs
});
});
}
return this._nodePointerEnter;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "nodePointerLeave", {
/**
* Fired when the pointer leaved a node.
*/
get: function () {
var _this = this;
if (this._nodePointerLeave == null) {
this._nodePointerLeave = new EventEmitter();
this.i.nodePointerLeave = delegateCombine(this.i.nodePointerLeave, function (o, e) {
var outerArgs = new IgxTreemapNodePointerEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeNodePointerLeave) {
_this.beforeNodePointerLeave(_this, outerArgs);
}
_this._nodePointerLeave.emit({
sender: _this,
args: outerArgs
});
});
}
return this._nodePointerLeave;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "nodePointerPressed", {
/**
* Fired when the pointer is pressed on a node.
*/
get: function () {
var _this = this;
if (this._nodePointerPressed == null) {
this._nodePointerPressed = new EventEmitter();
this.i.nodePointerPressed = delegateCombine(this.i.nodePointerPressed, function (o, e) {
_this._runInZone(function () {
var outerArgs = new IgxTreemapNodePointerEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeNodePointerPressed) {
_this.beforeNodePointerPressed(_this, outerArgs);
}
_this._nodePointerPressed.emit({
sender: _this,
args: outerArgs
});
});
});
}
return this._nodePointerPressed;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTreemapComponent.prototype, "nodePointerReleased", {
/**
* Fired when the pointer is released on a node.
*/
get: function () {
var _this = this;
if (this._nodePointerReleased == null) {
this._nodePointerReleased = new EventEmitter();
this.i.nodePointerReleased = delegateCombine(this.i.nodePointerReleased, function (o, e) {
_this._runInZone(function () {
var outerArgs = new IgxTreemapNodePointerEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeNodePointerReleased) {
_this.beforeNodePointerReleased(_this, outerArgs);
}
_this._nodePointerReleased.emit({
sender: _this,
args: outerArgs
});
});
});
}
return this._nodePointerReleased;
},
enumerable: false,
configurable: true
});
IgxTreemapComponent.prototype._runInZone = function (act) {
if (this._zoneRunner != null) {
this._zoneRunner(act);
}
else {
act();
}
};
IgxTreemapComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxTreemapComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component });
IgxTreemapComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxTreemapComponent, selector: "igx-treemap", inputs: { height: "height", width: "width", valueMemberPath: "valueMemberPath", rootTitle: "rootTitle", breadcrumbSequence: "breadcrumbSequence", parentIdMemberPath: "parentIdMemberPath", labelMemberPath: "labelMemberPath", customValueMemberPath: "customValueMemberPath", idMemberPath: "idMemberPath", dataSource: "dataSource", highlightedD