igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,086 lines (1,079 loc) • 37 kB
JavaScript
import { __extends, __values } from "tslib";
import * as React from 'react';
import { ReactRenderer } from "igniteui-react-core";
import { TypeRegistrar, delegateRemove, delegateCombine } from "igniteui-react-core";
import { DataChartStylingDefaults } from './DataChartStylingDefaults';
import { XamFunnelChart } from './XamFunnelChart';
import { isValidProp, toSpinal, getModifiedProps, initializePropertiesFromCss, NamePatcher, fromBrushCollection, toBrushCollection, ensureBool, stringToBrush, brushToString, ensureEnum } from "igniteui-react-core";
import { Visibility_$type } from "igniteui-react-core";
import { OuterLabelAlignment_$type } from './OuterLabelAlignment';
import { FunnelSliceDisplay_$type } from './FunnelSliceDisplay';
import { IgrFunnelSliceClickedEventArgs } from './igr-funnel-slice-clicked-event-args';
import { IgrFunnelSliceEventArgs } from './igr-funnel-slice-event-args';
import { Style } from "igniteui-react-core";
import { HighlightedValueDisplayMode_$type } from "igniteui-react-core";
import { Base } from "igniteui-react-core";
import { SyncableObservableCollection$1 } from "igniteui-react-core";
import { IgrFunnelChartSelectedItemsCollection } from './igr-funnel-chart-selected-items-collection';
import { FunnelChartSelectedItemsCollection as FunnelChartSelectedItemsCollection_internal } from './FunnelChartSelectedItemsCollection';
import { IgrFunnelChartSelectedItemsChangedEventArgs } from './igr-funnel-chart-selected-items-changed-event-args';
var IgrFunnelChart = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgrFunnelChart, _super);
function IgrFunnelChart(props) {
var _this = _super.call(this, props) || this;
_this._dataSource = null;
_this.mounted = false;
_this._selectedItems = null;
_this.__p = null;
_this._hasUserValues = new Set();
_this._stylingContainer = null;
_this._stylingParent = null;
_this._inStyling = false;
_this._selectedItemsChanged = null;
_this._selectedItemsChanged_wrapped = null;
_this._sliceClicked = null;
_this._sliceClicked_wrapped = null;
_this._sliceEnter = null;
_this._sliceEnter_wrapped = null;
_this._sliceLeave = null;
_this._sliceLeave_wrapped = null;
_this._sliceHover = null;
_this._sliceHover_wrapped = null;
if (_this._styling) {
NamePatcher.ensureStylablePatched(Object.getPrototypeOf(_this));
}
_this._getMainRef = _this._getMainRef.bind(_this);
var container;
if (document) {
container = document.createElement("div");
container.style.display = "block";
container.style.width = "100%";
container.style.height = "100%";
}
_this._implementation = _this.createImplementation();
var root;
root = container;
var ren = new ReactRenderer(root, document, true, DataChartStylingDefaults);
_this.container = ren.getWrapper(container);
_this._wrapper = ren;
var chart = _this.i;
_this._chart = chart;
chart.provideContainer(ren);
_this.bindData();
if (props) {
_this.initializeProperties();
}
chart.notifyResized();
ren.addSizeWatcher(function () {
_this._chart.notifyResized();
});
return _this;
}
Object.defineProperty(IgrFunnelChart.prototype, "height", {
get: function () {
return this._height;
},
set: function (value) {
this._height = value;
if (this._elRef) {
this._elRef.style.height = value;
this._chart.notifyResized();
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "width", {
get: function () {
return this._width;
},
set: function (value) {
this._width = value;
if (this._elRef) {
this._elRef.style.width = value;
this._chart.notifyResized();
}
},
enumerable: false,
configurable: true
});
IgrFunnelChart.prototype._getMainRef = function (ref) {
this._elRef = ref;
};
IgrFunnelChart.prototype.render = function () {
var div = React.createElement("div", {
className: "ig-funnel-chart igr-funnel-chart",
ref: this._getMainRef
});
return div;
};
IgrFunnelChart.prototype.destroy = function () {
this._chart.destroy();
this._wrapper.destroy();
};
IgrFunnelChart.prototype.shouldComponentUpdate = function (nextProps, nextState) {
var e_1, _a;
var mod = getModifiedProps(this.props, nextProps);
try {
for (var _b = __values(Object.keys(mod)), _c = _b.next(); !_c.done; _c = _b.next()) {
var p = _c.value;
if (isValidProp(this, p)) {
this[p] = mod[p];
}
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
return true;
};
IgrFunnelChart.prototype.initializeProperties = function () {
var e_2, _a;
try {
for (var _b = __values(Object.keys(this.props)), _c = _b.next(); !_c.done; _c = _b.next()) {
var p = _c.value;
if (isValidProp(this, p)) {
this[p] = this.props[p];
}
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_2)
throw e_2.error;
}
}
};
IgrFunnelChart.prototype.componentDidMount = function () {
this._elRef.style.width = this._width ? this._width : "";
this._elRef.style.height = this._height ? this._height : "";
this._elRef.appendChild(this.container.getNativeElement());
this._styling(this._elRef, this);
this._chart.notifyResized();
};
IgrFunnelChart.prototype.componentWillUnmount = function () {
this.destroy();
};
IgrFunnelChart.prototype.createImplementation = function () {
return new XamFunnelChart();
};
IgrFunnelChart.prototype.createSeriesComponent = function (type) {
if (TypeRegistrar.isRegistered(type)) {
var s = TypeRegistrar.create(type);
s.owner = this;
s._provideRenderer(this._wrapper);
return s;
}
else {
//we shouldn't get here, hopefully.
throw Error("series type not loaded: " + type);
}
};
Object.defineProperty(IgrFunnelChart.prototype, "dataSource", {
get: function () {
return this._dataSource;
},
set: function (value) {
this._dataSource = value;
this.bindData();
},
enumerable: false,
configurable: true
});
IgrFunnelChart.prototype.bindData = function () {
if (this._chart != null && this._chart !== undefined) {
this._chart.itemsSource = this._dataSource;
}
};
Object.defineProperty(IgrFunnelChart.prototype, "legend", {
/**
* Gets or sets the legend used for the current chart.
*/
get: function () {
if (this.i.legend != null)
return this.i.legend.externalObject;
},
set: function (v) {
if (v != undefined && v != null)
this.i.legend = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "nativeElement", {
get: function () {
return this._implementation.nativeElement;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
} /**
* @hidden
*/,
enumerable: false,
configurable: true
});
IgrFunnelChart._createFromInternal = function (internal) {
if (!internal) {
return null;
}
if (!internal.$type) {
return null;
}
var name = internal.$type.name;
var externalName = "Igr" + name;
if (!TypeRegistrar.isRegistered(externalName)) {
return null;
}
return TypeRegistrar.create(externalName);
};
Object.defineProperty(IgrFunnelChart.prototype, "valueMemberPath", {
/**
* Gets or sets the value member path for the funnel chart.
*/
get: function () {
return this.i.dw;
},
set: function (v) {
this.i.dw = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "highlightedValueMemberPath", {
/**
* Gets or sets the highlighted value member path for the funnel chart.
*/
get: function () {
return this.i.cs;
},
set: function (v) {
this.i.cs = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "actualHighlightValueOpacity", {
/**
* Gets the actual opacity of the primary needle while highlighting
*/
get: function () {
return this.i.bx;
},
set: function (v) {
this.i.bx = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "highlightValueOpacity", {
/**
* Gets or sets the opacity while highlighting
*/
get: function () {
return this.i.b1;
},
set: function (v) {
this.i.b1 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "actualHighlightValueDisplayMode", {
/**
* Gets whether and how to display the highlighted value.
*/
get: function () {
return this.i.a5;
},
set: function (v) {
this.i.a5 = ensureEnum(HighlightedValueDisplayMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "highlightValueDisplayMode", {
/**
* Gets or sets whether and how to display the highlighted value.
*/
get: function () {
return this.i.a6;
},
set: function (v) {
this.i.a6 = ensureEnum(HighlightedValueDisplayMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "brushes", {
/**
* Gets or sets the palette of brushes to use for coloring the slices.
*/
get: function () {
return fromBrushCollection(this.i.ah);
},
set: function (v) {
this.i.ah = toBrushCollection(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "outlines", {
/**
* Gets or sets the palette of brushes to use for outlines on the slices.
*/
get: function () {
return fromBrushCollection(this.i.ai);
},
set: function (v) {
this.i.ai = toBrushCollection(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "bottomEdgeWidth", {
/**
* Gets or sets the percentage (from near 0 to 1) of space the bottom edge of the funnel should take.
*/
get: function () {
return this.i.bz;
},
set: function (v) {
this.i.bz = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "innerLabelMemberPath", {
/**
* Gets or sets the InnerLabel mapping property for the current series object.
*/
get: function () {
return this.i.cz;
},
set: function (v) {
this.i.cz = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "outerLabelMemberPath", {
/**
* Gets or sets the OuterLabel mapping property for the current series object.
*/
get: function () {
return this.i.da;
},
set: function (v) {
this.i.da = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "innerLabelVisibility", {
/**
* Gets or sets whether the inner labels are visible.
*/
get: function () {
return this.i.fv;
},
set: function (v) {
this.i.fv = ensureEnum(Visibility_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "outerLabelVisibility", {
/**
* Gets or sets whether the outer labels are visible.
*/
get: function () {
return this.i.fw;
},
set: function (v) {
this.i.fw = ensureEnum(Visibility_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "outerLabelAlignment", {
/**
* Gets or sets which side of the chart the outer labels should appear.
*/
get: function () {
return this.i.ax;
},
set: function (v) {
this.i.ax = ensureEnum(OuterLabelAlignment_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "funnelSliceDisplay", {
/**
* Gets or sets how the heights of the funnel slices should be configured.
*/
get: function () {
return this.i.an;
},
set: function (v) {
this.i.an = ensureEnum(FunnelSliceDisplay_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "formatInnerLabel", {
/**
* Gets or sets the formatter function for inner labels. Function should return string and it takes 3 parameters: 1st-value of item to format, 2nd-index of item within data, 3rd-reference to the funnel chart.
*/
get: function () {
return this.i.b9;
},
set: function (v) {
this.i.b9 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "formatOuterLabel", {
/**
* Gets or sets the formatter function for outer labels. Function should return string and it takes 3 parameters: 1st-value of item to format, 2nd-index of item within data, 3rd-reference to the funnel chart.
*/
get: function () {
return this.i.ca;
},
set: function (v) {
this.i.ca = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "transitionDuration", {
/**
* Gets or sets how long the animations should take to run.
*/
get: function () {
return this.i.cb;
},
set: function (v) {
this.i.cb = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "isInverted", {
/**
* Gets or sets if the funnel should be rendered inverted.
*/
get: function () {
return this.i.bn;
},
set: function (v) {
this.i.bn = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "useBezierCurve", {
/**
* Gets or sets whether to use a Bezier curve to define the funnel.
*/
get: function () {
return this.i.bo;
},
set: function (v) {
this.i.bo = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "allowSliceSelection", {
/**
* Gets or sets whether to allow slices to be selected.
*/
get: function () {
return this.i.bh;
},
set: function (v) {
this.i.bh = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "useUnselectedStyle", {
/**
* Gets or sets whether to use the unselected style on unselected slices.
*/
get: function () {
return this.i.bq;
},
set: function (v) {
this.i.bq = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "selectedSliceFill", {
/**
* Gets or sets the fill brush.
*/
get: function () {
return this.i.ft ? this.i.ft.fill : null;
},
set: function (v) {
this.ensureSelectedSliceStyle();
this.i.ft.fill = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "selectedSliceStroke", {
/**
* Gets or sets the stroke brush.
*/
get: function () {
return this.i.ft ? this.i.ft.stroke : null;
},
set: function (v) {
this.ensureSelectedSliceStyle();
this.i.ft.stroke = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "selectedSliceStrokeThickness", {
/**
* Gets or sets the stroke thickness.
*/
get: function () {
return this.i.ft ? this.i.ft.strokeThickness : NaN;
},
set: function (v) {
this.ensureSelectedSliceStyle();
this.i.ft.strokeThickness = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "selectedSliceOpacity", {
/**
* Gets or sets the opacity.
*/
get: function () {
return this.i.ft ? this.i.ft.opacity : NaN;
},
set: function (v) {
this.ensureSelectedSliceStyle();
this.i.ft.opacity = +v;
},
enumerable: false,
configurable: true
});
IgrFunnelChart.prototype.ensureSelectedSliceStyle = function () {
if (this.i.ft) {
return;
}
this.i.ft = new Style();
};
Object.defineProperty(IgrFunnelChart.prototype, "unselectedSliceFill", {
/**
* Gets or sets the fill brush.
*/
get: function () {
return this.i.fu ? this.i.fu.fill : null;
},
set: function (v) {
this.ensureUnselectedSliceStyle();
this.i.fu.fill = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "unselectedSliceStroke", {
/**
* Gets or sets the stroke brush.
*/
get: function () {
return this.i.fu ? this.i.fu.stroke : null;
},
set: function (v) {
this.ensureUnselectedSliceStyle();
this.i.fu.stroke = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "unselectedSliceStrokeThickness", {
/**
* Gets or sets the stroke thickness.
*/
get: function () {
return this.i.fu ? this.i.fu.strokeThickness : NaN;
},
set: function (v) {
this.ensureUnselectedSliceStyle();
this.i.fu.strokeThickness = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "unselectedSliceOpacity", {
/**
* Gets or sets the opacity.
*/
get: function () {
return this.i.fu ? this.i.fu.opacity : NaN;
},
set: function (v) {
this.ensureUnselectedSliceStyle();
this.i.fu.opacity = +v;
},
enumerable: false,
configurable: true
});
IgrFunnelChart.prototype.ensureUnselectedSliceStyle = function () {
if (this.i.fu) {
return;
}
this.i.fu = new Style();
};
Object.defineProperty(IgrFunnelChart.prototype, "selectedItems", {
/**
* Represents the current selected items.
*/
get: function () {
if (this._selectedItems === null) {
var coll = new IgrFunnelChartSelectedItemsCollection();
var innerColl = this.i.selectedItems;
if (!innerColl) {
innerColl = new FunnelChartSelectedItemsCollection_internal();
}
this._selectedItems = coll._fromInner(innerColl);
}
return this._selectedItems;
},
set: function (v) {
if (this._selectedItems !== null) {
this._selectedItems._setSyncTarget(null);
this._selectedItems = null;
}
var coll = new IgrFunnelChartSelectedItemsCollection();
this._selectedItems = coll._fromOuter(v);
var syncColl = new SyncableObservableCollection$1(Base.$type);
var innerColl = this.i.selectedItems;
if (!innerColl) {
innerColl = new FunnelChartSelectedItemsCollection_internal();
}
syncColl._inner = innerColl;
syncColl.clear();
this._selectedItems._setSyncTarget(syncColl);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "legendItemBadgeTemplate", {
/**
* Gets or sets the LegendItemBadgeTemplate to use for the legend items.
*/
get: function () {
return this.i.legendItemBadgeTemplate;
},
set: function (v) {
this.i.legendItemBadgeTemplate = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "useOuterLabelsForLegend", {
/**
* Gets or sets whether to use the outer labels to identify the legend items.
*/
get: function () {
return this.i.bp;
},
set: function (v) {
this.i.bp = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "textStyle", {
/**
* Gets or sets the text style for inner labels
*/
get: function () {
return this.i.dl;
},
set: function (v) {
this.i.dl = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "outerLabelTextStyle", {
/**
* Gets or sets the text style for outer labels
*/
get: function () {
return this.i.dd;
},
set: function (v) {
this.i.dd = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "outlineThickness", {
/**
* Gets or sets the thickness of outline around slices.
*/
get: function () {
return this.i.b2;
},
set: function (v) {
this.i.b2 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "pixelScalingRatio", {
/**
* Gets or sets the scaling value used to affect the pixel density of the control.
* A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control
* to appear blurry.
*/
get: function () {
return this.i.b4;
},
set: function (v) {
this.i.b4 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "outerLabelTextColor", {
/**
* Gets or sets the brush used for the outer labels.
*/
get: function () {
return brushToString(this.i.fp);
},
set: function (v) {
this.i.fp = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "textColor", {
/**
* Gets or sets the brush used for the inner labels.
*/
get: function () {
return brushToString(this.i.fq);
},
set: function (v) {
this.i.fq = stringToBrush(v);
},
enumerable: false,
configurable: true
});
IgrFunnelChart.prototype.findByName = function (name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
};
Object.defineProperty(IgrFunnelChart.prototype, "hasUserValues", {
get: function () {
return this._hasUserValues;
},
enumerable: false,
configurable: true
});
IgrFunnelChart.prototype.__m = function (propertyName) {
if (!this._inStyling) {
this._hasUserValues.add(propertyName);
}
};
IgrFunnelChart.prototype._styling = function (container, component, parent) {
if (this._inStyling) {
return;
}
this._inStyling = true;
this._stylingContainer = container;
this._stylingParent = component;
var genericPrefix = "";
var typeName = this.i.$type.name;
if (typeName.indexOf("Xam") === 0) {
typeName = typeName.substring(3);
}
genericPrefix = toSpinal("FunnelChart");
var additionalPrefixes = [];
var prefix = toSpinal(typeName);
additionalPrefixes.push(prefix + "-");
var b = this.i.$type.baseType;
while (b && b.name != "Object" &&
b.name != "Base" &&
b.name != "Control" &&
b.Name != "DependencyObject" &&
b.Name != "FrameworkElement") {
typeName = b.name;
if (typeName.indexOf("Xam") === 0) {
typeName = typeName.substring(3);
}
var basePrefix = toSpinal(typeName);
additionalPrefixes.push(basePrefix + "-");
b = b.baseType;
}
if (parent) {
var parentTypeName = parent.i.$type.name;
if (parentTypeName.indexOf("Xam") === 0) {
parentTypeName = parentTypeName.substring(3);
}
var parentPrefix = toSpinal(parentTypeName);
additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-");
additionalPrefixes.push(parentPrefix + "-" + prefix + "-");
}
initializePropertiesFromCss(container, this, genericPrefix + "-", this.hasUserValues, false, additionalPrefixes);
if (this._otherStyling) {
this._otherStyling(container, component, parent);
}
this._inStyling = false;
};
/**
* Use to force the funnel chart to finish any deferred work before printing or evaluating its visual.
* This should only be called if the visual of the funnel chart needs to be synchronously saved or evaluated.
* Calling this method too often will hinder the performance of the funnel chart.
*/
IgrFunnelChart.prototype.flush = function () {
this.i.d0();
};
/**
* Provides container for funnel chart
*/
IgrFunnelChart.prototype.provideContainer = function (container) {
this.i.provideContainer(container);
};
/**
* Notifies the controller and view about a size change.
*/
IgrFunnelChart.prototype.notifyResized = function () {
this.i.notifyResized();
};
IgrFunnelChart.prototype.notifySetItem = function (source_, index, oldItem, newItem) {
this.i.eb(source_, index, oldItem, newItem);
};
/**
* Manually notifies the chart's data source that the data it has bound to has been cleared and needs to be re-examined.
* This should not be called if the data that the chart is bound to is already observable.
*/
IgrFunnelChart.prototype.notifyClearItems = function (source_) {
this.i.d6(source_);
};
IgrFunnelChart.prototype.notifyInsertItem = function (source_, index, newItem) {
this.i.d8(source_, index, newItem);
};
IgrFunnelChart.prototype.notifyRemoveItem = function (source_, index, oldItem) {
this.i.d9(source_, index, oldItem);
};
/**
* Toggle selection of item at index.
*/
IgrFunnelChart.prototype.toggleSelection = function (index) {
this.i.eo(index);
};
/**
* Exports and serializes the chart visuals.
*/
IgrFunnelChart.prototype.exportSerializedVisualData = function () {
var iv = this.i.cm();
return (iv);
};
Object.defineProperty(IgrFunnelChart.prototype, "selectedItemsChanged", {
/**
* Raised when the SelectedItems collection has changed.
*/
get: function () {
return this._selectedItemsChanged;
},
set: function (ev) {
var _this = this;
if (this._selectedItemsChanged_wrapped !== null) {
this.i.selectedItemsChanged = delegateRemove(this.i.selectedItemsChanged, this._selectedItemsChanged_wrapped);
this._selectedItemsChanged_wrapped = null;
this._selectedItemsChanged = null;
}
this._selectedItemsChanged = ev;
this._selectedItemsChanged_wrapped = function (o, e) {
var outerArgs = new IgrFunnelChartSelectedItemsChangedEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeSelectedItemsChanged) {
_this.beforeSelectedItemsChanged(_this, outerArgs);
}
if (_this._selectedItemsChanged) {
_this._selectedItemsChanged(_this, outerArgs);
}
};
this.i.selectedItemsChanged = delegateCombine(this.i.selectedItemsChanged, this._selectedItemsChanged_wrapped);
;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "sliceClicked", {
/**
* Event which is raised when a slice is clicked.
* Function takes first argument null and second argument ui.
* Use ui.owner to obtain reference to igFunnelChart.
* Use ui.index to obtain index of clicked slice.
* Use ui.item to obtain reference to clicked slice item.
* Use ui.selected to check if slice became selected.
*/
get: function () {
return this._sliceClicked;
},
set: function (ev) {
var _this = this;
if (this._sliceClicked_wrapped !== null) {
this.i.sliceClicked = delegateRemove(this.i.sliceClicked, this._sliceClicked_wrapped);
this._sliceClicked_wrapped = null;
this._sliceClicked = null;
}
this._sliceClicked = ev;
this._sliceClicked_wrapped = function (o, e) {
var outerArgs = new IgrFunnelSliceClickedEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeSliceClicked) {
_this.beforeSliceClicked(_this, outerArgs);
}
if (_this._sliceClicked) {
_this._sliceClicked(_this, outerArgs);
}
};
this.i.sliceClicked = delegateCombine(this.i.sliceClicked, this._sliceClicked_wrapped);
;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "sliceEnter", {
/**
* Raised when a funnel slice is entered.
*/
get: function () {
return this._sliceEnter;
},
set: function (ev) {
var _this = this;
if (this._sliceEnter_wrapped !== null) {
this.i.sliceEnter = delegateRemove(this.i.sliceEnter, this._sliceEnter_wrapped);
this._sliceEnter_wrapped = null;
this._sliceEnter = null;
}
this._sliceEnter = ev;
this._sliceEnter_wrapped = function (o, e) {
var outerArgs = new IgrFunnelSliceEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeSliceEnter) {
_this.beforeSliceEnter(_this, outerArgs);
}
if (_this._sliceEnter) {
_this._sliceEnter(_this, outerArgs);
}
};
this.i.sliceEnter = delegateCombine(this.i.sliceEnter, this._sliceEnter_wrapped);
;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "sliceLeave", {
/**
* Raised when a funnel slice is left.
*/
get: function () {
return this._sliceLeave;
},
set: function (ev) {
var _this = this;
if (this._sliceLeave_wrapped !== null) {
this.i.sliceLeave = delegateRemove(this.i.sliceLeave, this._sliceLeave_wrapped);
this._sliceLeave_wrapped = null;
this._sliceLeave = null;
}
this._sliceLeave = ev;
this._sliceLeave_wrapped = function (o, e) {
var outerArgs = new IgrFunnelSliceEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeSliceLeave) {
_this.beforeSliceLeave(_this, outerArgs);
}
if (_this._sliceLeave) {
_this._sliceLeave(_this, outerArgs);
}
};
this.i.sliceLeave = delegateCombine(this.i.sliceLeave, this._sliceLeave_wrapped);
;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFunnelChart.prototype, "sliceHover", {
/**
* Raised when a funnel slice is hovered.
*/
get: function () {
return this._sliceHover;
},
set: function (ev) {
var _this = this;
if (this._sliceHover_wrapped !== null) {
this.i.sliceHover = delegateRemove(this.i.sliceHover, this._sliceHover_wrapped);
this._sliceHover_wrapped = null;
this._sliceHover = null;
}
this._sliceHover = ev;
this._sliceHover_wrapped = function (o, e) {
var outerArgs = new IgrFunnelSliceEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeSliceHover) {
_this.beforeSliceHover(_this, outerArgs);
}
if (_this._sliceHover) {
_this._sliceHover(_this, outerArgs);
}
};
this.i.sliceHover = delegateCombine(this.i.sliceHover, this._sliceHover_wrapped);
;
},
enumerable: false,
configurable: true
});
return IgrFunnelChart;
}(React.Component));
export { IgrFunnelChart };