UNPKG

igniteui-react-charts

Version:

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

122 lines (121 loc) 3.97 kB
import { __extends } from "tslib"; import { UnknownValuePlotting_$type } from "igniteui-react-core"; import { IgrHorizontalAnchoredCategorySeries } from "./igr-horizontal-anchored-category-series"; import { LineSeries } from "./LineSeries"; import { ensureEnum } from "igniteui-react-core"; /** * Represents a IgxDataChartComponent line series. * Displays trend over time or ordered categories. * Useful when there are many data points and the order is important. * * `LineSeries` belongs to a group of `CategorySeries` and it is rendered using a collection of points connected by straight line segments. * * ```ts * <IgrDataChart * dataSource={this.data} > * <IgrCategoryXAxis name="xAxis" * label="Country" /> * <IgrNumericYAxis name="yAxis" * minimumValue={0} /> * <IgrLineSeries * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * valueMemberPath="Coal" /> * </IgrDataChart> * ``` * * ```ts * const series2 = new IgrLineSeries({ name: "series2" }); * series2.markerType = MarkerType.Circle; * series2.valueMemberPath = "RUS"; * series2.title = "Russia"; * series2.xAxisName = "xAxis"; * series2.yAxisName = "yAxis"; * series2.thickness = 2; * ``` */ var IgrLineSeries = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrLineSeries, _super); function IgrLineSeries(props) { return _super.call(this, props) || this; } IgrLineSeries.prototype.createImplementation = function () { return new LineSeries(); }; Object.defineProperty(IgrLineSeries.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrLineSeries.prototype, "isLineOnly", { /** * Gets whether the current series shows only line shapes. */ get: function () { return this.i.fl; }, enumerable: false, configurable: true }); Object.defineProperty(IgrLineSeries.prototype, "isAreaOrLine", { /** * Gets whether the current series shows an area or line shape. * * Gets whether the `Series` shows an area or a line shape. * * ```ts * let isAreaOrLine: boolean = series.isAreaOrLine; * ``` */ get: function () { return this.i.ex; }, enumerable: false, configurable: true }); Object.defineProperty(IgrLineSeries.prototype, "unknownValuePlotting", { /** * Determines how unknown values will be plotted on the chart. * Null and Double.NaN are two examples of unknown values. * * Determines how unknown values will be plotted for the `Series`. This can be set to `LinearInterpolate` to create a continous shape or `DontPlot` to create breaks in the series. * * Null and Double.NaN are two examples of unknown values. * * ```ts * series.unknownValuePlotting = UnknownValuePlotting.LinearInterpolate; * ``` * * ```ts * <IgrDataChart * dataSource={this.data} > * <IgrCategoryXAxis name="xAxis" * label="Country" /> * <IgrNumericYAxis name="yAxis" * minimumValue={0} /> * <IgrLineSeries * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * valueMemberPath="Coal" * unknownValuePlotting:"LinearInterpolate"/> * ``` */ get: function () { return this.i.unknownValuePlotting; }, set: function (v) { this.i.unknownValuePlotting = ensureEnum(UnknownValuePlotting_$type, v); }, enumerable: false, configurable: true }); return IgrLineSeries; }(IgrHorizontalAnchoredCategorySeries)); export { IgrLineSeries };