igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
118 lines (117 loc) • 4.24 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends } from "tslib";
import { Base, markType } from "igniteui-react-core";
import { PointData } from "igniteui-react-core";
import { SizeData } from "igniteui-react-core";
import { StringBuilder } from "igniteui-react-core";
/**
* @hidden
*/
var AxisLabelVisualData = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(AxisLabelVisualData, _super);
function AxisLabelVisualData() {
var _this = _super.call(this) || this;
_this._labelValue = null;
_this._labelPosition = 0;
_this._position = null;
_this._panelPosition = null;
_this._appearance = null;
_this._size = null;
_this.position = new PointData(NaN, NaN);
_this.size = new SizeData(NaN, NaN);
_this.panelPosition = new PointData(NaN, NaN);
return _this;
}
Object.defineProperty(AxisLabelVisualData.prototype, "labelValue", {
get: function () {
return this._labelValue;
},
set: function (a) {
this._labelValue = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AxisLabelVisualData.prototype, "labelPosition", {
get: function () {
return this._labelPosition;
},
set: function (a) {
this._labelPosition = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AxisLabelVisualData.prototype, "position", {
get: function () {
return this._position;
},
set: function (a) {
this._position = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AxisLabelVisualData.prototype, "panelPosition", {
get: function () {
return this._panelPosition;
},
set: function (a) {
this._panelPosition = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AxisLabelVisualData.prototype, "appearance", {
get: function () {
return this._appearance;
},
set: function (a) {
this._appearance = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AxisLabelVisualData.prototype, "size", {
get: function () {
return this._size;
},
set: function (a) {
this._size = a;
},
enumerable: false,
configurable: true
});
AxisLabelVisualData.prototype.serialize = function () {
var a = new StringBuilder(0);
a.u("{");
a.u("position: " + "{ x: " + this.position.x + ", y: " + this.position.y + "},");
a.u("size: " + "{ width: " + this.size.width + ", height: " + this.size.height + "},");
a.u("labelPosition: " + this.labelPosition + ",");
a.u("appearance: " + (this.appearance != null ? this.appearance.serialize() : "null"));
a.u("}");
return a.toString();
};
AxisLabelVisualData.prototype.h = function (a, b) {
if (b) {
this.labelPosition = (this.labelPosition - a.left) / a.width;
}
else {
this.labelPosition = (this.labelPosition - a.top) / a.height;
}
var c = (this.position.x - a.left) / a.width;
var d = (this.position.y - a.top) / a.height;
this.position = new PointData(c, d);
var e = (this.size.width) / a.width;
var f = (this.size.height) / a.height;
this.size = new SizeData(e, f);
};
AxisLabelVisualData.$t = markType(AxisLabelVisualData, 'AxisLabelVisualData');
return AxisLabelVisualData;
}(Base));
export { AxisLabelVisualData };