igniteui-angular-gauges
Version:
Ignite UI Angular gauge components.
268 lines (267 loc) • 8.41 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 { Base, fromEnum, markType } from "igniteui-angular-core";
import { StringBuilder } from "igniteui-angular-core";
/**
* @hidden
*/
export let LinearGraphVisualData = /*@__PURE__*/ (() => {
class LinearGraphVisualData extends Base {
constructor() {
super(...arguments);
this._scalePath = null;
this._backingPath = null;
this._underlayPath = null;
this._overlayPath = null;
this._scale = null;
this._scaleLabels = null;
this._scaleTickmarks = null;
this._ranges = null;
this._toolTip = null;
this._name = null;
this._viewport = null;
}
get scalePath() {
return this._scalePath;
}
set scalePath(a) {
this._scalePath = a;
}
get backingPath() {
return this._backingPath;
}
set backingPath(a) {
this._backingPath = a;
}
get underlayPath() {
return this._underlayPath;
}
set underlayPath(a) {
this._underlayPath = a;
}
get overlayPath() {
return this._overlayPath;
}
set overlayPath(a) {
this._overlayPath = a;
}
get scale() {
return this._scale;
}
set scale(a) {
this._scale = a;
}
get scaleLabels() {
return this._scaleLabels;
}
set scaleLabels(a) {
this._scaleLabels = a;
}
get scaleTickmarks() {
return this._scaleTickmarks;
}
set scaleTickmarks(a) {
this._scaleTickmarks = a;
}
get ranges() {
return this._ranges;
}
set ranges(a) {
this._ranges = a;
}
get toolTip() {
return this._toolTip;
}
set toolTip(a) {
this._toolTip = a;
}
get name() {
return this._name;
}
set name(a) {
this._name = a;
}
scaleByViewport() {
if (this.scalePath != null) {
this.scalePath.scaleByViewport(this.viewport);
}
if (this.backingPath != null) {
this.backingPath.scaleByViewport(this.viewport);
}
if (this.underlayPath != null) {
this.underlayPath.scaleByViewport(this.viewport);
}
if (this.overlayPath != null) {
this.overlayPath.scaleByViewport(this.viewport);
}
if (this.scaleLabels != null) {
for (let a of fromEnum(this.scaleLabels)) {
a.scaleByViewport(this.viewport);
}
}
if (this.scaleTickmarks != null) {
for (let b of fromEnum(this.scaleTickmarks)) {
if (b.tickPath != null) {
b.tickPath.scaleByViewport(this.viewport);
}
}
}
if (this.ranges != null) {
for (let c of fromEnum(this.ranges)) {
if (c.rangePath != null) {
c.rangePath.scaleByViewport(this.viewport);
}
}
}
}
serialize() {
let a = new StringBuilder(0);
let b = true;
a.u("{");
if (this.scalePath != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("scalePath: ");
a.u(this.scalePath.serialize());
}
if (this.backingPath != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("backingPath: ");
a.u(this.backingPath.serialize());
}
if (this.underlayPath != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("underlayPath: ");
a.u(this.underlayPath.serialize());
}
if (this.overlayPath != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("overlayPath: ");
a.u(this.overlayPath.serialize());
}
if (this.scaleLabels != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
let c = true;
a.l("scaleLabels: [");
for (let d of fromEnum(this.scaleLabels)) {
if (c) {
c = false;
}
else {
a.l(", ");
}
a.u(d.serialize());
}
a.u("]");
}
if (this.scaleTickmarks != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
let e = true;
a.l("scaleTickmarks: [");
for (let f of fromEnum(this.scaleTickmarks)) {
if (e) {
e = false;
}
else {
a.l(", ");
}
a.u(f.serialize());
}
a.u("]");
}
if (this.ranges != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
let g = true;
a.l("ranges: [");
for (let h of fromEnum(this.ranges)) {
if (g) {
g = false;
}
else {
a.l(", ");
}
a.u(h.serialize());
}
a.u("]");
}
if (this.name != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("name: '");
a.l(this.name);
a.u("'");
}
if (this.toolTip != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("toolTip: ");
a.l(this.toolTip.serialize());
}
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("viewport: {");
a.l("left: " + this.viewport.left + ", top: " + this.viewport.top + ", width: " + this.viewport.width + ", height: " + this.viewport.height);
a.u("}");
a.l("}");
return a.toString();
}
get viewport() {
return this._viewport;
}
set viewport(a) {
this._viewport = a;
}
}
LinearGraphVisualData.$t = markType(LinearGraphVisualData, 'LinearGraphVisualData');
return LinearGraphVisualData;
})();