igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
212 lines (211 loc) • 7.07 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-react-core";
import { PrimitiveVisualDataList } from "igniteui-react-core";
import { PointerTooltipVisualDataList } from "./PointerTooltipVisualDataList";
import { MarkerVisualDataList } from "./MarkerVisualDataList";
import { CalloutVisualDataList } from "./CalloutVisualDataList";
import { List$1 } from "igniteui-react-core";
import { StringBuilder } from "igniteui-react-core";
/**
* @hidden
*/
export let SeriesVisualData = /*@__PURE__*/ (() => {
class SeriesVisualData extends Base {
constructor() {
super();
this._name = null;
this._type = null;
this._viewport = null;
this._opacity = 0;
this._shapes = null;
this._pointerTooltips = null;
this._markerShapes = null;
this._calloutShapes = null;
this._layers = null;
this._pixels = null;
this._pixelWidth = 0;
this._pixelHeight = 0;
this.shapes = new PrimitiveVisualDataList();
this.markerShapes = new MarkerVisualDataList();
this.pointerTooltips = new PointerTooltipVisualDataList();
this.calloutShapes = new CalloutVisualDataList();
this.layers = new SeriesVisualDataList();
}
get name() {
return this._name;
}
set name(a) {
this._name = a;
}
get type() {
return this._type;
}
set type(a) {
this._type = a;
}
get viewport() {
return this._viewport;
}
set viewport(a) {
this._viewport = a;
}
get opacity() {
return this._opacity;
}
set opacity(a) {
this._opacity = a;
}
get shapes() {
return this._shapes;
}
set shapes(a) {
this._shapes = a;
}
get pointerTooltips() {
return this._pointerTooltips;
}
set pointerTooltips(a) {
this._pointerTooltips = a;
}
get markerShapes() {
return this._markerShapes;
}
set markerShapes(a) {
this._markerShapes = a;
}
get calloutShapes() {
return this._calloutShapes;
}
set calloutShapes(a) {
this._calloutShapes = a;
}
get layers() {
return this._layers;
}
set layers(a) {
this._layers = a;
}
get pixels() {
return this._pixels;
}
set pixels(a) {
this._pixels = a;
}
get pixelWidth() {
return this._pixelWidth;
}
set pixelWidth(a) {
this._pixelWidth = a;
}
get pixelHeight() {
return this._pixelHeight;
}
set pixelHeight(a) {
this._pixelHeight = a;
}
n() {
for (let a of fromEnum(this.shapes)) {
a.scaleByViewport(this.viewport);
}
for (let b of fromEnum(this.markerShapes)) {
b.i(this.viewport);
}
for (let c of fromEnum(this.pointerTooltips)) {
c.scaleByViewport(this.viewport);
}
for (let d of fromEnum(this.calloutShapes)) {
d.scaleByViewport(this.viewport);
}
for (let e of fromEnum(this.layers)) {
e.n();
}
}
serialize() {
let a = new StringBuilder(0);
a.u("{");
if (this.name != null) {
a.u("name: \"" + this.name + "\",");
}
a.u("type: \"" + this.type + "\", ");
a.u("opacity: " + this.opacity + ", ");
a.u("viewport: { left: " + this.viewport.left + ", top: " + this.viewport.top + ", width: " + this.viewport.width + ", height: " + this.viewport.height + "}, ");
a.u("shapes: [");
for (let b = 0; b < this.shapes.count; b++) {
if (b != 0) {
a.l(", ");
}
a.l(this.shapes._inner[b].serialize());
}
a.u("],");
a.u("pointerTooltips: [");
for (let c = 0; c < this.pointerTooltips.count; c++) {
if (c != 0) {
a.l(", ");
}
a.l(this.pointerTooltips._inner[c].serialize());
}
a.u("],");
if (this.calloutShapes != null && this.calloutShapes.count > 0) {
a.u("calloutshapes: [");
for (let d = 0; d < this.calloutShapes.count; d++) {
if (d != 0) {
a.l(", ");
}
a.l(this.calloutShapes._inner[d].serialize());
}
a.u("],");
}
a.u("markerShapes: [");
for (let e = 0; e < this.markerShapes.count; e++) {
if (e != 0) {
a.l(", ");
}
a.l(this.markerShapes._inner[e].serialize());
}
a.u("],");
a.u("layers: [");
for (let f = 0; f < this.layers.count; f++) {
if (f != 0) {
a.l(", ");
}
a.l(this.layers._inner[f].serialize());
}
a.u("]");
this.o(a);
if (this.pixels != null) {
a.u(", pixels: [");
for (let g = 0; g < this.pixels.length; g++) {
if (g != 0) {
a.l(", ");
}
a.l(this.pixels[g].toString());
}
a.u("], ");
a.u("pixelWidth: " + this.pixelWidth + ", ");
}
a.u("}");
return a.toString();
}
o(a) {
}
}
SeriesVisualData.$t = /*@__PURE__*/ markType(SeriesVisualData, 'SeriesVisualData');
return SeriesVisualData;
})();
/**
* @hidden
*/
export let SeriesVisualDataList = /*@__PURE__*/ (() => {
class SeriesVisualDataList extends List$1 {
constructor() {
super(SeriesVisualData.$, 0);
}
}
SeriesVisualDataList.$t = /*@__PURE__*/ markType(SeriesVisualDataList, 'SeriesVisualDataList', /*@__PURE__*/ List$1.$.specialize(SeriesVisualData.$));
return SeriesVisualDataList;
})();