igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
373 lines (372 loc) • 9.73 kB
JavaScript
import { IgrHighlightingInfo } from "igniteui-react-core";
import { TypeRegistrar } from "igniteui-react-core";
import { brushToString, stringToBrush, ensureBool } from "igniteui-react-core";
/**
* Represents event arguments base class for the AssigningCategoryStyleEventArgsBase
*/
export class IgrAssigningSeriesStyleEventArgsBase {
createImplementation() {
return null;
}
get nativeElement() {
return this._implementation.nativeElement;
}
/**
* @hidden
*/
get i() {
return this._implementation;
} /**
* @hidden
*/
static _createFromInternal(internal) {
if (!internal) {
return null;
}
if (!internal.$type) {
return null;
}
let name = internal.$type.name;
let externalName = "Igr" + name;
if (!TypeRegistrar.isRegistered(externalName)) {
return null;
}
return TypeRegistrar.create(externalName);
}
onImplementationCreated() {
}
constructor() {
this.mounted = false;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
_provideImplementation(i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
/**
* Gets the start index
*/
get startIndex() {
return this.i.z;
}
set startIndex(v) {
this.i.z = +v;
}
/**
* Gets the end index
*/
get endIndex() {
return this.i.y;
}
set endIndex(v) {
this.i.y = +v;
}
/**
* Gets the start date, if applicable
*/
get startDate() {
return this.i.j;
}
set startDate(v) {
this.i.j = v;
}
/**
* Gets the end date, if applicable
*/
get endDate() {
return this.i.i;
}
set endDate(v) {
this.i.i = v;
}
/**
* Gets a function that will return the items associated with this event.
*/
get getItems() {
return this.i.a;
}
set getItems(v) {
this.i.a = v;
}
/**
* Gets or sets fill brush to use for the current item.
*/
get fill() {
return brushToString(this.i.aa);
}
set fill(v) {
this.i.aa = stringToBrush(v);
}
/**
* Gets or sets stroke to use for the current item.
*/
get stroke() {
return brushToString(this.i.ab);
}
set stroke(v) {
this.i.ab = stringToBrush(v);
}
/**
* Gets or sets opacity to use for the current item.
*/
get opacity() {
return this.i.o;
}
set opacity(v) {
this.i.o = +v;
}
/**
* Gets or sets opacity to use for the current item.
*/
get fadeOpacity() {
return this.i.k;
}
set fadeOpacity(v) {
this.i.k = +v;
}
/**
* Gets or sets highlighting info
*/
get highlightingInfo() {
const r = this.i.c;
if (r == null) {
return null;
}
if (!r.externalObject) {
let e = new IgrHighlightingInfo();
if (r.$type) {
e._implementation = r;
}
else {
if (e.i.setNativeElement) {
e.i.setNativeElement(r);
}
}
r.externalObject = e;
}
return r.externalObject;
}
set highlightingInfo(v) {
v == null ? this.i.c = null : this.i.c = v.i;
}
/**
* Gets or sets selection highlighting info
*/
get selectionHighlightingInfo() {
const r = this.i.d;
if (r == null) {
return null;
}
if (!r.externalObject) {
let e = new IgrHighlightingInfo();
if (r.$type) {
e._implementation = r;
}
else {
if (e.i.setNativeElement) {
e.i.setNativeElement(r);
}
}
r.externalObject = e;
}
return r.externalObject;
}
set selectionHighlightingInfo(v) {
v == null ? this.i.d = null : this.i.d = v.i;
}
/**
* Gets or sets focus highlighting info
*/
get focusHighlightingInfo() {
const r = this.i.b;
if (r == null) {
return null;
}
if (!r.externalObject) {
let e = new IgrHighlightingInfo();
if (r.$type) {
e._implementation = r;
}
else {
if (e.i.setNativeElement) {
e.i.setNativeElement(r);
}
}
r.externalObject = e;
}
return r.externalObject;
}
set focusHighlightingInfo(v) {
v == null ? this.i.b = null : this.i.b = v.i;
}
/**
* Gets the max highlighting progress from all series.
*/
get maxAllSeriesHighlightingProgress() {
return this.i.m;
}
set maxAllSeriesHighlightingProgress(v) {
this.i.m = +v;
}
/**
* Gets the sum of highlighting progress from all series.
*/
get sumAllSeriesHighlightingProgress() {
return this.i.q;
}
set sumAllSeriesHighlightingProgress(v) {
this.i.q = +v;
}
/**
* Gets the max selection highlighting progress from all series.
*/
get maxAllSeriesSelectionHighlightingProgress() {
return this.i.n;
}
set maxAllSeriesSelectionHighlightingProgress(v) {
this.i.n = +v;
}
/**
* Gets the sum of selection highlighting progress from all series.
*/
get sumAllSeriesSelectionHighlightingProgress() {
return this.i.r;
}
set sumAllSeriesSelectionHighlightingProgress(v) {
this.i.r = +v;
}
/**
* Gets the max focus highlighting progress from all series.
*/
get maxAllSeriesFocusHighlightingProgress() {
return this.i.l;
}
set maxAllSeriesFocusHighlightingProgress(v) {
this.i.l = +v;
}
/**
* Gets the sum of focus highlighting progress from all series.
*/
get sumAllSeriesFocusHighlightingProgress() {
return this.i.p;
}
set sumAllSeriesFocusHighlightingProgress(v) {
this.i.p = +v;
}
/**
* Gets the average of highlighting progress from all the series.
*/
get totalAllSeriesHighlightingProgress() {
return this.i.u;
}
set totalAllSeriesHighlightingProgress(v) {
this.i.u = +v;
}
/**
* Gets the high water mark highlighting progress.
*/
get totalAllSeriesHighWaterMark() {
return this.i.v;
}
set totalAllSeriesHighWaterMark(v) {
this.i.v = +v;
}
/**
* Gets the high water mark focus highlighting progress.
*/
get totalAllSeriesFocusHighWaterMark() {
return this.i.t;
}
set totalAllSeriesFocusHighWaterMark(v) {
this.i.t = +v;
}
/**
* Gets the high water mark selection highlighting progress.
*/
get totalAllSeriesSelectionHighWaterMark() {
return this.i.x;
}
set totalAllSeriesSelectionHighWaterMark(v) {
this.i.x = +v;
}
/**
* Gets the average of selection highlighting progress from all the series.
*/
get totalAllSeriesSelectionHighlightingProgress() {
return this.i.w;
}
set totalAllSeriesSelectionHighlightingProgress(v) {
this.i.w = +v;
}
/**
* Gets the average of selection highlighting progress from all the series.
*/
get totalAllSeriesFocusHighlightingProgress() {
return this.i.s;
}
set totalAllSeriesFocusHighlightingProgress(v) {
this.i.s = +v;
}
/**
* Gets or sets if highlighting was handled by this event handler, and whether internal highlighting logic should be skipped.
*/
get highlightingHandled() {
return this.i.f;
}
set highlightingHandled(v) {
this.i.f = ensureBool(v);
}
/**
* Gets if this event has a valid date range
*/
get hasDateRange() {
return this.i.e;
}
set hasDateRange(v) {
this.i.e = ensureBool(v);
}
/**
* Gets if the current shape is identified as a negative shape if this series supports discrete negative shapes.
*/
get isNegativeShape() {
return this.i.g;
}
set isNegativeShape(v) {
this.i.g = ensureBool(v);
}
/**
* Gets if the current event is being raised for the thumbnail image.
*/
get isThumbnail() {
return this.i.h;
}
set isThumbnail(v) {
this.i.h = ensureBool(v);
}
findByName(name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
if (this.highlightingInfo && this.highlightingInfo.name && this.highlightingInfo.name == name) {
return this.highlightingInfo;
}
if (this.selectionHighlightingInfo && this.selectionHighlightingInfo.name && this.selectionHighlightingInfo.name == name) {
return this.selectionHighlightingInfo;
}
if (this.focusHighlightingInfo && this.focusHighlightingInfo.name && this.focusHighlightingInfo.name == name) {
return this.focusHighlightingInfo;
}
return null;
}
}