UNPKG

igniteui-webcomponents-charts

Version:

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

109 lines (108 loc) 4.38 kB
import { UnknownValuePlotting_$type } from "igniteui-webcomponents-core"; import { IgcHorizontalAnchoredCategorySeriesComponent } from "./igc-horizontal-anchored-category-series-component"; import { LineSeries } from "./LineSeries"; import { getAllPropertyNames, toSpinal, ensureEnum, enumToString } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-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. */ export let IgcLineSeriesComponent = /*@__PURE__*/ (() => { class IgcLineSeriesComponent extends IgcHorizontalAnchoredCategorySeriesComponent { createImplementation() { return new LineSeries(); } /** * @hidden */ get i() { return this._implementation; } constructor() { super(); } connectedCallback() { if (super["connectedCallback"]) { super["connectedCallback"](); } if (this.i.connectedCallback) { this.i.connectedCallback(); } if (!this._attached) { this._attached = true; this._flushQueuedAttributes(); } } disconnectedCallback() { if (super["disconnectedCallback"]) { super["disconnectedCallback"](); } if (this.i.disconnectedCallback) { this.i.disconnectedCallback(); } if (this._attached) { this._attached = false; } } static get observedAttributes() { if (IgcLineSeriesComponent._observedAttributesIgcLineSeriesComponent == null) { let names = getAllPropertyNames(IgcLineSeriesComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcLineSeriesComponent._observedAttributesIgcLineSeriesComponent = names; } return IgcLineSeriesComponent._observedAttributesIgcLineSeriesComponent; } static register() { if (!IgcLineSeriesComponent._isElementRegistered) { IgcLineSeriesComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcLineSeriesComponent.htmlTagName, IgcLineSeriesComponent); } } /** * Gets whether the current series shows only line shapes. */ get isLineOnly() { return this.i.fl; } /** * 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 isAreaOrLine() { return this.i.ex; } /** * 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; * ``` */ get unknownValuePlotting() { return this.i.unknownValuePlotting; } set unknownValuePlotting(v) { this.i.unknownValuePlotting = ensureEnum(UnknownValuePlotting_$type, v); this._a("unknownValuePlotting", enumToString(UnknownValuePlotting_$type, this.i.unknownValuePlotting)); } } IgcLineSeriesComponent._observedAttributesIgcLineSeriesComponent = null; IgcLineSeriesComponent.htmlTagName = "igc-line-series"; IgcLineSeriesComponent._isElementRegistered = false; return IgcLineSeriesComponent; })();