UNPKG

igniteui-webcomponents-charts

Version:

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

269 lines (264 loc) 10.6 kB
import { TrendLineType_$type } from "igniteui-webcomponents-core"; import { CategorySeriesMarkerCollisionAvoidance_$type } from "./CategorySeriesMarkerCollisionAvoidance"; import { ConsolidatedItemHitTestBehavior_$type } from "./ConsolidatedItemHitTestBehavior"; import { ValueLayerValueMode_$type } from "./ValueLayerValueMode"; import { IgcCategorySeriesComponent } from "./igc-category-series-component"; import { getAllPropertyNames, toSpinal, ensureEnum, enumToString, brushToString, stringToBrush, toDoubleCollection, fromDoubleCollection, doubleCollectionToString, toPoint, fromPoint } from "igniteui-webcomponents-core"; let IgcAnchoredCategorySeriesComponent = /*@__PURE__*/ (() => { class IgcAnchoredCategorySeriesComponent extends IgcCategorySeriesComponent { /** * @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 (IgcAnchoredCategorySeriesComponent._observedAttributesIgcAnchoredCategorySeriesComponent == null) { let names = getAllPropertyNames(IgcAnchoredCategorySeriesComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcAnchoredCategorySeriesComponent._observedAttributesIgcAnchoredCategorySeriesComponent = names; } return IgcAnchoredCategorySeriesComponent._observedAttributesIgcAnchoredCategorySeriesComponent; } /** * Gets or sets the value mapping property for the current series object. * * The `ValueMemberPath` property is used for the value mapping property of the current series object. */ get valueMemberPath() { return this.i.aca; } set valueMemberPath(v) { this.i.aca = v; } /** * Gets or sets the value mapping property for the current series object. */ get highlightedValueMemberPath() { return this.i.ab2; } set highlightedValueMemberPath(v) { this.i.ab2 = v; } /** * Gets or sets the label displayed before series value in the Data Legend. */ get valueMemberAsLegendLabel() { return this.i.ab6; } set valueMemberAsLegendLabel(v) { this.i.ab6 = v; } /** * Gets or sets the unit displayed after series value in the Data Legend. */ get valueMemberAsLegendUnit() { return this.i.ab8; } set valueMemberAsLegendUnit(v) { this.i.ab8 = v; } /** * Gets or sets the trend type for the current series object. * * The `TrendLineType` property is used for the current series object's trend type.' * * ```ts * series.trendLineType= "CubicFit"; * ``` */ get trendLineType() { return this.i.trendLineType; } set trendLineType(v) { this.i.trendLineType = ensureEnum(TrendLineType_$type, v); this._a("trendLineType", enumToString(TrendLineType_$type, this.i.trendLineType)); } /** * Gets or sets the brush to use to draw the trend line. * * The `TrendLineBrush` property is used to brush the trend line. * * ```ts * series.trendLineBrush="red"; * ``` */ get trendLineBrush() { return brushToString(this.i.trendLineBrush); } set trendLineBrush(v) { this.i.trendLineBrush = stringToBrush(v); this._a("trendLineBrush", brushToString(this.i.trendLineBrush)); } /** * Gets the effective TrendLineBrush for this series. * * The `ActualTrendLineBrush` property is used to gets the effective `TrendLineBrush` for this series. */ get actualTrendLineBrush() { return brushToString(this.i.acx); } set actualTrendLineBrush(v) { this.i.acx = stringToBrush(v); this._a("actualTrendLineBrush", brushToString(this.i.acx)); } /** * Gets or sets the thickness of the current series object's trend line. * * The `TrendLineThickness` property is used for thickness of the current series object's trend line. * * ```ts * series.trendLineThickness= 2; * ``` */ get trendLineThickness() { return this.i.trendLineThickness; } set trendLineThickness(v) { this.i.trendLineThickness = +v; this._a("trendLineThickness", this.i.trendLineThickness); } /** * Gets or sets a collection of double values that indicate the pattern of dashes and gaps that * is used to draw the trend line for the current series object. */ get trendLineDashArray() { return fromDoubleCollection(this.i.acy); } set trendLineDashArray(v) { this.i.acy = toDoubleCollection(v); this._a("trendLineDashArray", doubleCollectionToString(this.i.acy)); } /** * Gets or sets the trend line period for the current series. * The typical, and initial, value for trend line period is 7. * * The `TrendLinePeriod` property is used for trend line period of the current series. * * ```ts * series.trendLinePeriod= 7; * ``` */ get trendLinePeriod() { return this.i.trendLinePeriod; } set trendLinePeriod(v) { this.i.trendLinePeriod = +v; this._a("trendLinePeriod", this.i.trendLinePeriod); } /** * The desired behavior for markers in this series which are placed too close together for the current view, resulting in a collision. * * The `MarkerCollisionAvoidance` property controls the technique the chart uses to avoid overlapping markers. */ get markerCollisionAvoidance() { return this.i.abk; } set markerCollisionAvoidance(v) { this.i.abk = ensureEnum(CategorySeriesMarkerCollisionAvoidance_$type, v); this._a("markerCollisionAvoidance", enumToString(CategorySeriesMarkerCollisionAvoidance_$type, this.i.abk)); } /** * Determines the item returned in hit-testing when the pointer is over an object which represents several consolidated items. * * The `ConsolidatedItemHitTestBehavior` property is used to determines returned item in hit-testing when the pointer is over an object which represents several consolidated items. */ get consolidatedItemHitTestBehavior() { return this.i.abl; } set consolidatedItemHitTestBehavior(v) { this.i.abl = ensureEnum(ConsolidatedItemHitTestBehavior_$type, v); this._a("consolidatedItemHitTestBehavior", enumToString(ConsolidatedItemHitTestBehavior_$type, this.i.abl)); } getItemValue(item, memberPathName) { let iv = this.i.kz(item, memberPathName); return (iv); } /** * Gets the value of a requested member path from the series. * @param memberPathName * The property name of a valid member path for the series */ getMemberPathValue(memberPathName) { let iv = this.i.mo(memberPathName); return (iv); } /** * Scrolls the series to display the item for the specified data item. * The series is scrolled by the minimum amount required to place the specified data item within * the central 80% of the visible axis. * @param item * The data item (item) to scroll to. * * The `ScrollIntoView` method is used to notifies the target axis or series that it should scroll the requested data item into view. * * ```ts * this.series.scrollIntoView(dataItem); * ``` */ scrollIntoView(item) { let iv = this.i.gj(item); return (iv); } /** * Gets the item that is the best match for the specified world coordinates. * @param world * The world coordinates to use. * * The `getItem` method is used to gets the item that is the best match for the specified world coordinates. * * ```ts * let item: number = this.series.getItem({x:.5,y:.5}); * ``` */ getItem(world) { let iv = this.i.kw(toPoint(world)); return (iv); } /** * Gets a numeric value from the numeric axis associated with this series that matches the desired * value mode. * @param mode * The type of value desired from the series numeric axis. */ getSeriesValueType(mode) { let iv = this.i.aq(ensureEnum(ValueLayerValueMode_$type, mode)); return (iv); } getSeriesValueTypePosition(mode) { let iv = this.i.wz(ensureEnum(ValueLayerValueMode_$type, mode)); return fromPoint(iv); } getSeriesValueTypePositionFromValue(values) { let iv = this.i.w0(values); return fromPoint(iv); } } IgcAnchoredCategorySeriesComponent._observedAttributesIgcAnchoredCategorySeriesComponent = null; return IgcAnchoredCategorySeriesComponent; })(); export { IgcAnchoredCategorySeriesComponent };