UNPKG

igniteui-react-charts

Version:

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

236 lines (232 loc) 7.63 kB
import { IgrSeries } from "./igr-series"; import { ensureBool, fromPoint, toPoint } from "igniteui-react-core"; /** * Provides data for IgxDataChartComponent mouse button related events. * * `DataChartMouseButtonEventHandler` class represents the method that will handle IgxDataChartComponent mouse button related events. * * ```ts * this.chart.seriesMouseLeftButtonDown.subscribe(this.chart_seriesMouseLeftButtonDown); * chart_seriesMouseLeftButtonDown(sender :any,args: DataChartMouseButtonEventArgs ) * { * } * ``` */ var IgrDataChartMouseButtonEventArgs = /** @class */ /*@__PURE__*/ (function () { function IgrDataChartMouseButtonEventArgs() { this.mounted = false; } Object.defineProperty(IgrDataChartMouseButtonEventArgs.prototype, "nativeElement", { get: function () { return this._implementation.nativeElement; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDataChartMouseButtonEventArgs.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgrDataChartMouseButtonEventArgs.prototype.onImplementationCreated = function () { }; IgrDataChartMouseButtonEventArgs.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } }; Object.defineProperty(IgrDataChartMouseButtonEventArgs.prototype, "handled", { /** * Gets or sets a value that indicates the present state of the event handling for a routed * event as it travels the route. * ChartMouseButton events are not routed events; setting this property effects the underlying * MouseButtonEvent. * * Use the `handled` property to indicates the present state of the event handling for a routed event. */ get: function () { return this.i.handled; }, set: function (v) { this.i.handled = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrDataChartMouseButtonEventArgs.prototype, "cancelSelection", { /** * Gets or sets whether to cancel series selection. */ get: function () { return this.i.cancelSelection; }, set: function (v) { this.i.cancelSelection = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrDataChartMouseButtonEventArgs.prototype, "originalSource", { /** * Gets a reference to the object that raised the event. * * Use the `OriginalSource` property for the raised object event. * * ```ts * args.originalSource; * ``` */ get: function () { return this.i.originalSource; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDataChartMouseButtonEventArgs.prototype, "item", { /** * Gets the ItemsSource item associated with the current event. * * Use the `Item` property to get the ItemsSource item associated with the current event. * * ```ts * var item1= args.item; * ``` */ get: function () { return this.i.item; }, set: function (v) { this.i.item = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDataChartMouseButtonEventArgs.prototype, "series", { /** * Gets the series associated with the current event. * * Use the `Series` property for the associated current event. * * ```ts * var DataSeries= args.series; * ``` */ get: function () { var r = this.i.series; if (r == null) { return null; } if (!r.externalObject) { var e = IgrSeries._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, set: function (v) { v == null ? this.i.series = null : this.i.series = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrDataChartMouseButtonEventArgs.prototype, "plotAreaPosition", { /** * Gets the mouse position relative to the plot area. */ get: function () { return fromPoint(this.i.plotAreaPosition); }, set: function (v) { this.i.plotAreaPosition = toPoint(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrDataChartMouseButtonEventArgs.prototype, "chartPosition", { /** * Gets the mouse position relative to the chart. */ get: function () { return fromPoint(this.i.chartPosition); }, enumerable: false, configurable: true }); Object.defineProperty(IgrDataChartMouseButtonEventArgs.prototype, "worldPosition", { /** */ get: function () { return fromPoint(this.i.worldPosition); }, set: function (v) { this.i.worldPosition = toPoint(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrDataChartMouseButtonEventArgs.prototype, "chart", { /** * Gets the Chart associated with the current event. * * Use the `Chart` property to get the chart associated with the current event. * * ```ts * var dataChart= args.chart; * ``` */ get: function () { var r = this.i.chart; if (r == null) { return null; } return r.externalObject; }, set: function (v) { v == null ? this.i.chart = null : this.i.chart = v.i; }, enumerable: false, configurable: true }); /** * Provides a human readable description of the mouse button event. * * Use the `ToString` property to provides a human readable discription. * * ```ts * var item= args.item.label.toString(); * ``` */ IgrDataChartMouseButtonEventArgs.prototype.toString = function () { var iv = this.i.toString(); return (iv); }; /** * Returns the x- and y- coordinates of the mouse pointer position, optionally evaluated * against the origin of a supplied UIElement. * @param relativeTo * Any UIElement derived object that is contained by the the engine plug-in * and connected to the object tree. To specify the object relative to the overall the engine * coordinate system, use a relativeTo value of null. * * To get mouse X and Y position. * * ```ts * var args.getPosition; * ``` */ IgrDataChartMouseButtonEventArgs.prototype.getPosition = function (relativeTo) { var iv = this.i.getPosition(relativeTo); return fromPoint(iv); }; return IgrDataChartMouseButtonEventArgs; }()); export { IgrDataChartMouseButtonEventArgs };