igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
157 lines (153 loc) • 5.34 kB
JavaScript
import { __extends } from "tslib";
import { IgrCategoryAxisBase } from "./igr-category-axis-base";
import { IgrNumericAxisBase } from "./igr-numeric-axis-base";
import { IgrFragmentBase } from "./igr-fragment-base";
import { ColumnFragment } from "./ColumnFragment";
import { toPoint, fromRect } from "igniteui-react-core";
/**
* Represents one part of a StackedColumnSeries.
*/
var IgrColumnFragment = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgrColumnFragment, _super);
function IgrColumnFragment(props) {
return _super.call(this, props) || this;
}
IgrColumnFragment.prototype.createImplementation = function () {
return new ColumnFragment();
};
Object.defineProperty(IgrColumnFragment.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrColumnFragment.prototype, "isColumn", {
/**
* Gets whether the current series shows a column shape.
*/
get: function () {
return this.i.e1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrColumnFragment.prototype, "isMarkerlessDisplayPreferred", {
/**
* Overridden by derived series classes to indicate when marker-less display is preferred or not.
*/
get: function () {
return this.i.fm;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrColumnFragment.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.adi;
},
set: function (v) {
this.i.adi = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrColumnFragment.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.adj;
},
set: function (v) {
this.i.adj = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrColumnFragment.prototype, "fragmentXAxis", {
/**
* Gets or sets the effective x-axis for this series.
*/
get: function () {
var r = this.i.fragmentXAxis;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgrCategoryAxisBase._createFromInternal(r);
if (e) {
e._implementation = r;
}
r.externalObject = e;
}
return r.externalObject;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrColumnFragment.prototype, "fragmentYAxis", {
/**
* Gets or sets the effective y-axis for this series.
*/
get: function () {
var r = this.i.fragmentYAxis;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgrNumericAxisBase._createFromInternal(r);
if (e) {
e._implementation = r;
}
r.externalObject = e;
}
return r.externalObject;
},
enumerable: false,
configurable: true
});
IgrColumnFragment.prototype._styling = function (container, component, parent) {
_super.prototype._styling.call(this, container, component, parent);
this._inStyling = true;
if (this.fragmentXAxis && this.fragmentXAxis._styling) {
this.fragmentXAxis._styling(container, component, this);
}
if (this.fragmentYAxis && this.fragmentYAxis._styling) {
this.fragmentYAxis._styling(container, component, this);
}
this._inStyling = false;
};
/**
* 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
*/
IgrColumnFragment.prototype.getSeriesValueBoundingBox = function (world) {
var iv = this.i.ws(toPoint(world));
return fromRect(iv);
};
/**
* Gets the item that is the best match for the specified world coordinates.
* @param world * The world coordinates to use.
*/
IgrColumnFragment.prototype.getItem = function (world) {
var iv = this.i.ko(toPoint(world));
return (iv);
};
/**
* Gets the index of the item that resides at the provided world coordinates.
* @param world * The world coordinates of the requested item.
*/
IgrColumnFragment.prototype.getItemIndex = function (world) {
var iv = this.i.j4(toPoint(world));
return (iv);
};
return IgrColumnFragment;
}(IgrFragmentBase));
export { IgrColumnFragment };