UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

416 lines (415 loc) 14.4 kB
/* 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, typeCast, Boolean_$type, String_$type, fromEnum, markType } from "igniteui-react-core"; import { IVisualData_$type } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { RectData } from "igniteui-react-core"; import { ColorData } from "igniteui-react-core"; import { StringBuilder } from "igniteui-react-core"; import { stringJoin, stringReplace } from "igniteui-react-core"; /** * @hidden */ export let DataLegendVisualData = /*@__PURE__*/ (() => { class DataLegendVisualData extends Base { static serialize1(a) { let b = typeCast(RectData.$, a); if (b != null) { return "{ left: " + b.left + ", top: " + b.top + ", width: " + b.width + ", height: " + b.height + " }"; } let c = typeCast(ColorData.$, a); if (c != null) { return "{ a: " + c.a + ", r: " + c.r + ", g: " + c.g + ", b: " + c.b + " }"; } let d = typeCast(IVisualData_$type, a); if (d != null) { return "\"" + d.serialize() + "\""; } if (typeof a === 'number' || typeof a === 'number' || typeCast(Boolean_$type, a) !== null) { return "" + a.toString() + ""; } return "\"" + (a != null ? a.toString() : "null") + "\""; } constructor() { super(); this._rows = null; this._viewport = null; this._width = 0; this._height = 0; this._background = null; this._borderBrush = null; this._borderThicknessTop = 0; this._borderThicknessLeft = 0; this._borderThicknessRight = 0; this._borderThicknessBottom = 0; this.rows = new List$1(DataLegendVisualDataRow.$, 0); this.borderThicknessTop = 0; this.borderThicknessLeft = 0; this.borderThicknessRight = 0; this.borderThicknessBottom = 0; } get rows() { return this._rows; } set rows(a) { this._rows = a; } get viewport() { return this._viewport; } set viewport(a) { this._viewport = a; } get width() { return this._width; } set width(a) { this._width = a; } get height() { return this._height; } set height(a) { this._height = a; } get background() { return this._background; } set background(a) { this._background = a; } get borderBrush() { return this._borderBrush; } set borderBrush(a) { this._borderBrush = a; } get borderThicknessTop() { return this._borderThicknessTop; } set borderThicknessTop(a) { this._borderThicknessTop = a; } get borderThicknessLeft() { return this._borderThicknessLeft; } set borderThicknessLeft(a) { this._borderThicknessLeft = a; } get borderThicknessRight() { return this._borderThicknessRight; } set borderThicknessRight(a) { this._borderThicknessRight = a; } get borderThicknessBottom() { return this._borderThicknessBottom; } set borderThicknessBottom(a) { this._borderThicknessBottom = a; } serialize() { let a = ", "; let b = " "; let c = new StringBuilder(0); c.u("{"); c.u(this.k("width") + this.width + a); c.u(this.k("height") + this.height + a); c.u(this.k("viewport") + DataLegendVisualData.serialize1(this.viewport) + a); c.u(this.k("background") + DataLegendVisualData.serialize1(this.background) + a); c.u(this.k("borderBrush") + DataLegendVisualData.serialize1(this.borderBrush) + a); c.u(this.k("borderThicknessTop") + this.borderThicknessTop + a); c.u(this.k("borderThicknessLeft") + this.borderThicknessLeft + a); c.u(this.k("borderThicknessRight") + this.borderThicknessRight + a); c.u(this.k("borderThicknessBottom") + this.borderThicknessBottom + a); let d = new List$1(String_$type, 0); for (let e of fromEnum(this.rows)) { d.add(e.serialize()); } c.u(this.k("rows") + "["); c.u(stringJoin(", \n", ...d.toArray())); c.u("]"); c.u("}"); return c.toString(); } k(a) { return a + ": "; } } DataLegendVisualData.$t = /*@__PURE__*/ markType(DataLegendVisualData, 'DataLegendVisualData', Base.$, [IVisualData_$type]); return DataLegendVisualData; })(); /** * @hidden */ export let DataLegendVisualDataColumn = /*@__PURE__*/ (() => { class DataLegendVisualDataColumn extends Base { constructor() { super(); this._text = null; this._bounds = null; this._textColor = null; this._fontFamily = null; this._fontSize = 0; this._fontWeight = null; this._fontStyle = null; this._fontStretch = null; this._marginLeft = 0; this._marginRight = 0; this._marginTop = 0; this._marginBottom = 0; this.bounds = RectData.empty; } get text() { return this._text; } set text(a) { this._text = a; } get bounds() { return this._bounds; } set bounds(a) { this._bounds = a; } get textColor() { return this._textColor; } set textColor(a) { this._textColor = a; } get fontFamily() { return this._fontFamily; } set fontFamily(a) { this._fontFamily = a; } get fontSize() { return this._fontSize; } set fontSize(a) { this._fontSize = a; } get fontWeight() { return this._fontWeight; } set fontWeight(a) { this._fontWeight = a; } get fontStyle() { return this._fontStyle; } set fontStyle(a) { this._fontStyle = a; } get fontStretch() { return this._fontStretch; } set fontStretch(a) { this._fontStretch = a; } get marginLeft() { return this._marginLeft; } set marginLeft(a) { this._marginLeft = a; } get marginRight() { return this._marginRight; } set marginRight(a) { this._marginRight = a; } get marginTop() { return this._marginTop; } set marginTop(a) { this._marginTop = a; } get marginBottom() { return this._marginBottom; } set marginBottom(a) { this._marginBottom = a; } serialize() { let a = ", "; let b = " "; let c = new StringBuilder(0); c.u("{"); c.u(b + this.l("bounds") + DataLegendVisualData.serialize1(this.bounds) + a); c.u(b + this.l("text") + DataLegendVisualData.serialize1(this.text) + a); c.u(b + this.l("textColor") + DataLegendVisualData.serialize1(this.textColor) + a); c.u(b + this.l("marginTop") + DataLegendVisualData.serialize1(this.marginTop) + a); c.u(b + this.l("marginLeft") + DataLegendVisualData.serialize1(this.marginLeft) + a); c.u(b + this.l("marginRight") + DataLegendVisualData.serialize1(this.marginRight) + a); c.u(b + this.l("marginBottom") + DataLegendVisualData.serialize1(this.marginBottom) + a); let d = "\"" + (this.fontFamily != null ? stringReplace(this.fontFamily, "\"", "'") : "null") + "\""; c.u(b + this.l("fontFamily") + d + a); c.u(b + this.l("fontSize") + DataLegendVisualData.serialize1(this.fontSize) + a); c.u(b + this.l("fontWeight") + DataLegendVisualData.serialize1(this.fontWeight) + a); c.u(b + this.l("fontStyle") + DataLegendVisualData.serialize1(this.fontStyle) + a); c.u(b + this.l("fontStretch") + DataLegendVisualData.serialize1(this.fontStretch)); c.u(b + "}"); return c.toString(); } l(a) { return a + ": "; } } DataLegendVisualDataColumn.$t = /*@__PURE__*/ markType(DataLegendVisualDataColumn, 'DataLegendVisualDataColumn'); return DataLegendVisualDataColumn; })(); /** * @hidden */ export let DataLegendVisualDataRow = /*@__PURE__*/ (() => { class DataLegendVisualDataRow extends Base { constructor() { super(); this._columns = null; this._seriesIndex = 0; this._badgeBounds = null; this._badgeMarginLeft = 0; this._badgeMarginTop = 0; this._badgeMarginRight = 0; this._badgeMarginBottom = 0; this._badgeShape = null; this._badgeAppearance = null; this._rowBounds = null; this._rowMarginLeft = 0; this._rowMarginTop = 0; this._rowMarginRight = 0; this._rowMarginBottom = 0; this.badgeShape = "None"; this.columns = new List$1(DataLegendVisualDataColumn.$, 0); } get columns() { return this._columns; } set columns(a) { this._columns = a; } get seriesIndex() { return this._seriesIndex; } set seriesIndex(a) { this._seriesIndex = a; } get badgeBounds() { return this._badgeBounds; } set badgeBounds(a) { this._badgeBounds = a; } get badgeMarginLeft() { return this._badgeMarginLeft; } set badgeMarginLeft(a) { this._badgeMarginLeft = a; } get badgeMarginTop() { return this._badgeMarginTop; } set badgeMarginTop(a) { this._badgeMarginTop = a; } get badgeMarginRight() { return this._badgeMarginRight; } set badgeMarginRight(a) { this._badgeMarginRight = a; } get badgeMarginBottom() { return this._badgeMarginBottom; } set badgeMarginBottom(a) { this._badgeMarginBottom = a; } get badgeShape() { return this._badgeShape; } set badgeShape(a) { this._badgeShape = a; } get badgeAppearance() { return this._badgeAppearance; } set badgeAppearance(a) { this._badgeAppearance = a; } get rowBounds() { return this._rowBounds; } set rowBounds(a) { this._rowBounds = a; } get rowMarginLeft() { return this._rowMarginLeft; } set rowMarginLeft(a) { this._rowMarginLeft = a; } get rowMarginTop() { return this._rowMarginTop; } set rowMarginTop(a) { this._rowMarginTop = a; } get rowMarginRight() { return this._rowMarginRight; } set rowMarginRight(a) { this._rowMarginRight = a; } get rowMarginBottom() { return this._rowMarginBottom; } set rowMarginBottom(a) { this._rowMarginBottom = a; } serialize() { let a = ", "; let b = " "; let c = new StringBuilder(0); c.u("{"); c.u(b + this.o("badgeMarginLeft") + this.badgeMarginLeft + a); c.u(b + this.o("badgeMarginTop") + this.badgeMarginTop + a); c.u(b + this.o("badgeMarginRight") + this.badgeMarginRight + a); c.u(b + this.o("badgeMarginBottom") + this.badgeMarginBottom + a); if (this.badgeBounds == null) { c.u(b + this.o("badgeBounds") + "{}" + a); } else { c.u(b + this.o("badgeBounds") + DataLegendVisualData.serialize1(this.badgeBounds) + a); } c.u(b + this.o("badgeShape") + DataLegendVisualData.serialize1(this.badgeShape) + a); if (this.badgeAppearance != null) { c.u(b + this.o("badgeAppearance") + this.badgeAppearance.serialize() + a); } c.u(b + this.o("rowBounds") + DataLegendVisualData.serialize1(this.rowBounds) + a); c.u(b + this.o("rowMarginLeft") + this.rowMarginLeft + a); c.u(b + this.o("rowMarginTop") + this.rowMarginTop + a); c.u(b + this.o("rowMarginRight") + this.rowMarginRight + a); c.u(b + this.o("rowMarginBottom") + this.rowMarginBottom + a); let d = new List$1(String_$type, 0); for (let e of fromEnum(this.columns)) { d.add(e.serialize()); } c.u(b + this.o("columns") + "["); c.u(b + b + stringJoin(", \n" + b + b, ...d.toArray())); c.u(b + "]"); c.u("}"); return c.toString(); } o(a) { return a + ": "; } } DataLegendVisualDataRow.$t = /*@__PURE__*/ markType(DataLegendVisualDataRow, 'DataLegendVisualDataRow'); return DataLegendVisualDataRow; })();