igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
158 lines (155 loc) • 6.35 kB
JavaScript
import { __extends } from "tslib";
import { ConsolidatedItemsPosition_$type } from "./ConsolidatedItemsPosition";
import { IgcHorizontalAnchoredCategorySeriesComponent } from "./igc-horizontal-anchored-category-series-component";
import { ColumnSeries } from "./ColumnSeries";
import { getAllPropertyNames, toSpinal, ensureEnum, enumToString, toPoint, fromRect } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent column series.
* Compare values across categories by using vertical rectangles.
* Use it when the order of categories is not important or for displaying
* item counts such as a histogram.
*/
export var IgcColumnSeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcColumnSeriesComponent, _super);
function IgcColumnSeriesComponent() {
return _super.call(this) || this;
}
IgcColumnSeriesComponent.prototype.createImplementation = function () {
return new ColumnSeries();
};
Object.defineProperty(IgcColumnSeriesComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcColumnSeriesComponent.prototype.connectedCallback = function () {
if (_super.prototype["connectedCallback"]) {
_super.prototype["connectedCallback"].call(this);
}
if (this.i.connectedCallback) {
this.i.connectedCallback();
}
if (!this._attached) {
this._attached = true;
this._flushQueuedAttributes();
}
};
IgcColumnSeriesComponent.prototype.disconnectedCallback = function () {
if (_super.prototype["disconnectedCallback"]) {
_super.prototype["disconnectedCallback"].call(this);
}
if (this.i.disconnectedCallback) {
this.i.disconnectedCallback();
}
if (this._attached) {
this._attached = false;
}
};
Object.defineProperty(IgcColumnSeriesComponent, "observedAttributes", {
get: function () {
if (IgcColumnSeriesComponent._observedAttributesIgcColumnSeriesComponent == null) {
var names = getAllPropertyNames(IgcColumnSeriesComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcColumnSeriesComponent._observedAttributesIgcColumnSeriesComponent = names;
}
return IgcColumnSeriesComponent._observedAttributesIgcColumnSeriesComponent;
},
enumerable: false,
configurable: true
});
IgcColumnSeriesComponent.register = function () {
if (!IgcColumnSeriesComponent._isElementRegistered) {
IgcColumnSeriesComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcColumnSeriesComponent.htmlTagName, IgcColumnSeriesComponent);
}
};
Object.defineProperty(IgcColumnSeriesComponent.prototype, "isColumn", {
/**
* Gets whether the current series shows a column shape.
*/
get: function () {
return this.i.e2;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcColumnSeriesComponent.prototype, "isMarkerlessDisplayPreferred", {
/**
* Overridden by derived series classes to indicate when marker-less display is preferred or not.
*/
get: function () {
return this.i.fo;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcColumnSeriesComponent.prototype, "radiusX", {
/**
* Gets or sets the x-radius of the ellipse that is used to round the corners of the column.
*/
get: function () {
return this.i.adn;
},
set: function (v) {
this.i.adn = +v;
this._a("radiusX", this.i.adn);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcColumnSeriesComponent.prototype, "radiusY", {
/**
* Gets or sets the y-radius of the ellipse that is used to round the corners of the column.
*/
get: function () {
return this.i.ado;
},
set: function (v) {
this.i.ado = +v;
this._a("radiusY", this.i.ado);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcColumnSeriesComponent.prototype, "consolidatedColumnVerticalPosition", {
/**
* The positioning logic to use for columns which have been consolidated into a single visual element.
*/
get: function () {
return this.i.adl;
},
set: function (v) {
this.i.adl = ensureEnum(ConsolidatedItemsPosition_$type, v);
this._a("consolidatedColumnVerticalPosition", enumToString(ConsolidatedItemsPosition_$type, this.i.adl));
},
enumerable: false,
configurable: true
});
/**
* If possible, will return the best available value bounding box within the series that has the best value match for the world position provided.
* @param world * The world coordinate for which to get a value bounding box for
*/
IgcColumnSeriesComponent.prototype.getSeriesValueBoundingBox = function (world) {
var iv = this.i.w8(toPoint(world));
return fromRect(iv);
};
/**
* For a category plotted series, returns the current width of the items within the categories. This only returns a value if the items have some form of width (e.g. columns, bars, etc.) otherwise 0 is returned.
*/
IgcColumnSeriesComponent.prototype.getItemSpan = function () {
var iv = this.i.i3();
return (iv);
};
IgcColumnSeriesComponent._observedAttributesIgcColumnSeriesComponent = null;
IgcColumnSeriesComponent.htmlTagName = "igc-column-series";
IgcColumnSeriesComponent._isElementRegistered = false;
return IgcColumnSeriesComponent;
}(IgcHorizontalAnchoredCategorySeriesComponent));