import * as i14 from '@angular/cdk/overlay'; import { ConnectedPosition, Overlay, OverlayPositionBuilder, ScrollStrategyOptions } from '@angular/cdk/overlay'; import * as i0 from '@angular/core'; import { OnInit, OnDestroy, ElementRef, TemplateRef, OnChanges, SimpleChanges, QueryList, ChangeDetectorRef, InjectionToken, EventEmitter, AfterViewInit, AfterContentInit, NgZone } from '@angular/core'; import * as rxjs from 'rxjs'; import { Subject, Observable, BehaviorSubject } from 'rxjs'; import { ScaleLinear } from 'd3-scale'; import { Selection } from 'd3-selection'; import { ValueMap } from 'd3-selection-multi'; import { AxisScale, Axis } from 'd3-axis'; import * as i13 from '@nova-ui/bits'; import { UnitOption, PopoverComponent, LoggerService } from '@nova-ui/bits'; import { CurveFactory, Arc, DefaultArcObject } from 'd3-shape'; import { BaseType, DefaultArcObject as DefaultArcObject$1 } from 'd3'; import moment, { Duration } from 'moment/moment'; import { Numeric } from 'd3-array'; /** @ignore */ declare class ChartTooltipDirective implements OnInit, OnDestroy { private overlay; private overlayPositionBuilder; private scrollStrategyOptions; elementRef: ElementRef; template: TemplateRef; openRemoteControl: Subject; closeRemoteControl: Subject; positions: ConnectedPosition[]; private overlayRef; private openSubscription; private closeSubscription; private positionStrategy; constructor(overlay: Overlay, overlayPositionBuilder: OverlayPositionBuilder, scrollStrategyOptions: ScrollStrategyOptions, elementRef: ElementRef); ngOnInit(): void; show(): void; hide(): void; ngOnDestroy(): void; getOverlayElement(): HTMLElement; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class ChartTooltipComponent { template: TemplateRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare abstract class ChartPlugin implements IChartPlugin { constructor(); chart: IChart; initialize(): void; update(): void; updateDimensions(): void; destroy(): void; } /** Domain for series with empty or null data */ declare const EMPTY_CONTINUOUS_DOMAIN: number[]; /** A reasonable non-data-driven domain for charts */ declare const NORMALIZED_DOMAIN: number[]; /** Signature for domain calculator */ type DomainCalculator = (chartSeriesSet: IChartSeries[], scaleId: string, scale: IScale) => any[]; /** Signature for a specific domain calculator that rounds domain to the closes tick */ interface IDomainWithTicksCalculator extends DomainCalculator { domainWithTicks?: true; } /** Type guard for the domain calculator with ticks */ declare function isDomainWithTicksCalculator(obj: any): obj is IDomainWithTicksCalculator; /** Interface for scale formatters */ interface IFormatters { /** Formatter for tick labels */ tick?: Formatter; /** Additional formatters */ [p: string]: Formatter | undefined; } /** Signature for label formatters */ type Formatter = (value: T) => string; /** Dictionary of scale collections in index and array form */ interface ScalesIndex { [key: string]: { /** Scale collection as an index */ index: { [scaleId: string]: IScale; }; /** Scale collection as an array */ list: IScale[]; }; } /** Dictionary of scales */ type Scales = Record>; interface IXYScales extends Scales { x: IScale; y: IScale; } interface IRadialScales extends Scales { r: IScale; } /** Interface for a scale */ interface IScale { /** The scale identifier */ readonly id: string; readonly d3Scale: AxisScale; fixDomainValues?: T[]; /** If this flag is enabled, the domain of this scale is not recalculated */ isDomainFixed?: boolean; /** Method used to calculate the scale's domain */ domainCalculator?: DomainCalculator; /** The scales formatters */ formatters: IFormatters; /** If this flag is enabled, the domain has been recalculated with ticks in mind */ __domainCalculatedWithTicks?: boolean; scaleUnits?: UnitOption; /** If this flag is enabled, the label generated by InteractionLabelPlugin will be shown only on a chart that is beeing hovered */ isTimeseriesScale?: boolean; /** * Sets fix domain to the first and last value and assigns values to fixDomainValues property */ setFixDomainValues?(values: T[]): void; /** * Determines if the scale's domain is continuous * * @returns {boolean} true if the scale's domain is continuous (numeric), false otherwise */ isContinuous(): boolean; /** * Determines if the scale's domain is valid * * @returns {boolean} true if the scale's domain is valid, false otherwise */ isDomainValid(): boolean; /** * Converts a value to its corresponding coordinate * * @param {T} value The value to be converted * @returns {number} The coordinate corresponding to the specified value */ convert(value: T): number; /** * Converts a coordinate to its corresponding value * * @param {number} coordinate The coordinate to be converted * @returns {T} The value corresponding to the specified coordinate */ invert(coordinate: number): T | undefined; /** * Gets the scale's range * * @returns {[number, number]} The scale's range */ range(): [number, number]; /** * Sets the scale's range * * @param {[number, number]} range The scale's new range */ range(range: [number, number]): this; /** * Gets the scale's domain * * @returns {T[]} The scale's domain */ domain(): T[]; /** * Sets the scale's domain * * @param {T[]} domain The scale's new domain */ domain(domain: T[]): this; /** * Shorthand method for setting the domain and isDomainFixed at once * * @param {T[]} domain The scale's fixed domain */ fixDomain(domain: T[]): void; /** * Reverse the scale orientation by toggling the reversed flag */ reverse(): this; /** * Getter for the reversed flag (see #reverse) */ reversed(): boolean; /** * Setter for the reversed flag (see #reverse) * * @param reversed */ reversed(reversed: boolean): this; } interface IBandScale extends IScale { bandwidth(): number; } declare function isBandScale(scale: any): scale is IBandScale; interface IHasInnerScale extends IScale { innerScale: IScale; } declare function hasInnerScale(scale: any): scale is IHasInnerScale; /** * @ignore * * Manages data and their domains */ declare class DataManager { private chart?; private _chartSeriesSet; private dataIndex; private _scalesIndexByKey; private _scalesIndexById; get chartSeriesSet(): IChartSeries[]; get scalesIndexByKey(): ScalesIndex; get scalesIndexById(): { [scaleId: string]: IScale; }; constructor(chart?: IChart | undefined); update(seriesSet: IChartSeries[]): void; getChartSeries(seriesId: string): IChartSeries; private updateScaleDomain; private buildScalesIndex; updateScaleDomains(): void; } declare class EventBus { private streams; getStream(streamId: string): Subject; destroy(): void; } /** @ignore */ declare class Lasagna { private readonly clipPath; static CONTAINER_CLASS: string; static LAYER_CLASS: string; layers: ILasagnaLayer[]; private readonly container; constructor(target: D3Selection, clipPath: string); addLayer(layer: ILasagnaLayer): D3Selection; removeLayer(layerName: string): void; getLayerContainer(name: string): D3Selection; getContainer(): D3Selection; private update; } /** * @ignore * * Manages and executes drawing and data point highlighting for each data series renderer and handles the setting of series display states */ declare class RenderEngine { private lasagna; private dataManager; /** Subject for emitting events to the outside world about data points closest to an interaction on the chart */ interactionDataPointsSubject: Subject; /** Subject passed to the renderer for triggering events regarding a data point */ rendererSubject: Subject>; private highlightDataPointSubscription; private highlightedDataPoints; private renderLayers; private layerIndex; constructor(lasagna: Lasagna, dataManager: DataManager); /** * Invokes the draw method on each of the series renderers */ update(): void; /** * Updates the lasagna layers and series containers based on the current series set */ updateSeriesContainers(): void; /** * Emits the HIGHLIGHT_DATA_POINT_EVENT if the highlighted index changes for a particular series. * Emits an event with information about all of the highlighted data points if the highlighted index changes for any series. * * @param {IHighlightXYPayload} highlightedValues The highlighted values for each scale */ emitInteractionDataPoints(payload: IInteractionValuesPayload): void; /** * Invokes the renderer highlightDataPoint method for the specified series * * @param {string} seriesId The series on which to highlight a data point * @param {number} index The data point index to highlight */ highlightDataPoint(seriesId: string, index: number): void; /** * Sets attributes specified in each state data object to the appropriate the series containers. * Invokes a renderer's setSeriesState method when the state of its series container has been updated. * * @param {IRenderStateData[]} stateDataSet A collection of series states */ setSeriesStates(stateDataSet: IRenderStateData[]): void; destroy(): void; private buildLayerIndex; private removeUnusedLayers; private addNeededLayers; private updateLayerContents; private getSeriesChildContainers; private getChildContainerId; } interface IStartEndRangeAccessors extends IDataAccessors { start: DataAccessor; end: DataAccessor; } interface IValueThicknessAccessors extends IDataAccessors { value: DataAccessor; thickness: DataAccessor; } interface IRectangleDataAccessors extends IDataAccessors { startX?: DataAccessor; endX?: DataAccessor; thicknessX?: DataAccessor; startY?: DataAccessor; endY?: DataAccessor; thicknessY?: DataAccessor; } interface IRectangleSeriesAccessors extends ISeriesAccessors { color?: SeriesAccessor; marker?: SeriesAccessor; } interface IRectangleAccessors extends IAccessors { data: IRectangleDataAccessors; series: IRectangleSeriesAccessors; } declare class RectangleAccessors implements IRectangleAccessors { data: IRectangleDataAccessors; series: IRectangleSeriesAccessors; constructor(); } declare class XYRenderer extends Renderer { /** See {@link Renderer#draw} */ draw(renderSeries: IRenderSeries, rendererSubject: Subject): void; /** See {@link Renderer#getDataPointPosition} */ getDataPointPosition(dataSeries: IDataSeries, index: number, scales: Scales): IPosition | undefined; /** See {@link Renderer#getDataPointIndex} */ getDataPointIndex(series: IDataSeries, values: { [p: string]: any; }, scales: Scales): number; } /** * Renderer that is able to draw bar chart */ declare class BarRenderer extends XYRenderer { config: IBarRendererConfig; /** * Creates an instance of BarRenderer. * @param {IBarRendererConfig} [config] Renderer configuration object */ constructor(config?: IBarRendererConfig); static THICK: number; static THIN: number; static MIN_BAR_SIZE_FOR_ICON: number; static MIN_BAR_THICKNESS: number; static readonly BAR_RECT_CLASS = "bar"; DEFAULT_CONFIG: IBarRendererConfig; readonly barContainerClass = "bar-container"; /** See {@link Renderer#draw} */ draw(renderSeries: IRenderSeries, rendererSubject: Subject): void; /** See {@link Renderer#getDataPointIndex} */ getDataPointIndex(series: IDataSeries, values: { [p: string]: any; }, scales: Scales): number; /** See {@link Renderer#highlightDataPoint} */ highlightDataPoint(renderSeries: IRenderSeries, dataPointIndex: number, rendererSubject: Subject): void; /** See {@link Renderer#getDataPointPosition} */ getDataPointPosition(dataSeries: IDataSeries, index: number, scales: Scales): IPosition; getDataPoint(renderSeries: IRenderSeries, data: any, i: number): IDataPoint; filterDataByDomain(data: any[]): any[]; getDomain(data: any[], dataSeries: IDataSeries, scaleKey: string, scale: IScale): any[]; protected emitBarClick(renderSeries: IRenderSeries, data: any, i: number, rendererSubject: Subject): void; /** * Returns function to generate attributes to draw bar from dataSeries that typically comes from preprocessor with help of accessors that * are aware of how to access renderParameters to draw individual bars * @param dataSeries Series to draw * @param scales Scales used to draw bars * Except of bars this is also used for highlights (which may have a bit different values) */ protected getAttrsGenerator(dataSeries: IDataSeries, scales: Scales): (d: any, i: number) => IPosition; private getDimensions; } interface IXYDataAccessors { /** Accessor for value plotted on the x coordinate */ x: DataAccessor; /** Accessor for value plotted on the y coordinate */ y: DataAccessor; /** Additional custom keys to match the base interface */ [key: string]: DataAccessor | undefined; } declare class XYAccessors implements IAccessors { /** The default data accessors for using with renderers deriving from XYRenderer */ data: IXYDataAccessors; } interface ILineDataAccessors extends IXYDataAccessors { defined?: DataAccessor; } /** * Series accessors used in {@link LineAccessors}. */ interface ILineSeriesAccessors { /** Color of the series */ color?: SeriesAccessor; /** Marker for the series */ marker?: SeriesAccessor; /** Additional custom keys to match the base interface */ [key: string]: SeriesAccessor | undefined; } interface ILineAccessors extends IAccessors { data: ILineDataAccessors; /** Series level accessors - e.g. for colors, markers, etc. */ series: ILineSeriesAccessors; } /** * Accessor class supporting the {@link LineRenderer}, that defines required inputs acquired from data points. * This class includes default behavior for all required fields. It's using properties of the same name for data accessors. *

* If colorProvider or markerProvider is not defined in the constructor, every new instance of LineAccessors will instantiate it's own, so that has to be * kept in mind when configuring charts as it could cause potential color synchronization problems. * *

See referenced data and series interfaces for required properties.

*/ declare class LineAccessors extends XYAccessors implements ILineAccessors { colorProvider: IValueProvider; markerProvider: IValueProvider; data: ILineDataAccessors; series: ILineSeriesAccessors; constructor(colorProvider?: IValueProvider, markerProvider?: IValueProvider); } /** * Renderer that is able to draw line chart */ declare class LineRenderer extends XYRenderer { readonly config: ILineRendererConfig; static UNCLIPPED_DATA_LAYER_NAME: string; static LINE_CAP_CLASS_NAME: string; static getStrokeStyleDashed(width: number): string; static getStrokeStyleDotted(width: number): string; private DEFAULT_CONFIG; /** * Creates an instance of LineRenderer. * @param {ILineRendererConfig} [config={}] Renderer configuration object */ constructor(config?: ILineRendererConfig); /** See {@link Renderer#draw} */ draw(renderSeries: IRenderSeries, rendererSubject: Subject): void; /** * When the data contains only one data point with undefined 'x' value, it is considered an infinite line and special approach is applied * * @param renderSeries */ isInfiniteLineData(renderSeries: IRenderSeries): boolean; /** * Renders the line in prepared element * * @param {IRenderSeries} renderSeries * @param {D3Selection} path D3 Selection with element pre-created and pre-styled */ drawLine(renderSeries: IRenderSeries, path: D3Selection): void; /** See {@link Renderer#highlightDataPoint} */ highlightDataPoint(renderSeries: IRenderSeries, dataPointIndex: number, rendererSubject: Subject): void; /** See {@link Renderer#getRequiredLayers} */ getRequiredLayers(): ILasagnaLayer[]; /** See {@link Renderer#getDataPointPosition} */ getDataPointPosition(dataSeries: IDataSeries, index: number, scales: Scales): IPosition | undefined; private drawStandardLine; private drawInfiniteLine; private updateLineCaps; } declare enum RenderState { hidden = "hidden", deemphasized = "deemphasized", emphasized = "emphasized", default = "default" } declare enum RenderLayerName { background = "background", data = "data", unclippedData = "unclipped-data", foreground = "foreground" } /** The configuration interface for marker interaction */ interface IMarkerInteractionConfig { /** Enables mouse events on data point markers */ enabled: boolean; /** Enables the pointer style mouse cursor when data point markers are hovered */ clickable?: boolean; } /** The configuration interface for the enhanced line caps */ interface IEnhancedLineCapConfig { /** Set the stroke color */ stroke?: string; /** Set the stroke width in pixels */ strokeWidth?: number; /** Set the fill color */ fill?: string; /** Set the radius in pixels */ radius?: number; } /** The configuration interface for the line renderer */ interface ILineRendererConfig extends IRendererConfig { /** Set the width of the line in pixels */ strokeWidth?: number; /** Set the stroke-dasharray of the line, e.g. "1,1", "2,2", etc. */ strokeStyle?: string; /** Set the stroke-linecap of the line, e.g. "round" */ strokeLinecap?: string; /** Set the d3 curve algorithm to be used for drawing the lines */ curveType?: CurveFactory; /** Set the strategy for determining the behavior of the chart resulting from user interaction, e.g. LineSelectSeriesInteractionStrategy */ interactionStrategy?: IHighlightStrategy; /** Configure the interaction behavior for markers */ markerInteraction?: IMarkerInteractionConfig; /** Set whether enhanced line caps should be displayed */ useEnhancedLineCaps?: boolean; /** Optionally configure enhanced line caps. Prerequisite: 'useEnhancedLineCaps' is set to true */ enhancedLineCap?: IEnhancedLineCapConfig; } /** The configuration interface for the bar renderer */ interface IBarRendererConfig extends IRendererConfig { /** Set the padding on both sides of each bar */ padding?: number; /** Set the class name to apply custom styles to the bars */ barClass?: string; /** Set the strategy for determining the behavior of the chart resulting from user interaction, e.g. BarHighlightStrategy */ highlightStrategy?: IHighlightStrategy; /** Set the mouse cursor style to use when hovering over individual bars */ cursor?: string; /** Enables pointer events on the bars */ pointerEvents?: boolean; /** Set the stroke width in pixels */ strokeWidth?: number; /** Enable the minimum bar thickness (BarRenderer.MIN_BAR_THICKNESS) */ enableMinBarThickness?: boolean; } /** The configuration interface for the area renderer */ interface IAreaRendererConfig extends IRendererConfig { /** Set the d3 curve algorithm to be used for drawing the area boundaries */ curveType?: CurveFactory; /** Set the class name to apply custom styles to the areas */ areaClass?: string; /** Enables the pointer cursor when data point markers are hovered */ markerInteraction?: IMarkerInteractionConfig; /** The width of the area path's stroke in pixels. Default is 1. */ strokeWidth?: number; } interface IRenderSeries { dataSeries: IDataSeries; containers: IRenderContainers; scales: Scales; parentContainer?: D3Selection; } interface IHighlightStrategy, T = Renderer> { getDataPointIndex(renderer: T, series: IDataSeries, values: { [p: string]: any; }, scales: Scales): number; highlightDataPoint(renderer: T, renderSeries: IRenderSeries, dataPointIndex: number, rendererSubject: Subject): void; draw(renderer: T, renderSeries: IRenderSeries, rendererSubject: Subject): void; } /** * The abstract base class for chart renderers with some limited default functionality */ declare abstract class Renderer { config: IRendererConfig; static readonly DEFAULT_CONFIG: IRendererConfig; constructor(config?: IRendererConfig); interaction: Record; /** * Draw the visual representation of the provided data series * * @param {IRenderSeries} renderSeries The series to render * @param {Subject} rendererSubject A subject to optionally invoke for emitting events regarding a data point */ abstract draw(renderSeries: IRenderSeries, rendererSubject: Subject): void; /** * Return position of a specified datapoint * * @param {IDataSeries} dataSeries * @param {number} index * @param {Scales} scales * @returns {IPosition} */ abstract getDataPointPosition(dataSeries: IDataSeries, index: number, scales: Scales): IPosition | undefined; /** * Based on provided values, return the nearest data point that the given coordinates represent. This is used for mouse hover behavior * * @param {IDataSeries} series series from which to determine the index corresponding to the specified values * @param {{ [axis: string]: any }} values the values from which a data point index can be determined * @param {Scales} scales the scales to be used in the index calculation * * @returns {number} negative value means that index is not found */ getDataPointIndex(series: IDataSeries, values: { [axis: string]: any; }, scales: Scales): number; /** * Highlight the data point corresponding to the specified data point index * * @param {IRenderSeries} renderSeries The series on which to render the data point highlight * @param {number} dataPointIndex index of the highlighted point within the data series (pass -1 to remove the highlight marker) * @param {Subject} rendererSubject A subject to optionally invoke for emitting events regarding a data point */ highlightDataPoint(renderSeries: IRenderSeries, dataPointIndex: number, rendererSubject: Subject): void; /** * Get the style attributes for the specified state that we need to apply to a series container * * @param {RenderState} state the state for which to retrieve container styles * * @returns {ValueMap} the container styles for the specified state */ getContainerStateStyles: (state: RenderState) => ValueMap; /** * Set the RenderState of the target data series * * @param {IRenderContainers} renderContainers the render containers of the series * @param {RenderState} state The new state for the target series */ setSeriesState(renderContainers: IRenderContainers, state: RenderState): void; /** * Set the RenderState of the target data point * * @param {D3Selection} target the target data point * @param {RenderState} state The new state for the target data point */ setDataPointState(target: D3Selection, state: RenderState): void; /** * Calculate domain for data filtered by given filterScales * * @param dataSeries * @param filterScales * @param scaleKey * @param scale * @returns array of datapoints from dataSeries filtered by domains of given filterScales */ getDomainOfFilteredData(dataSeries: IDataSeries, filterScales: Record>, scaleKey: string, scale: IScale): any[]; /** * Calculate the domain using the data of a series * * @param {any[]} data source data, can be filtered * @param dataSeries related data series * @param {string} scaleName name of the scale for which domain calculation is needed * @param scale * * @returns {[any, any]} min and max values as an array */ getDomain(data: any[], dataSeries: IDataSeries, scaleName: string, scale: IScale): any[]; /** * Filters given dataset by domain of provided scale * * @param data * @param dataSeries * @param scaleName * @param domain */ filterDataByDomain(data: any[], dataSeries: IDataSeries, scaleName: string, domain: any[]): any[]; /** * Get the definitions of lasagna layers required for visualizing data * * @returns {ILasagnaLayer[]} lasagna layer definitions */ getRequiredLayers(): ILasagnaLayer[]; protected setupInteraction(path: string[], nativeEvent: string, target: Selection, dataPointSubject: Subject, dataPoint: Partial): void; } /** * Interface for defining aspects of the top, right, bottom, and left sides of a grid */ interface IAllAround { /** Object defining aspects of the top of an entity */ top: T; /** Object defining aspects of the right side of an entity */ right: T; /** Object defining aspects of the bottom of an entity */ bottom: T; /** Object defining aspects of the left side of an entity */ left: T; } /** * The width and height of an grid */ interface IDimensions { width: number; height: number; } /** * Configuration of grid dimensions */ interface IDimensionConfig { /** The top, right, bottom, and left margin sizes in pixels */ margin: IAllAround; /** The top, right, bottom, and left padding sizes in pixels */ padding: IAllAround; /** Sets whether the grid uses the chart's container to determine its width */ autoWidth: boolean; /** Sets whether the grid uses the chart's container to determine its height */ autoHeight: boolean; /** Set of booleans indicating whether a specific margin will be recalculated on chart dimension updates */ marginLocked?: IAllAround; /** * Sets the grid's width. Note: 'autoWidth' must be set to false for this setting to have an effect. * * @param {number} value The new grid width * @returns {IDimensionConfig} The resulting dimension config */ width(value: number): IDimensionConfig; /** * Gets the grid's width -- excluding margins. * * @returns {number} The grid's width */ width(): number; /** * Sets the grid's height. Note: 'autoHeight' must be set to false for this setting to have an effect. * * @param {number} value The new grid height * @returns {IDimensionConfig} The resulting dimension config */ height(value: number): IDimensionConfig; /** * Gets the grid's height -- excluding margins. * * @returns {number} The grid's height */ height(): number; /** * Sets the grid's width by subtracting the grid's horizontal margins from the specified value. * Note: 'autoWidth' must be set to false for this setting to have an effect. * * @param {number} value The new width plus the grid's horizontal margins * @returns {IDimensionConfig} The resulting dimension config */ outerWidth(value: number): IDimensionConfig; /** * Gets the grid's width -- including horizontal margins. * * @returns {number} The grid's width plus horizontal margins */ outerWidth(): number; /** * Sets the grid's height by subtracting the grid's vertical margins from the specified value. * Note: 'autoWidth' must be set to false for this setting to have an effect. * * @param {number} value The new height plus the grid's vertical margins * * @returns {IDimensionConfig} The resulting dimension config */ outerHeight(value: number): IDimensionConfig; /** * Gets the grid's height -- including vertical margins. * * @returns {number} The grid's height plus vertical margins */ outerHeight(): number; } /** * Interface for defining the SVGElements forming the top, right, bottom, and left borders of an entity */ type IBorders = IAllAround; /** * Configuration of grid borders */ interface IBorderConfig { /** The stroke color */ color?: string; /** The thickness of the border */ width?: number; /** The class name */ className?: string; /** Boolean indicating whether the border should be visible */ visible?: boolean; } interface ITextOverflowArgs { widthLimit: number; horizontalPadding: number; ellipsisWidth: number; } /** Type for tick overflow handler */ type TextOverflowHandler = (textSelection: Selection, args: ITextOverflowArgs) => void; /** Interface representing the configuration for tick labels */ interface ITickLabelConfig { /** * Padding for left and right sides of label used for calculating text overflow limits * (number represents the padding on each side) */ horizontalPadding: number; /** Handler for text overflow. Set to 'undefined' to disable overflow handling */ overflowHandler?: TextOverflowHandler; /** * Setting this insures the label's width is smaller or equal to the provided number */ maxWidth?: number; } /** Configuration of a grid axis */ interface IAxisConfig { /** Boolean indicating whether the axis should be visible */ visible: boolean; /** The approximate number of ticks to display */ approximateTicks: number; /** Boolean indicating whether grid ticks should be displayed */ gridTicks: boolean; /** The length of the ticks in pixels */ tickSize: number; /** Configuration for the tick labels */ tickLabel: ITickLabelConfig; /** Sets whether to fit the grid margins to the axis labels */ fit: boolean; /** Sets the axis padding */ padding: number; } /** * Basic grid configuration */ interface IGridConfig { /** Boolean indicating whether the grid will respond to mouse events */ interactive: boolean; /** Configuration for the grid's dimensions */ dimension: IDimensionConfig; /** Configuration for the grid's borders */ borders: IAllAround; /** String indicating the desired cursor style */ cursor: string; /** Set to true to disable the render area height correction */ disableRenderAreaHeightCorrection?: boolean; /** Set to true to disable the render area width correction */ disableRenderAreaWidthCorrection?: boolean; } /** * Configuration for an XYGrid */ interface IXYGridConfig extends IGridConfig { /** The IAllAround value for the grid's axis configurations */ axis: IAllAround; /** * Add interaction line and label plugins automatically * Note: This was added to prevent a breaking change. We should avoid this kind of option in future * versions of IXYGridConfig because ideally all plugins should be added manually (NUI-3304). */ interactionPlugins: boolean; } /** * The basic interface for a grid's dimensions, scaling, interaction, and borders * * @interface */ interface IGrid { /** The grid scales * * @type {ScalesIndex} */ scales: ScalesIndex; /** * Subject for indicating that the chart's dimensions should be updated */ updateChartDimensionsSubject?: Subject; /** * Chart event bus */ eventBus: EventBus; /** * Provides access to the grid's layering mechanism * * @returns {Lasagna} The grid's layering mechanism */ getLasagna(): Lasagna; /** * Provides access to the grid's interactive area * * @returns {D3Selection} The grid's interactive area */ getInteractiveArea(): D3Selection; /** * getter for the grid's target d3 selection * * @returns {D3Selection} The grid's target d3 selection */ target(): D3Selection; /** * setter for the grid's target d3 selection * * @param {D3Selection} [target] The grid's new target d3 selection * @returns {IGrid} The grid instance */ target(target: D3Selection): IGrid; target(target: D3Selection): D3Selection | IGrid; /** * getter for the grid configuration * * @returns {IGridConfig} The grid configuration */ config(): IGridConfig; /** * setter for the grid configuration * * @param {IGridConfig} config The new grid configuration * @returns {this} The grid instance */ config(config: IGridConfig): this; /** * Builds the grid's rendered elements * * @returns {IGrid} The grid instance */ build(): IGrid; /** * Updates the grid's rendered elements based on the current scales and configuration * * @returns {IGrid} The grid instance */ update(): IGrid; /** * Updates the grid's dimensions as specified * * @param {Partial} dimensions The new grid dimensions * @returns {IGrid} The grid instance */ updateDimensions(dimensions: Partial): IGrid; /** * Updates the ranges on the grid's scales based on the grid's configured dimensions * * @returns {IGrid} The grid instance */ updateRanges(): IGrid; /** * Builds the grid's plugins * * @returns {IChartPlugin[]} The set of generated plugins */ buildPlugins(chart: IChart): IChartPlugin[]; } /** * Interface for a d3 axis entity */ interface IAxis { /** The d3 group element for the axis label */ labelGroup: D3Selection; /** The d3 group element for the axis ticks */ tickGroup: D3Selection; /** The d3 group element for the axis */ group: D3Selection; /** The d3 axis */ axis: Axis; } declare const GAUGE_QUANTITY_SERIES_ID = "quantity"; declare const GAUGE_REMAINDER_SERIES_ID = "remainder"; declare const GAUGE_THRESHOLD_MARKERS_SERIES_ID = "threshold-markers"; /** * The visualization modes for a gauge */ declare enum GaugeMode { Donut = "donut", Horizontal = "horizontal", Vertical = "vertical" } /** * Standard thicknesses for the linear gauge */ declare enum StandardLinearGaugeThickness { Small = 10, Large = 15 } /** * Standard values for gauge threshold marker radii */ declare enum StandardGaugeThresholdMarkerRadius { Small = 3, Large = 4 } /** * Standard values for gauge threshold marker radii */ declare enum StandardGaugeThresholdId { Warning = "warning", Critical = "critical" } /** * Standard gauge colors */ declare enum StandardGaugeColor { /** Standard color for the part of the gauge that's not filled in */ Remainder = "var(--nui-color-semantic-unknown-bg-hover)", /** Standard color for the value part of the gauge when the value represents an ok status */ Ok = "var(--nui-color-chart-one)", /** Standard color for the value part of the gauge when the value has a warning status */ Warning = "var(--nui-color-semantic-warning)", /** Standard color for the value part of the gauge when the value has a critical status */ Critical = "var(--nui-color-semantic-critical)" } /** * Default donut gauge margin for label clearance */ declare const DONUT_GAUGE_LABEL_CLEARANCE_DEFAULT = 30; /** * Default linear gauge margins for label clearance */ declare const LINEAR_GAUGE_LABEL_CLEARANCE_DEFAULTS: IAllAround; /** * Short-form alias for the most commonly used generic D3 Selection type */ type D3Selection = Selection; /** * Signature for data accessors * * @param d data point * @param i index * @param series the whole data series */ type DataAccessor = (d: D, i: number, series: D[], dataSeries: IDataSeries) => T; /** * Signature for series accessors */ type SeriesAccessor = (seriesId: string, series: IDataSeries) => any; /** @ignore */ interface ILasagnaLayer { name: string; order: number; clipped: boolean; } /** Mouse interaction types */ declare enum InteractionType { /** Indicates that an element has been clicked */ Click = "click", /** Indicates that an element is hovered */ Hover = "hover", /** Indicates a 'mousedown' event */ MouseDown = "mousedown", /** Indicates that the mouse has entered the bounds of an element */ MouseEnter = "mouseenter", /** Indicates that the mouse has left the bounds of an element */ MouseLeave = "mouseleave", /** Indicates a movement of the mouse across the chart */ MouseMove = "mousemove", /** Indicates a 'mouseup' event */ MouseUp = "mouseup" } /** @ignore */ interface ICoordinates { x: number; y: number; } /** @ignore */ interface IInteractionEvent { type: InteractionType; coordinates: ICoordinates; } /** * Information about the render state of a series */ interface IRenderStateData { /** Series identifier */ seriesId: string; /** Series render state */ state: RenderState; /** Series */ series?: IChartSeries; } /** @ignore */ interface IDomainLimits { min: T; max: T; } interface IRendererConfig { stateStyles?: Record>; transitionDuration?: number; interactive?: boolean; /** Excludes series from scale domain calculations */ ignoreForDomainCalculation?: boolean; } interface IRadialRendererConfig extends IRendererConfig { annularWidth?: number; annularPadding?: number; /** annularGrowth is a percentage value to define annular width automatically. * It will grow until it reaches maxThickness. * Set one to 0 to use annularWidth constant value instead */ maxThickness?: number; annularGrowth?: number; cursor?: string; strokeWidth?: number; enableSeriesHighlighting?: boolean; enableDataPointHighlighting?: boolean; } /** * Standard configuration for gauge threshold renderers */ interface IGaugeThresholdsRendererConfig { /** The radius of each threshold marker */ markerRadius?: StandardGaugeThresholdMarkerRadius | number; /** Boolean indicating whether the renderer is enabled */ enabled?: boolean; } /** * Configuration for the DonutGaugeThresholdsRenderer */ interface IDonutGaugeThresholdsRendererConfig extends IRadialRendererConfig, IGaugeThresholdsRendererConfig { } /** * Configuration for the LinearGaugeThresholdsRenderer */ interface ILinearGaugeThresholdsRendererConfig extends IRendererConfig, IGaugeThresholdsRendererConfig { } interface ILinearScales { x: ScaleLinear; y: ScaleLinear; } interface IDataAccessors { [key: string]: DataAccessor | undefined; } interface ISeriesAccessors { [key: string]: SeriesAccessor | undefined; } /** * Accessors describe the data for the consumers. */ interface IAccessors { /** Data point level accessors for defining what part of a datum is used for visualizations */ data?: IDataAccessors; /** Series level accessors - e.g. for colors, markers, etc. */ series?: ISeriesAccessors; } /** * A set of data to visualize on the chart */ interface IDataSeries, D = any> { /** The series identifier */ id: string; /** * The series data. It is an array of arbitrary objects, the structure of which is prescribed by the consumer of this data series. Specific * renderers require specific accessor keys that are used to access values on data points. The renderers and other consumers rarely access * data point properties directly, but usually through accessors. */ data: D[]; /** Accessors describing the data */ accessors: A; /** Allow any properties to be stored on this object to facilitate the transfer of data from APIs */ [key: string]: any; } /** * The set of elements required for a chart to visualize some data */ interface IChartSeries extends IDataSeries { /** The renderer to be used for visualizing the data */ renderer: Renderer; /** * Information about how chart data should conform to the drawable area. * Grids expect certain scale keys to be used depending on the type of grid, for example an x-y grid * uses 'x' and 'y' as the keys for its scales. */ scales: Scales; /** * Represents an emphasis/visibility state of this series */ renderState?: RenderState; } interface IChartAssistSeries extends IChartSeries { /** * Whether this series should be shown in the legend */ showInLegend?: boolean; /** * Whether this series should be preprocessed in the chart assist */ preprocess?: boolean; } interface IChartMarker { getSvg(): string; setColor(color: string): void; } interface IChart { target?: D3Selection; configuration?: IChartConfiguration; getEventBus(): EventBus; getDataManager(): DataManager; getRenderEngine(): RenderEngine; getGrid(): IGrid; addPlugin(plugin: IChartPlugin): void; removePlugin?(classRef: typeof ChartPlugin): void; build(element: HTMLElement): void; update(seriesSet: IChartSeries[]): void; updateDimensions(): void; setSeriesStates(renderStateData: IRenderStateData[]): void; destroy(): void; } interface IChartConfiguration { updateDomainForEmptySeries?: boolean; } /** @ignore */ interface IChartComponent { chart: IChart; } /** Interface defining a chart plugin */ interface IChartPlugin { /** * Associated chart - set automatically on chart initialization */ chart: IChart; /** Initialize the plugin - Invoked automatically on chart initialization */ initialize(): void; /** Update the plugin - Invoked automatically on chart update */ update(): void; /** Update the plugin's dimensions - Invoked automatically on update of the chart's dimensions */ updateDimensions(): void; /** Perform plugin cleanup - Invoked automatically on chart destruction */ destroy(): void; } interface IChartEvent { broadcast?: boolean; data: T; } /** @ignore */ interface IChartCollectionEvent { chartIndex: string; event: IChartEvent; } /** * Dictionary of render container name to render container */ interface IRenderContainers { /** Container name as key to render container */ [name: string]: D3Selection; } /** * Position on the chart */ interface IPosition { x: number; y: number; width?: number; height?: number; } /** * A point at which a data series enters or exits a threshold zone */ interface IZoneCrossPoint extends IPosition { /** Indicates whether the cross point is on the edge of a threshold zone */ isZoneEdge?: boolean; } /** * Information about a data point */ interface IDataPoint { /** Series identifier */ seriesId: string; /** Series */ dataSeries: IDataSeries; /** Data index */ index: number; /** Data */ data: any; /** Position */ position?: IPosition; } /** * Payload for the chart's visibility status in relation to the nearest scrollable parent */ interface IChartViewStatusEventPayload { /** * Indicates whether at least one pixel of the chart's parent element has * intersected with the visible area of its nearest scrollable parent */ isChartInView: boolean; } /** * Payload for events regarding a data point */ interface IRendererEventPayload { /** Name of the event */ eventName: string; /** Information about the data point */ data: T; } /** * Collection of one or more data points as a dictionary of seriesId to IDataPoint */ interface IDataPointsPayload { /** Series id as key to highlighted data point */ [seriesId: string]: IDataPoint; } /** * Payload for interaction events */ interface IInteractionPayload { interactionType: InteractionType; } /** * Payload for interaction events regarding a single data point */ interface IInteractionDataPointEvent extends IInteractionPayload { dataPoint: IDataPoint; } /** * Payload for axes style change when emphasizing series on grid */ type IAxesStyleChangeEventPayload = Record>; /** * Payload for interaction events regarding one or more data points */ interface IInteractionDataPointsEvent extends IInteractionPayload { dataPoints: IDataPointsPayload; } interface ISetDomainEventPayload { [scaleId: string]: any[]; } interface IValueProvider { get(entityId: string): T | undefined; reset(): void; } interface IChartPalette { readonly standardColors: IValueProvider; readonly backgroundColors: IValueProvider; readonly textColors: IValueProvider; } /** * Interface used for interaction values with scaleKey as key to a dictionary of scaleId to value. Typical scale keys are "x" and "y" */ interface IInteractionValues { [scaleKey: string]: { [scaleId: string]: any; }; } /** * Payload for an INTERACTION_VALUES_EVENT */ interface IInteractionValuesPayload extends IInteractionPayload { /** The values of the interaction */ values: IInteractionValues; } /** * Payload for an INTERACTION_COORDINATES_EVENT */ interface IInteractionCoordinatesPayload extends IInteractionPayload { /** The coordinates of an interaction */ coordinates: ICoordinates; } /** Interface for defining an element's position */ interface IElementPosition { top: number; left: number; width: number; height: number; } /** * This plugin calculates new size and position for content inside donut chart */ declare class ChartDonutContentPlugin extends ChartPlugin { /** Subject for getting updates on the content position */ contentPositionUpdateSubject: Subject; /** The current content position */ contentPosition: IElementPosition; updateDimensions(): void; destroy(): void; private getContentPosition; } declare class ChartDonutContentComponent implements OnDestroy, OnChanges { /** The plugin instance */ plugin: ChartDonutContentPlugin; /** The current content position */ contentPosition: IElementPosition; private contentPositionUpdateSubscription; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Position with extended information for positioning a tooltip */ interface ITooltipPosition extends IPosition { overlayPositions: ConnectedPosition[]; } /** How far away from the data point position will the tooltip be positioned */ declare const TOOLTIP_POSITION_OFFSET = 10; /** @ignore * Used for charts where tooltips should be placed aside of some vertical line */ declare const getVerticalSetup: (offset: number) => ConnectedPosition[]; /** @ignore * Used for charts where tooltips should be placed aligned to some horizontal line (as Horizontal Bar Charts) */ declare const getHorizontalSetup: (offset: number) => ConnectedPosition[]; /** * This plugin listens to the INTERACTION_DATA_POINTS_EVENT and transforms received data into tooltips inputs. * The actual tooltips are handled by the ChartTooltipsComponent. */ declare class ChartTooltipsPlugin extends ChartPlugin { readonly tooltipPositionOffset: number; orientation: "right" | "top"; /** Highlighted data points received from the chart */ dataPoints: IDataPointsPayload; /** Calculated positions for the data point tooltips */ dataPointPositions: { [stringId: string]: ITooltipPosition; }; /** * This publishes an event to show tooltips */ showSubject: Subject; /** * This publishes an event to hide tooltips */ hideSubject: Subject; protected overlaySetup: ConnectedPosition[]; private isChartInView; private readonly destroy$; private seriesVisibilityMap; /** * @param tooltipPositionOffset Offset of a tooltip from edge of a highlighted element * @param orientation */ constructor(tooltipPositionOffset?: number, orientation?: "right" | "top"); initialize(): void; destroy(): void; processHighlightedDataPoints(dataPoints: IDataPointsPayload): void; /** * Calculate tooltip position. Default implementation shows the tooltip on left / right with * @param dataPoint * @param chartSeries */ protected getTooltipPosition(dataPoint: IDataPoint, chartSeries: IChartSeries): ITooltipPosition; /** * Converts the relative position within a chart into an absolute position on the screen * * @param relativePosition * @param chartPosition */ protected getAbsolutePosition(relativePosition: ITooltipPosition, chartPosition: IPosition): ITooltipPosition; } declare class ChartTooltipsComponent implements OnChanges, OnDestroy { private changeDetector; plugin: ChartTooltipsPlugin; template: ElementRef; tooltips: QueryList; openTooltips: Subject; closeTooltips: Subject; private unsubscribe$; private simulation; private tooltipDirectivesIndex; private closePending; private isOpen; private openTimeout; private collisionTimeout; private closeTimeout; constructor(changeDetector: ChangeDetectorRef); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; trackByFn(index: number, item: any): string | undefined; private handleOpen; private handleClose; /** * Runs the D3 forceCollide based tooltip collision avoidance algorithm */ private avoidTooltipCollisions; /** * Starts the force simulation to avoid tooltip overlap * * @param tooltipIndex * @param tooltipPositions */ private startSimulation; private isVertical; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const MOUSE_ACTIVE_EVENT = "mouse_active"; declare const INTERACTION_VALUES_ACTIVE_EVENT = "interaction_values_active"; declare const INTERACTION_VALUES_EVENT = "interaction_values"; declare const INTERACTION_COORDINATES_EVENT = "interaction_coordinates"; declare const HIGHLIGHT_DATA_POINT_EVENT = "highlight_data_point"; declare const SELECT_DATA_POINT_EVENT = "select_data_point"; declare const HIGHLIGHT_SERIES_EVENT = "highlight_series"; declare const INTERACTION_SERIES_EVENT = "interaction_series"; declare const INTERACTION_DATA_POINTS_EVENT = "interaction_data_points"; declare const INTERACTION_DATA_POINT_EVENT = "interaction_data_point"; declare const DESTROY_EVENT = "destroy"; declare const SET_DOMAIN_EVENT = "set_domain"; declare const REFRESH_EVENT = "refresh"; declare const CHART_VIEW_STATUS_EVENT = "chart_view_status"; declare const SERIES_STATE_CHANGE_EVENT = "series_state_change"; declare const AXES_STYLE_CHANGE_EVENT = "axes_style_change"; /** @ignore */ declare const CHART_COMPONENT: InjectionToken; /** @ignore */ declare const STANDARD_RENDER_LAYERS: { [name: string]: ILasagnaLayer; }; /** @ignore */ declare const DATA_POINT_NOT_FOUND = -1; /** @ignore */ declare const DATA_POINT_INTERACTION_RESET = -2; /** Use this class to prevent DOM elements from triggering mouse-interactive-area events */ declare const IGNORE_INTERACTION_CLASS = "ignore-interaction"; /** Configuration for the popover plugin */ interface IPopoverPluginConfig { /** ID of the event stream the plugin will respond to */ eventStreamId?: typeof INTERACTION_DATA_POINTS_EVENT | typeof INTERACTION_DATA_POINT_EVENT; /** The type of interaction that will trigger the showing and hiding of the popovers */ interactionType?: InteractionType; } /** * This plugin listens for the INTERACTION_DATA_POINTS_EVENT by default and transforms received data into * popover inputs. The listened event can be configured using the 'config.eventStreamId' property. * The actual popover is handled by the ChartPopoverComponent. */ declare class ChartPopoverPlugin extends ChartPlugin { config: IPopoverPluginConfig; /** Info about the data point(s) received in the most recent interaction event */ dataPoints: IDataPointsPayload; /** Emits the popover's target position */ updatePositionSubject: Subject; /** Emits an event indicating the popover should open */ openPopoverSubject: Subject; /** Emits an event indicating the popover should close */ closePopoverSubject: Subject; /** The target position of the popover */ popoverTargetPosition: IElementPosition; /** The default plugin configuration */ DEFAULT_CONFIG: IPopoverPluginConfig; private isOpen; private readonly destroy$; constructor(config?: IPopoverPluginConfig); initialize(): void; destroy(): void; protected getAbsolutePosition(valuesArray: any[]): IElementPosition; private processDataPoints; } declare class ChartPopoverComponent implements OnChanges, OnInit, OnDestroy { private changeDetector; element: ElementRef; plugin: ChartPopoverPlugin; template: TemplateRef; update: EventEmitter; popover: PopoverComponent; private readonly destroy$; private initPlugin$; constructor(changeDetector: ChangeDetectorRef, element: ElementRef); ngOnChanges(changes: SimpleChanges): void; ngOnInit(): void; ngOnDestroy(): void; private initPlugin; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ChartMarkerComponent implements OnDestroy, AfterViewInit, OnChanges { private changeDetector; marker: IChartMarker; drawLine: boolean; color: string; maxSize: number; svgContent: ElementRef; viewBox: string; height: string; width: string; private svg; constructor(changeDetector: ChangeDetectorRef); ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; private renderMarkerSvg; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare enum LegendOrientation { vertical = "vertical", horizontal = "horizontal" } declare class LegendComponent implements OnChanges, OnDestroy { /** * The accessible name of the legend. Defaults to "Legend". */ ariaLabel: string; /** * EventEmitter for notifying subscribers of a change in the active state */ activeChanged: EventEmitter; /** * The active state */ active: boolean; /** * The legend's interactive mode switch */ interactive: boolean; /** * The legend's orientation */ orientation: LegendOrientation; /** * The legend's overall series color. Individual legend series may override this. */ seriesColor: string; /** * The legend's overall series icon. Individual legend series may override this. */ seriesIcon: string; /** * The legend's overall series unit label. Individual legend series may override this. */ seriesUnitLabel: string; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** @ignore */ declare const LEGEND_SERIES_CLASS_NAME = "nui-legend-series"; declare class LegendSeriesComponent implements AfterContentInit { private legend; /** * Sets the series active status * * @param {boolean} active The new active status */ set active(active: boolean); /** * Sets the series interactive mode switch * * @param {boolean} interactive The new interactive mode */ set interactive(interactive: boolean); /** * Gets the series interactive mode value * * @returns {boolean} The current interactive mode */ get interactive(): boolean; /** * Set whether the series is selected */ isSelected: boolean; /** * Emits an event with a boolean value indicating a new selected status */ isSelectedChange: EventEmitter; /** * The primary description of the series */ descriptionPrimary: string; /** * The secondary description of the series */ descriptionSecondary: string; /** * The series icon */ icon: string; /** * Color of the series */ color: string; /** * The render state of the legend series */ set seriesRenderState(renderState: RenderState); get seriesRenderState(): RenderState; private projectedDescription; get isInteractiveClassApplied(): boolean; isHorizontalClassApplied: boolean; get isActiveClassApplied(): boolean; get role(): string | null; get interactiveTabIndex(): number | null; get interactiveAriaChecked(): boolean | null; private _seriesRenderState; private _active; private _interactive; constructor(legend: LegendComponent); ngAfterContentInit(): void; /** * Emits an isSelectedChange event on series click if the series is in interactive mode */ onClick(): void; onEnterKey(): void; onSpaceKey(event: Event): void; /** * @returns boolean indicating whether the series has a primary or secondary description */ hasInputDescription(): boolean; /** * @returns boolean indicating whether the series has a projected description */ hasProjectedDescription(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class BasicLegendTileComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class RichLegendTileComponent implements AfterContentInit, AfterViewInit { private legendSeries; private legend; private changeDetector; /** * The series unit label */ unitLabel: string; /** * The current value of the series */ value: string; /** * The series color */ backgroundColor: string; /** * Color for the text */ color: string; seriesHasAdditionalContent: boolean; constructor(legendSeries: LegendSeriesComponent, legend: LegendComponent, changeDetector: ChangeDetectorRef); ngAfterContentInit(): void; ngAfterViewInit(): void; hasInputValue(): boolean; hasInputUnitLabel(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ChartComponent implements OnInit, AfterContentInit, AfterViewInit, OnDestroy, IChartComponent, OnChanges { private elRef; private ngZone; private cd; chart: IChart; /** Accessible name for the chart. Should be a localized string describing the chart content (WCAG 1.1.1). */ ariaLabel: string; get role(): string | null; get a11yLabel(): string | null; resizeObserver?: ResizeObserver; private resizeHandler; private intersectionObserver; constructor(elRef: ElementRef, ngZone: NgZone, cd: ChangeDetectorRef); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngAfterContentInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; redraw: () => void; private intersectionObserverCallback; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @ignore * * Chart collection takes care of charts grouping and rebroadcasting selected events coming from one charts to other charts */ declare class ChartCollection { lastIndex: number; /** * These events will be rebroadcasted to other charts in the collection * * @type {[string]} */ events: string[]; private charts; private subscriptions; private eventBus?; constructor(); /** * Register chart in this collection and subscribe to all configured events * * @param {IChart} chart */ addChart(chart: IChart): void; /** * Removed chart from the collection and unsubscribes all related subscriptions * * @param {IChart} chart */ removeChart(chart: IChart): void; /** * Destroy this collection and release related resources */ destroy(): void; private initializeEventBus; /** * Register subscription for given chart key on given observable * * @param {string} chartKey * @param {Observable} observable * @param {(value: any) => void} next */ private subscribe; /** * Unsubscribes subscriptions that belong to given chart key * * @param {string} chartKey */ private unsubscribeChart; private getChartKey; } /** * This service registers collections of charts identified by given id. It is used primarily by the ChartCollectionId directive. */ declare class ChartCollectionService { private collections; getChartCollection(collectionId: string): ChartCollection; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * This directive represents a grouping behavior that is separated from chart components. Any chart component * registering the CHART_COMPONENT provider can be injected into this. * * A group of charts with the same associated chart collection id will share events broadcasted through their event buses. */ declare class ChartCollectionIdDirective implements OnChanges { private chartComponent; private chartCollectionService; collectionId: string; constructor(chartComponent: IChartComponent, chartCollectionService: ChartCollectionService); ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NuiChartsModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * Configuration for a gauge */ interface IGaugeConfig { /** The value of the gauge */ value: number; /** The max value of the gauge */ max: number; /** Optional threshold configuration */ thresholds?: IGaugeThresholdsConfig; /** Optional configuration for value labels (currently only used for thresholds) */ labels?: IGaugeLabelsConfig; /** The color to display for the quantity when no threshold is active */ defaultQuantityColor?: string; /** The color to display for the unfilled segment */ remainderColor?: string; /** Used for linear gauges; sets the thickness of the bar. */ linearThickness?: number; } /** * Configuration for a gauge's thresholds */ interface IGaugeThresholdsConfig { /** An array of the gauge's threshold definitions */ definitions: GaugeThresholdDefs; /** Set to true to disable the threshold markers */ disableMarkers?: boolean; /** The radius of the threshold marker dots */ markerRadius?: number; /** Boolean indicating whether the threshold trigger direction should be reversed */ reversed?: boolean; } /** * Configuration for a gauge's value labels (currently only used for threshold markers) */ interface IGaugeLabelsConfig { /** * Optional custom formatter for the value labels (currently only threshold labels are supported) */ formatter?: Formatter; /** * Amount of space (in pixels) to reserve on the side of the grid for the labels. * For the donut gauge, the clearance is applied to all sides; for the linear gauge * the clearance is applied only to the side on which the labels appear. */ clearance?: number; /** * Currently only supported on linear gauges. Set this to true to change the side of the gauge * that the labels appear on. When false, the default sides are right for vertical gauge * and bottom for horizontal gauge. */ flipped?: boolean; } /** * Map of threshold IDs to IGaugeThresholdDef objects */ type GaugeThresholdDefs = Record; /** * Configuration definition for a gauge threshold */ interface IGaugeThresholdDef { /** The ID of the threshold */ id: string; /** The value of the threshold */ value: number; /** Boolean indicating whether the threshold is enabled */ enabled: boolean; /** String indicating the display color of the threshold */ color: string; } /** * Interface for a gauge threshold datum */ interface IGaugeThresholdDatum extends IGaugeThresholdDef { /** Boolean indicating whether the threshold is hit */ hit?: boolean; /** Additional metadata as needed */ [key: string]: any; } /** * Data used for visualizing thresholds on a gauge */ interface IGaugeThresholdsData { /** A collection of thresholds */ thresholds: IGaugeThresholdDatum[]; /** The currently active threshold */ activeThreshold?: IGaugeThresholdDatum; } /** * Interface representing the spark chart assist's * association between one of its charts and a series set */ interface ISpark { chartSeriesSet: IChartAssistSeries[]; id?: string; chart?: IChart; } /** * Interface representing an assistant that aids in chart usage */ interface IChartAssist { /** * Updates the series set for the chart assist's associated chart * * @param inputSeriesSet The updated set of series */ update(inputSeriesSet: IChartAssistSeries[]): void; /** * Gets the current highlighted value for the specified series * * @param {IChartSeries} chartSeries The chart series to get the highlighted value for * @param {string} scaleKey The key for the datapoint value scale * @param {string} [formatterName] The name of the formatter if a custom formatter name is set on the scale * * @returns {string} The highlighted value */ getHighlightedValue(chartSeries: IChartSeries, scaleKey: string, formatterName?: string): string | number | undefined; /** * Returns visible series that are represented by a legend */ getVisibleSeriesWithLegend(): IChartAssistSeries[]; } /** Event types that can be emitted from a chart assist */ declare enum ChartAssistEventType { ToggleSeries = "ToggleSeries", ResetVisibleSeries = "ResetVisibleSeries", EmphasizeSeries = "EmphasizeSeries" } /** Interface for chart assist events */ interface IChartAssistEvent { type: ChartAssistEventType; payload: any; } /** * Legend interaction assist uses this class to present the state that consists of emphasisState+visible as one state */ declare class ChartAssistRenderStateData implements IRenderStateData { seriesId: string; series: IChartAssistSeries; emphasisState: RenderState; visible: boolean; constructor(seriesId: string, series: IChartAssistSeries, emphasisState?: RenderState, visible?: boolean); get state(): RenderState; } type IRenderStatesIndex = Record; /** * Helper class that helps to bootstrap a chart with legend, using data pre-processor. * It will use the most common settings. */ declare class ChartAssist implements IChartAssist { chart: IChart; palette: IChartPalette; markers: IValueProvider; /** * Retrieves the display value for a data point on the specified series * * @param chartSeries The series containing the data point to get a label for * @param dataPoint The data point to get a label for * @param scaleKey The key for the scale potentially containing a formatter that can be used to format the label * @param formatterName The name of the formatter to use for formatting the label * @param dataAccessorKey The accessor key to use for accessing the data value if the accessor key differs from the scale key * * @returns The display value for a data point */ static getLabel(chartSeries: IChartSeries, dataPoint: any, scaleKey: string, formatterName?: string, dataAccessorKey?: string): any; highlightedDataPoints: IDataPointsPayload; isLegendActive: boolean; inputSeriesSet: IChartAssistSeries[]; legendSeriesSet: IChartAssistSeries[]; /** * Subject for subscribing to IChartAssistEvents such as * ToggleSeries, EmphasizeSeries, and ResetVisibleSeries */ chartAssistSubject: Subject; private syncHandlerMap; private getVisibleSeriesWithLegendBackup; private syncSubscription; private legendInteractionAssist; onEvent: (event: IChartEvent) => void; constructor(chart: IChart, seriesProcessor?: (series: IChartAssistSeries[]) => IChartAssistSeries[], palette?: IChartPalette, markers?: IValueProvider); get renderStatesIndex(): IRenderStatesIndex; /** * Convenience stream of highlight events that can be used to populate legend. * It will return highlighted value for the series (while hovering over datapoints) or the last value from series (while not hovering over and if possible), * otherwise it'll return null * @param chartSeries */ legendLabelData$(chartSeries: IChartSeries): Observable; seriesProcessor(series: IChartAssistSeries[]): IChartAssistSeries[]; update(inputSeriesSet: IChartAssistSeries[], updateLegend?: boolean): void; toggleSeries: (seriesId: string, visible: boolean) => void; /** * Resets all visible series to default state */ resetVisibleSeries: () => void; /** * For series that are currently visible, emphasize the given series and deemphasizes all the other ones * * @param seriesId */ emphasizeSeries: (seriesId: string) => void; isSeriesHidden(seriesId: string): boolean; seriesTrackByFn(index: number, item: IChartAssistSeries): string; /** * Retrieves the display value for the highlighted data point on the specified series * * @param chartSeries The series containing the highlighted data point to get a label for * @param scaleKey The key for the scale potentially containing a formatter that can be used to format the label * @param formatterName The name of the formatter to use for formatting the label * @param dataAccessorKey The accessor key to use for accessing the data value if the accessor key differs from the scale key * * @returns The display value for the highlighted data point */ getHighlightedValue(chartSeries: IChartSeries, scaleKey: string, formatterName?: string, dataAccessorKey?: string): string | number | undefined; getVisibleSeriesWithLegend: () => IChartAssistSeries>[]; /** * Synchronize this chart assist's actions with IChartAssistEvents emitted by the specified * chart assist, and override this chart assist's getVisibleSeriesWithLegend method with the * specified chart assist's getVisibleSeriesWithLegend. * * Note: If the chart instance of the specified chart assist is replaced by a new chart, * this method must be invoked again to resume synchronized behavior. * * @param {ChartAssist} chartAssist The chart assist to synchronize with */ syncWithChartAssist(chartAssist: ChartAssist): void; /** * Unsynchronize this chart assist's actions from those of the chart assist * specified in a previous syncWithChartAssist call, and restore this chart * assist's getVisibleSeriesWithLegend method with the instance used before * syncWithChartAssist was called. */ unsyncChartAssist(): void; private configureChartEventSubscriptions; private publishRenderStates; } declare class LegendInteractionAssist { private chartAssist; private seriesGroups; private seriesIndex; renderStatesIndex: IRenderStatesIndex; constructor(chartAssist: ChartAssist); update(seriesSet: IChartAssistSeries[]): void; getSeriesStates(): IRenderStateData[]; isSeriesHidden(seriesId: string): boolean; private getSeriesGroups; /** * @param groupId id of the parent series * @param renderState */ setGroupState(groupId: string, renderState: RenderState): void; /** * @param groupId id of the parent series * @param visible */ setGroupVisibility(groupId: string, visible: boolean): void; emphasizeSeries(seriesId: string): void; resetSeries(): void; private setRenderState; private setVisibility; } /** * Configuration for the gauge labels plugins */ interface IGaugeLabelsPluginConfig { /** Set the distance of the labels from the gauge (in pixels). */ padding?: number; /** The name of the label formatter */ formatterName?: string; /** Set whether labels should be disabled for the thresholds when the gauge is hovered. */ disableThresholdLabels?: boolean; /** * Currently only supported on linear gauges. Set this to true to change the side * of the gauge that the labels appear on. */ flippedLabels?: boolean; } /** * A chart plugin that handles the rendering of labels for a donut gauge */ declare class DonutGaugeLabelsPlugin extends ChartPlugin { config: IGaugeLabelsPluginConfig; static readonly MARGIN_DEFAULT = 25; /** The default plugin configuration */ DEFAULT_CONFIG: IGaugeLabelsPluginConfig; private readonly destroy$; private lasagnaLayer; constructor(config?: IGaugeLabelsPluginConfig); initialize(): void; update(): void; updateDimensions(): void; destroy(): void; private drawThresholdLabels; private getTextAnchor; private getAlignmentBaseline; } /** * A chart plugin that handles the rendering of labels for a donut gauge */ declare class LinearGaugeLabelsPlugin extends ChartPlugin { config: IGaugeLabelsPluginConfig; /** The default plugin configuration */ DEFAULT_CONFIG: IGaugeLabelsPluginConfig; private readonly destroy$; private lasagnaLayer; private isHorizontal; private thresholdsSeries; constructor(config?: IGaugeLabelsPluginConfig); initialize(): void; update(): void; updateDimensions(): void; destroy(): void; private updateData; private drawThresholdLabels; private xTranslate; private yTranslate; private getLabelOffset; private getTextAnchor; private getAlignmentBaseline; } /** * @ignore * Attributes needed by a gauge */ interface IGaugeRenderingAttributes { /** Accessors for the gauge quantity segment */ quantityAccessors: IAccessors; /** Accessors for the gauge remainder segment */ remainderAccessors: IAccessors; /** Scales for the gauge */ scales: Scales; /** Renderer for the primary gauge visualization */ mainRenderer: Renderer; /** Renderer for the gauge threshold visualization */ thresholdsRenderer: Renderer; } /** * @ignore * Interface for an object that can be used to create the rendering attributes needed by a gauge */ interface IGaugeRenderingTools { /** Function for creating quantity accessors */ quantityAccessorFunction: () => IAccessors; /** Function for creating remainder accessors */ remainderAccessorFunction: () => IAccessors; /** Function for creating scales */ scaleFunction: () => Scales | IRadialScales; /** Function for creating a main renderer */ mainRendererFunction: () => Renderer; /** Function for creating a thresholds renderer */ thresholdsRendererFunction: () => Renderer; } /** * Convenience utility for simplifying gauge usage */ declare class GaugeUtil { /** Value used for unifying the linear-style gauge visualization into a single bar stack */ static readonly DATA_CATEGORY = "gauge"; /** * Creates a ChartAssist pre-configured based on the provided IGaugeConfig and GaugeMode * * @param gaugeConfig The gauge configuration * @param mode The gauge mode * @param labelsPlugin Optional labels plugin for direct control of label configuration. If not provided, a plugin will * be generated automatically. * * @returns {ChartAssist} A pre-configured chart assist */ static createChartAssist(gaugeConfig: IGaugeConfig, mode: GaugeMode, labelsPlugin?: DonutGaugeLabelsPlugin | LinearGaugeLabelsPlugin): ChartAssist; /** * Assembles a gauge series set with all of the standard scales, renderers, accessors, etc. needed for creating a gauge visualization * * @param gaugeConfig The configuration for the gauge * @param mode The mode of the gauge (Donut, Horizontal, or Vertical) * * @returns {IChartAssistSeries[]} The assembled series set */ static assembleSeriesSet(gaugeConfig: IGaugeConfig, mode: GaugeMode): IChartAssistSeries[]; /** * Updates the series set based on the provided configuration * * @param seriesSet The set of series to update * @param gaugeConfig The configuration for the gauge * * @returns {IChartAssistSeries[]} The updated series set */ static update(seriesSet: IChartAssistSeries[], gaugeConfig: IGaugeConfig): IChartAssistSeries[]; /** * Convenience function for creating a standard standard set of threshold configs. Includes configurations for warning and error thresholds. * * @param warningVal Value for the warning threshold * @param criticalVal Value for the critical threshold * * @returns {IGaugeThresholdsConfig} The thresholds configuration */ static createStandardThresholdsConfig(warningVal: number, criticalVal: number): IGaugeThresholdsConfig; /** * Gets a new instance of the provided grid margin with updated values (if needed) to accommodate the label clearance specified * in the provided gauge configuration * * @param gaugeConfig The gauge's configuration * @param mode The mode of the gauge * @param margin The margin to update * * @returns {IAllAround} The updated margin */ static getMarginForLabelClearance(gaugeConfig: IGaugeConfig, mode: GaugeMode, margin: IAllAround): IAllAround; /** * Generates a set of chart series used for visualizing the gauge's quantity and remainder data * * @param gaugeConfig The configuration for the gauge * @param renderingAttributes The attributes needed to visualized the thresholds * @param activeThreshold The currently active threshold * * @returns {IChartAssistSeries>[]} A set of chart series representing the quantity and remainder data */ static generateQuantityAndRemainderSeriesSet(gaugeConfig: IGaugeConfig, renderingAttributes: IGaugeRenderingAttributes, activeThreshold?: IGaugeThresholdDatum): IChartAssistSeries>[]; /** * Generates a series for visualizing the gauge's thresholds * * @param gaugeConfig The configuration for the gauge * @param renderingAttributes The attributes needed to visualized the thresholds * * @returns {IChartAssistSeries} The threshold series */ static generateThresholdSeries(gaugeConfig: IGaugeConfig, renderingAttributes: IGaugeRenderingAttributes): IChartAssistSeries; /** * Generates the attributes required to instantiate a standard gauge in the specified mode * * @param gaugeConfig The configuration for the gauge * @param mode The mode of the gauge (Donut, Horizontal, or Vertical) * * @returns {IGaugeRenderingAttributes} The attributes required to instantiate a gauge */ static generateRenderingAttributes(gaugeConfig: IGaugeConfig, mode: GaugeMode): IGaugeRenderingAttributes; /** * Generates rendering tools for standard gauge attributes * * @param gaugeConfig The configuration for the gauge * @param mode The mode of the gauge (Donut, Horizontal, or Vertical) * * @returns {IGaugeRenderingTools} The rendering tools for standard gauge attributes */ static generateRenderingTools(gaugeConfig: IGaugeConfig, mode: GaugeMode): IGaugeRenderingTools; /** * Generates quantity and remainder data in the format needed by the gauge visualization * * @param gaugeConfig The configuration for the gauge * * @returns {Partial>[]} Array of partial IDataSeries objects including the 'id' and 'data' properties of the quantity and remainder * series needed by the gauge visualization */ static generateQuantityAndRemainderData(gaugeConfig: IGaugeConfig): Partial>[]; /** * Generates threshold data in the form needed by the gauge's thresholds visualization * * @param gaugeConfig The configuration for the gauge * * @returns {Partial>} A partial IDataSeries object including the 'id' and 'data' properties of the thresholds * series used for the the gauge's thresholds visualization */ static generateThresholdsData(gaugeConfig: IGaugeConfig): Partial>; /** * Generates visualization-specific thresholds data based on the gauge's configuration * * @param gaugeConfig The gauge configuration * * @returns {IGaugeThresholdsData} Thresholds data modified for use by the gauge visualization */ static prepareThresholdsData(gaugeConfig: IGaugeConfig): IGaugeThresholdsData; private static clampConfigToRange; } declare class ChartPalette implements IChartPalette { private _standardColors; private _textColors; private _backgroundColors; constructor(colors: string[] | IValueProvider, options?: { backgroundOpacity: number; }); get standardColors(): IValueProvider; get backgroundColors(): IValueProvider; get textColors(): IValueProvider; } /** * This class matches the provided colors to given series. * It keeps track of already given colors to given entities to avoid conflicts. */ declare class MappedValueProvider implements IValueProvider { private valueMap; private defaultValue?; constructor(valueMap: { [key: string]: T; }, defaultValue?: T | undefined); get: (entityId: string) => T | undefined; reset(): void; } /** * This class creates a ChartMarker based on provided portion of svg markup */ declare class SvgMarker implements IChartMarker { protected svg: string; protected styledSvg: string; constructor(svg: string); getSvg(): string; setColor(color: string): void; } /** Default single-shade color sequence for charts */ declare const CHART_PALETTE_CS1: string[]; /** Default two-shade color sequence for charts */ declare const CHART_PALETTE_CS2: string[]; /** Default three-shade color sequence for charts */ declare const CHART_PALETTE_CS3: string[]; /** @deprecated * Will be removed in v.12 * https://jira.solarwinds.com/browse/NUI-4296?jql=text%20~%20%22v11%22 * * Default status color sequence for charts */ declare const CHART_PALETTE_CS_S: string[]; /** Extended status color sequence for charts * It will substitute the default one above in v.12 * https://jira.solarwinds.com/browse/NUI-5367 */ declare const CHART_PALETTE_CS_S_EXTENDED: string[]; /** Default chart marker set */ declare const CHART_MARKERS: SvgMarker[]; /** * This color provider processes values provided by the source provider using the given function. * Examples would be darken, lighten, reduce opacity, etc. */ declare class ProcessedColorProvider implements IValueProvider { private sourceProvider; private fn; private processedColors; constructor(sourceProvider: IValueProvider, fn: (input: string) => string); get: (entityId: string) => string; reset(): void; } /** * This class matches the provided instances of type to given series. * It keeps track of already given instances to given entities to avoid conflicts. */ declare class SequentialValueProvider implements IValueProvider { private values; private providedValues; private lastUsedIndex; constructor(values: T[]); get: (entityId: string) => T; reset(): void; } /** * This class matches the provided markers to given series. * It keeps track of already given markers to given entities to avoid conflicts. */ declare class SequentialChartMarkerProvider extends SequentialValueProvider { private markers; constructor(markers: IChartMarker[]); } /** * This class matches the provided colors to given series. * It keeps track of already given colors to given entities to avoid conflicts. */ declare class SequentialColorProvider extends SequentialValueProvider { private colors; constructor(colors: string[]); } /** * This color provider calculates foreground color based on contrast ratio of provided colors */ declare class TextColorProvider extends ProcessedColorProvider { constructor(sourceProvider: IValueProvider, colorDefinitions: { light: string; dark: string; }); /** * Calculate contrast ratio of two given colors (https://www.w3.org/TR/WCAG20/#contrast-ratiodef) * * @param {RGBColor} color1 * @param {RGBColor} color2 * @returns {number} luminance ratio */ private getContrastRatio; /** * Calculates relative luminance of given color (https://www.w3.org/TR/WCAG20/relative-luminance.xml) * * @param {RGBColor} rgbColor * @returns {number} */ private getRelativeLuminance; private adjustGamma; } /** * This class creates a ChartMarker based on provided data for svg path */ declare class PathMarker implements IChartMarker { /** Resulting HTMLElement */ element: HTMLElement; protected svg: string; /** * Creates an instance of PathMarker. * @param {string} d value that has to be assigned to 'd' attribute of 'path' element in svg * @memberof PathMarker */ constructor(d: string); setColor(color: string): void; private setAttributes; getSvg(): string; protected updateSvg(): void; } declare function defaultColorProvider(): IValueProvider; declare function defaultPalette(): IChartPalette; declare function defaultMarkerProvider(): IValueProvider; /** * Returns automatically calculated domain for given scaleKey based on given set of chart series. It considers scales with fixed domains for limiting * considered data set. * * @param {IChartSeries[]} chartSeriesSet * @param {string} scaleKey * @param scale * @returns {[any, any]} domain */ declare const getAutomaticDomain: DomainCalculator; /** * Works like getAutomaticDomain, but also includes provided interval in the calculated result * * @param {[number , number]} interval * @returns {(chartSeriesSet: IChartSeries[], scaleId: string) => [number , number]} A domain calculator * that includes the specified interval in its calculation */ declare const getAutomaticDomainWithIncludedInterval: (interval: [number, number]) => DomainCalculator; declare const getAutomaticDomainWithTicks: (config: IAxisConfig, axisGenerator: any, domainCalculator: DomainCalculator) => IDomainWithTicksCalculator; /** * Domain calculator that adds given series to the domain calculation * * @param additionalSeriesFn this function returns series to be added * @param domainCalculator */ declare const domainWithAuxiliarySeries: (additionalSeriesFn: () => IChartSeries[], domainCalculator: DomainCalculator) => (chartSeriesSet: IChartSeries[], scaleId: string, scale: IScale) => any[]; /** * Merge given domains * * @param domains collected from dataSeries on the chart * @param scale that owns the domains */ declare function mergeDomains(domains: any[][], scale: IScale): any[]; declare abstract class Scale implements IScale { readonly id: string; domainCalculator: DomainCalculator; formatters: IFormatters; isDomainFixed: boolean; scaleUnits?: UnitOption; isTimeseriesScale: boolean; __domainCalculatedWithTicks?: boolean; private isReversed; protected _fixDomainValues: T[]; protected readonly _d3Scale: any; protected constructor(id?: string); /** * Creates a d3 scale based on the scale's type * * @returns {any} A new d3 scale appropriate to the scale type */ protected abstract createD3Scale(): any; abstract convert(value: T): number; abstract invert(coordinate: number): T | undefined; abstract isContinuous(): boolean; /** See {@link IScale#d3Scale} */ get d3Scale(): AxisScale; get fixDomainValues(): T[]; /** See {@link IScale#setFixDomainValues} */ setFixDomainValues(values: T[]): void; /** See {@link IScale#range} */ range(): [number, number]; range(range: [number, number]): this; /** See {@link IScale#domain} */ domain(): T[]; domain(domain: T[]): this; /** See {@link IScale#fixDomain} */ fixDomain(domain: T[]): this; /** See {@link IScale#reverse} */ isDomainValid(): boolean; reverse(): this; /** See {@link IScale#reversed} */ reversed(): boolean; reversed(reversed: boolean): this; } /** * Nova wrapper around [D3's scaleLinear](https://d3indepth.com/scales/#scalelinear) */ declare class LinearScale extends Scale { constructor(id?: string); protected createD3Scale(): any; convert(value: number): number; invert(coordinate: number): number; isContinuous(): boolean; isDomainValid(): boolean; } /** * Nova wrapper around [D3's scaleBand](https://d3indepth.com/scales/#scaleband) * A typical use case for a band scale is a bar chart */ declare class BandScale extends Scale implements IBandScale, IHasInnerScale { innerScale: IScale; constructor(id?: string); protected createD3Scale(): any; /** * This returns center of a band. To return the beginning of a band, manually subtract this.bandwidth()/2 * This differs from the "bandScale.convert" method in d3 * * @param {T} value The value to convert * @param {number} [position=0.5] Number in the range of [0, 1] that will define the point inside of the band. Where 0 stands for start. * @returns {number} Center of a band */ convert(value: T, position?: number): number; /** * Converts the specified coordinate into the value of the closest band data point * * @param {number} coordinate The coordinate to convert * @returns {T} The value of the closest band data point */ invert(coordinate: number): T; /** See {@link IScale#range} */ range(): [number, number]; range(range: [number, number]): this; /** * Gets the rounded setting for the scale * * @returns {boolean} The value indicating whether the scale is rounded */ round(): boolean; /** * Sets whether the scale should be rounded * Rounding helps to have crisp edges https://github.com/d3/d3-scale#band_round * * @param {boolean} round The specified round setting */ round(round: boolean): this; /** * A convenience method for setting the inner and outer padding. * This differs from D3 implementation. We're setting the outer padding to half of the inner padding. * * @param padding Value in [0, 1] interval. */ padding(padding: number): this; /** * Returns the current alignment which defaults to 0.5. * * @returns {number} The current alignment */ align(): number; /** * Sets the alignment to the specified value which must be in the range [0, 1]. * * The default is 0.5. * * The alignment determines how any leftover unused space in the range is distributed. * A value of 0.5 indicates that the leftover space should be equally distributed before the first band and * after the last band, i.e. the bands should be centered within the range. A value of 0 or 1 may be used to * shift the bands to one side, say to position them adjacent to an axis. * * @param {number} align Value for alignment setting in [0, 1] interval. */ align(align: number): this; /** * Returns the width of each band (bar). */ bandwidth(): number; /** * Returns the width of each step with paddings. * Please note the fact that bandScale._d3Scale.step() returns step size without outer paddings! */ step(): number; /** * Creates linear scale with domain and range that are equal to current scale's range */ copyToLinear(): LinearScale; /** * Gets the locations for the band ticks * * @returns {number[]} The band tick locations */ bandTicks(): number[]; isContinuous(): boolean; private getRangeMidPoints; } /** @ignore */ declare class PointScale extends Scale { constructor(id?: string); protected createD3Scale(): any; convert(value: string): number; invert(coordinate: number): string; /** * Gets the rounded setting for the scale * * @returns {boolean} The value indicating whether the scale is rounded */ round(): boolean; /** * Sets whether the scale should be rounded * Rounding helps to have crisp edges https://github.com/d3/d3-scale#band_round * * @param {boolean} round The specified round setting */ round(round: boolean): IScale; /** * A convenience method for setting the inner and outer padding. * This differs from D3 implementation. We're setting the outer padding to half of the inner padding. * * @param padding Value in [0, 1] interval. */ padding(padding: number): IScale; /** * Returns the current alignment which defaults to 0.5. * * @returns {number} The current alignment */ align(): number; /** * Sets the alignment to the specified value which must be in the range [0, 1]. * * The default is 0.5. * * The alignment determines how any leftover unused space in the range is distributed. * A value of 0.5 indicates that the leftover space should be equally distributed before the first band and * after the last band, i.e. the bands should be centered within the range. A value of 0 or 1 may be used to * shift the bands to one side, say to position them adjacent to an axis. * * @param {number} align Value for alignment setting in [0, 1] interval. */ align(align: number): this; /** * Returns the width of each band * * @returns {number} The width of each band */ bandwidth(): number; isContinuous(): boolean; } /** * Nova wrapper around [D3's scaleTime](https://d3indepth.com/scales/#scaletime) */ declare class TimeScale extends Scale { constructor(id?: string); protected createD3Scale(): AxisScale; convert(value: Date): number; invert(coordinate: number): Date | undefined; isContinuous(): boolean; isDomainValid(): boolean; } declare function isDaylightSavingTime(d: Date): boolean; /** * Scale designed to support regular interval based data. */ declare class TimeIntervalScale extends TimeScale implements IBandScale { private _bandScale; private _interval; constructor(interval: Duration, id?: string); interval(): Duration; interval(value: Duration): TimeIntervalScale; domain(domain?: Date[]): any; range(range?: [number, number]): any; getBands(): Date[]; convert(value: Date, position?: number): number; /** * Converts the specified coordinate into the value of the closest band data point * * @param {number} coordinate The coordinate to convert * @returns {string} The value of the closest band data point */ invert(coordinate: number): Date | undefined; bandwidth(): number; truncToInterval(datetime: Date | undefined, interval: Duration, isDomainChange?: boolean): Date | undefined; isContinuous(): boolean; defaultTitleFormatter: (inputDate: Date) => string; private getBandsForInterval; } /** * Formatter for dates */ declare const datetimeFormatter: Formatter; declare class NoopScale implements IScale { readonly id: string; formatters: IFormatters; isDomainFixed: boolean; constructor(id?: string); convert(): number; invert(): T; get d3Scale(): AxisScale; range(): [number, number]; range(range: [number, number]): this; domain(): T[]; domain(domain: T[]): this; fixDomain(domain: any[]): null; isContinuous(): boolean; isDomainValid(): boolean; reverse(): this; reversed(): boolean; reversed(reversed: boolean): this; } /** * Apart from just calling scale.convert, this method can also handle multilevel band scales that return arrays of values * * @param scale * @param value * @param {number} position Number in the range of [0, 1] that will define the point inside of the band. Where 0 stands for start. * @param levels how many levels deep can we go during the conversion */ declare function convert(scale: IScale, value: any, position?: number, levels?: number): number; declare function invert(scale: IScale, coordinate: number): number | string | unknown[]; declare class DataSeries implements IDataSeries { id: string; accessors: { data?: Record; series?: Record; }; data: any[]; name: string; constructor(dataSeries: IDataSeries); } /** * @ignore */ declare class MouseInteractiveArea = D3Selection, TInteractiveArea extends D3Selection = D3Selection> { private target; private interactiveArea; private gridMargin?; static CONTAINER_CLASS: string; readonly active: BehaviorSubject; readonly interaction: BehaviorSubject; private isActive; constructor(target: TTarget, interactiveArea: TInteractiveArea, cursor: string, gridMargin?: IAllAround | undefined); onMouseInteraction: (interactionType: InteractionType) => void; onMouseOver: () => void; onMouseOut: () => void; /** @deprecated - Please use 'onMouseOver' instead */ onMouseEnter: () => void; /** @deprecated - Please use 'onMouseOut' instead */ onMouseLeave: () => void; } declare class UtilityService { private static getValueAccessor; static getClosestIndex(haystack: T[], accessor: (d: T, i: number) => any, needle: any): number | undefined; private static getCloser; /** * Clamps given value to range * * @param {number} value * @param {[number , number]} range * @returns {number} */ static clampToRange(value: number, range: [number, number]): number; static uuid(): string; /** * CSS.escape() replacement * @param value * @returns {string} */ static cssEscape(value: any): string; /** * This method performs a binary search to find an index in the `haystack` that is the closest representation of given `needle`. * * @param haystack * @param needle * @param selector this function is used to process the `haystack` elements */ static findNearestIndex(haystack: T[], needle: any, selector?: (d: T, index: number) => any): number; /** * Gets the 'x' and 'y' scale values based on the specified scales and raw x-y coordinates * * @param xScales * @param yScales * @param xCoordinate * @param yCoordinate */ static getXYValues(xScales: IScale[], yScales: IScale[], xCoordinate: number, yCoordinate: number): IInteractionValues; /** * Gets the scale value based on the specified scales and raw coordinate * * @param scales * @param coordinate */ static getScaleValues(scales: IScale[], coordinate: number): Record; /** * get values for interaction * @param valueMap map of values by scaleId * @param scaleId preferred scaleId * @returns value from scaleId or first availabel scale */ static getInteractionValues(valueMap: Record | null | undefined, scaleId: string): any; } /** See {@link IAxisConfig} */ declare class AxisConfig implements IAxisConfig { /** See {@link IAxisConfig#visible} */ visible: boolean; /** See {@link IAxisConfig#gridTicks} */ gridTicks: boolean; /** See {@link IAxisConfig#tickSize} */ tickSize: number; /** See {@link IAxisConfig#tickLabel} */ tickLabel: ITickLabelConfig; /** See {@link IAxisConfig#fit} */ fit: boolean; private _approximateTicks; /** See {@link IAxisConfig#approximateTicks} */ get approximateTicks(): any; /** See {@link IAxisConfig#approximateTicks} */ set approximateTicks(ticks: any); padding: number; } /** @ignore */ declare class BorderConfig implements IBorderConfig { className?: string | undefined; color: string; width: number; visible: boolean; constructor(className?: string | undefined); } declare class DimensionConfig implements IDimensionConfig { private _width; private _height; /** See {@link IDimensionConfig#margin} */ margin: IAllAround; /** See {@link IDimensionConfig#padding} */ padding: IAllAround; /** See {@link IDimensionConfig#marginLocked} */ marginLocked: IAllAround; /** See {@link IDimensionConfig#autoWidth} */ autoWidth: boolean; /** See {@link IDimensionConfig#autoHeight} */ autoHeight: boolean; /** See {@link IDimensionConfig#width} */ width(): number; /** See {@link IDimensionConfig#width} */ width(value: number): IDimensionConfig; /** See {@link IDimensionConfig#height} */ height(): number; /** See {@link IDimensionConfig#height} */ height(value: number): IDimensionConfig; /** See {@link IDimensionConfig#outerWidth} */ outerWidth(): number; /** See {@link IDimensionConfig#outerWidth} */ outerWidth(value: number): IDimensionConfig; /** See {@link IDimensionConfig#outerHeight} */ outerHeight(): number; /** See {@link IDimensionConfig#outerHeight} */ outerHeight(value: number): IDimensionConfig; } /** See {@link IGridConfig} */ declare class GridConfig implements IGridConfig { /** See {@link IGridConfig#interactive} */ interactive: boolean; /** See {@link IGridConfig#dimension} */ dimension: IDimensionConfig; /** See {@link IGridConfig#borders} */ borders: IAllAround; /** See {@link IGridConfig#cursor} */ cursor: string; /** See {@link IGridConfig#disableRenderAreaHeightCorrection} */ disableRenderAreaHeightCorrection: boolean; /** See {@link IGridConfig#disableRenderAreaWidthCorrection} */ disableRenderAreaWidthCorrection: boolean; } declare class XYGridConfig extends GridConfig implements IXYGridConfig { /** The default margin */ static readonly DEFAULT_MARGIN: IAllAround; static readonly DEFAULT_PADDING: IAllAround; axis: IAllAround; interactionPlugins: boolean; constructor(); } /** * Assembles a linear-gauge-specific grid configuration * * @param mode vertical or horizontal * @param thickness The thickness of the gauge * * @returns {XYGridConfig} A linear gauge grid configuration */ declare function linearGaugeGridConfig(mode: GaugeMode.Vertical | GaugeMode.Horizontal, thickness?: StandardLinearGaugeThickness): XYGridConfig; /** * Pre-defined XYGridConfig for conforming an area chart to Nova UX standards */ declare class AreaGridConfig extends XYGridConfig { constructor(); } /** * Pre-defined and conforming Nova UX standards configuration of XYGrid for bar chart */ declare class BarGridConfig extends XYGridConfig { constructor(); } /** * Pre-defined and conforming Nova UX standards configuration of XYGrid for horizontal bar chart */ declare class BarHorizontalGridConfig extends XYGridConfig { constructor(); } declare class BarStatusGridConfig extends XYGridConfig { constructor(config?: { showBottomAxis: boolean; }); } /** * Applies spark chart specific grid configuration * * @param c * @param showBottomAxis * @param showTopBorder */ declare function sparkChartGridConfig(c?: XYGridConfig, showBottomAxis?: boolean, showTopBorder?: boolean): XYGridConfig; declare const borderMidpoint = 0.5; /** * @implements {IGrid} * Implementation for the dimensions, scaling, interactive area, and borders of a basic grid */ declare abstract class Grid implements IGrid { /** Class name for the grid */ static GRID_CLASS_NAME: string; /** Class name applied to each of the grid's borders by default */ static DEFAULT_BORDER_CLASS_NAME: string; /** Prefix applied to the rendering area clip path id */ static RENDERING_AREA_CLIP_PATH_PREFIX: string; /** Name for the lasagna layer containing the grid's rendered elements */ static GRID_ELEMENTS_LAYER_NAME: string; /** Name for the rendering area lasagna layer */ static RENDERING_AREA_LAYER_NAME: string; /** @ignore Height correction needed to prevent interaction gap between vertically stacked charts */ static RENDER_AREA_HEIGHT_CORRECTION: number; /** @ignore Width correction needed to prevent interaction gap between right side of grid and the edge of the rendering area */ static RENDER_AREA_WIDTH_CORRECTION: number; /** @ignore Width correction needed to sync bottom border length and grid width to tick placement */ static TICK_DIMENSION_CORRECTION: number; /** Subject for indicating that the chart's dimensions should be updated */ updateChartDimensionsSubject: Subject; /** Event bus provided by the chart */ eventBus: EventBus; /** d3 container for the grid */ protected container: D3Selection; /** d3 selection for the grid's rendering area clip path */ protected renderingAreaClipPath: D3Selection; /** d3 selection for the grid's rendering area */ protected renderingArea: D3Selection; /** d3 selection for the grid's interactive area */ protected interactiveArea: D3Selection; /** The grid's layer manager */ protected lasagna: Lasagna; /** Lasagna layer for the grid's rendered elements */ protected gridElementsLayer: Selection; /** Definition of the grid's borders as rendered */ protected borders: Partial; /** Property value of the grid's scales */ protected _scales: ScalesIndex; /** Property value of the grid's configuration */ protected _config: IGridConfig; /** Property value of the grid's target d3 selection */ protected _target: D3Selection; /** See {@link IGrid#getInteractiveArea} */ getInteractiveArea(): D3Selection; /** See {@link IGrid#getLasagna} */ getLasagna(): Lasagna; /** @ignore */ set scales(scales: ScalesIndex); /** @ignore */ get scales(): ScalesIndex; /** See {@link IGrid#config} */ config(): IGridConfig; /** See {@link IGrid#config} */ config(config: IGridConfig): this; /** See {@link IGrid#target} */ target(): D3Selection; /** See {@link IGrid#target} */ target(target: D3Selection): IGrid; /** See {@link IGrid#build} */ build(): IGrid; /** * Derived classes override this method to build the grid's plugins * * @param {IChart} chart The chart instance to pass to each plugin * * @returns {IChartPlugin[]} Default implementation returns an empty array */ buildPlugins(chart: IChart): IChartPlugin[]; /** See {@link IGrid#update} */ update(): IGrid; /** See {@link IGrid#updateDimensions} */ updateDimensions(dimensions: Partial): IGrid; /** See {@link IGrid#updateRanges} */ updateRanges(): IGrid; /** * Calculate the width correction needed for accommodating grid elements that may extend beyond the chart's configured width */ protected getOuterWidthDimensionCorrection(): number; /** * Builds the grid borders as SVGElements based on the specified configuration * * @param {D3Selection} container d3 container for the borders * * @returns {Partial} The grid's borders */ protected buildBorders(container: D3Selection): Partial | undefined; /** * Adjusts the grid's rendering area and clip path based on the grid's configured width and height */ protected adjustRenderingArea: () => void; /** * Builds the grid's rendering area as a layer on the lasagna * * @param {string} clipPathId The clip path identifier * * @returns {D3Selection} The grid's rendering area */ private buildRenderingArea; /** * Creates a border with the specified configuration in the provided container * * @param {D3Selection} container The container to append the border to * @param {IBorderConfig} config The configuration to apply to the border * * @returns {SVGElement} The created border */ private createBorder; protected updateBottomBorder(): void; /** * Updates the d3 line positioning and visibility attributes of each of the configured borders */ protected updateBorders(): void; } declare class XYGrid extends Grid implements IGrid { static TICK_LABEL_OVERFLOW_DEBOUNCE_INTERVAL: number; protected axisX: IAxis; protected axisYLeft: IAxis; protected axisYRight: IAxis; protected gridY: IAxis; protected gridX: IAxis; private _bottomScaleId?; private _leftScaleId?; private _rightScaleId; private reconcileMarginsDebounce; private handleTickLabelOverflowDebounceIndex; /** * Returns the id of the bottom axis scale */ get bottomScaleId(): string | undefined; /** * Sets the id of the bottom axis scale */ set bottomScaleId(id: string | undefined); /** * Returns the id of the left axis scale */ get leftScaleId(): string | undefined; /** * Sets the id of the left axis scale */ set leftScaleId(id: string | undefined); /** * Returns the id of the right axis scale */ get rightScaleId(): string; /** * Sets the id of the right axis scale */ set rightScaleId(id: string); /** @ignore */ set scales(scales: ScalesIndex); /** @ignore */ get scales(): ScalesIndex; /** See {@link IGrid#config} */ config(): IXYGridConfig; /** See {@link IGrid#config} */ config(config: IXYGridConfig): this; constructor(config?: IXYGridConfig); /** See {@link IGrid#build} */ build(): IGrid; /** * Handle axis opacity when emphasizing/deemphasizing chart series * * @param e * @private */ handleSeriesStateChange(e: IChartEvent): Record> | undefined; /** * Return opacity for each axis * * @param e * @param axes * @private */ private calculateAxesStyles; /** See {@link IGrid#buildPlugins} */ buildPlugins(chart: IChart): IChartPlugin[]; /** See {@link IGrid#update} */ update(): IGrid; /** @ignore */ drawTicks(config: IAxisConfig, axis: IAxis, scale: IScale, axisGenerator: any): void; /** @ignore */ drawGrids(config: IAxisConfig, axis: IAxis, axisGenerator: any, scale: IScale, size: number): void; /** See {@link IGrid#updateRanges} */ updateRanges(): IGrid; protected updateXAxis(): void; protected updateYAxes(): void; protected updateAxes(): void; protected adjustAxisTicks(labelGroup: D3Selection, scale: IScale): void; protected handleTickLabelOverflow(labelGroup: D3Selection, scale: IScale, axisLabels: HTMLElement[]): void; protected selectAllAxisLabels(axisGroup: D3Selection): HTMLElement[]; protected getOuterWidthDimensionCorrection(): number; private handleMarginUpdate; private hasRightYAxis; private buildAxes; private filterRepeatedElements; private getElementsToHide; private elementsFiltering; private getTextMeasurement; private getMaxTextWidth; private getTickDistance; private recalculateMargins; private fitBottomAxis; /** * This method invokes updateRanges if the margins have changed, but only after a debounce period. * ---- * The debounce is necessary because, in the case of a very short axis, repeated attempts to * alternately fit axis labels and recalculate ticks may conflict with each other * causing the old and new margins to never be equal upon comparison. This scenario can cause a d3 * call stack overflow, but with a debounce, d3 can keep up with the recalculations until the chart * is resized to consistently accommodate the width of the labels. */ private reconcileMarginsWithDebounce; private isApproximatelyEqual; private areMarginsApproximatelyEqual; } /** @ignore */ declare class RadialGrid extends Grid implements IGrid { build(): IGrid; updateDimensions(dimensions: IDimensions): IGrid; protected adjustRenderingArea: () => void; private recenter; } /** * Default gauge label formatter name */ declare const GAUGE_LABEL_FORMATTER_NAME_DEFAULT = "gauge-label"; /** * Gauge labels container class name */ declare const GAUGE_LABELS_CONTAINER_CLASS = "gauge-labels"; /** * Gauge threshold label class name */ declare const GAUGE_THRESHOLD_LABEL_CLASS = "threshold-label"; /** * Highlights the label on x-axis that corresponds to interaction position * * @class InteractionLabelPlugin * @extends {ChartPlugin} */ declare class InteractionLabelPlugin extends ChartPlugin { private formatterName; static LAYER_NAME: string; areLabelUpdatesEnabled: boolean; private isChartInView; private lastInteractionValuesPayload; private interactionLabelLayer; private readonly destroy$; private elBBox; constructor(formatterName?: string); initialize(): void; protected handleLabelUpdate(): void; protected updateLabel(scale: IScale, value: any): void; destroy(): void; private buildInteractionLabel; } /** * Draws a vertical line on the x-axis that corresponds to interaction position * * @class InteractionLinePlugin * @extends {ChartPlugin} */ declare class InteractionLinePlugin extends ChartPlugin { static LAYER_NAME: string; private isChartInView; private lastInteractionValuesPayload; private interactionLineLayer; private readonly destroy$; initialize(): void; private handleLineUpdate; private updateLine; destroy(): void; } /** @ignore */ declare class MouseInteractiveAreaPlugin extends ChartPlugin { private mouseInteractiveArea; private readonly destroy$; private interactionValuesActive; constructor(mouseInteractiveArea: MouseInteractiveArea); initialize(): void; update(): void; updateDimensions(): void; destroy(): void; private highlightReset; } /** * Extends ChartPopoverPlugin to handle popover positioning for radial charts. */ declare class RadialPopoverPlugin extends ChartPopoverPlugin { protected getAbsolutePosition(valArr: any[]): IElementPosition; } /** @ignore */ declare class RenderEnginePlugin extends ChartPlugin { private renderEngine; private isChartInView; private lastInteractionValuesPayload; private readonly destroy$; initialize(): void; update(): void; updateDimensions(): void; destroy(): void; } /** * This radial tooltips plugin handles special tooltip positioning requirements for donut / pie charts. */ declare class RadialTooltipsPlugin extends ChartTooltipsPlugin { protected getTooltipPosition(dataPoint: IDataPoint, chartSeries: IChartSeries): ITooltipPosition; protected getAbsolutePosition(relativePosition: ITooltipPosition, chartPosition: IPosition): ITooltipPosition; /** * Calculate the position for the tooltip overlay based on the angle of the pie slice * * @param {number} angle in radians */ private getOverlayPosition; /** * Calculates what section of the circle does the given angle belong to * * @param {number} angle in radians * @param {number} sections The number of sections the circle is divided into */ private getSectionIndex; private opposite; } /** * Configuration for bar charts * * @interface IBarChartConfig */ interface IBarChartConfig { horizontal?: boolean; grouped?: boolean; } interface IStackMetadata { start: number; end: number; } declare class BarTooltipsPlugin extends ChartTooltipsPlugin { constructor(config?: IBarChartConfig); } interface IZoomPluginConfiguration { enableExternalEvents?: boolean; } declare class ZoomPlugin extends ChartPlugin { config: IZoomPluginConfiguration; static LAYER_NAME: string; static readonly DEFAULT_CONFIG: IZoomPluginConfiguration; private grid; private brush; private zoomBrushLayer; private brushElement; private readonly destroy$; private brushStartX; private interactionHandlerMap; constructor(config?: IZoomPluginConfiguration); initialize(): void; updateDimensions(): void; destroy(): void; private brushStart; private brushMove; private brushEnd; } declare class TimeseriesZoomPluginsSyncService { private collections; registerPlugin(collectionId: string, plugin: TimeseriesZoomPlugin): void; getPlugins(collectionId: string): TimeseriesZoomPlugin[]; removePlugin(collectionId: string, plugin: TimeseriesZoomPlugin): void; syncPositionInsideCollection(collectionId: string, startDate: moment.Moment, endDate: moment.Moment): void; clearZoomInsideCollection(collectionId: string): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface ITimeseriesZoomPluginConfig { collectionId?: string; enableExternalEvents?: boolean; } interface ITimeseriesZoomPluginInspectionFrame { startDate: moment.Moment | undefined; endDate: moment.Moment | undefined; } declare class TimeseriesZoomPlugin extends ChartPlugin { config: ITimeseriesZoomPluginConfig; private syncService?; static LAYER_NAME: string; static readonly DEFAULT_CONFIG: ITimeseriesZoomPluginConfig; private grid; private brush; private zoomBrushLayer; private brushElement; private destroy$; private interactionHandlerMap; private xScale; private brushStartXCoord?; private brushEndXCoord?; private brushStartXDate?; private brushEndXDate?; private isChartHoverd; private isPopoverDisplayed; private zoomLineLayer; private readonly openPopoverSubject; readonly openPopover$: rxjs.Observable; private readonly closePopoverSubject; readonly closePopover$: rxjs.Observable; private readonly zoomCreatedSubject; readonly zoomCreated$: rxjs.Observable; private resizeHandler; constructor(config?: ITimeseriesZoomPluginConfig, syncService?: TimeseriesZoomPluginsSyncService | undefined); initialize(): void; updateDimensions(): void; destroy(): void; showPopover(): void; closePopover(): void; moveBrushByDate(startDate: moment.Moment, endDate: moment.Moment): void; moveBrushByCoord(startX: number | undefined, endX: number | undefined): void; clearBrush(): void; getInspectionFrame(): ITimeseriesZoomPluginInspectionFrame; private getDateFromCoord; private addZoomBoundaryLine; private onBrushStart; private onBrushMove; private onBrushEnd; private createBrushWithoutDrag; private moveBrush; } declare class Chart implements IChart { private grid; configuration?: IChartConfiguration | undefined; readonly eventBus: EventBus>; element: HTMLElement; target?: D3Selection; filterDefs?: Selection; private dataManager; private renderEngine; private updateSubject; private updateDimensionsSubject; private seriesStatesSubject; private plugins; constructor(grid: IGrid, configuration?: IChartConfiguration | undefined); getEventBus(): EventBus; getDataManager(): DataManager; getRenderEngine(): RenderEngine; getGrid(): IGrid; addPlugin(plugin: IChartPlugin): void; removePlugin(classRef: typeof ChartPlugin): void; addPlugins(...plugins: IChartPlugin[]): void; removePlugins(...classRefs: (typeof ChartPlugin)[]): void; hasPlugin(classRef: typeof ChartPlugin): boolean; build(element: HTMLElement): void; private configureCssFilters; protected buildDataManager(): DataManager; protected buildGrid(): void; protected buildRenderEngine(lasagna: Lasagna, dataManager: DataManager): RenderEngine; update(seriesSet: IChartSeries[]): void; updateDimensions(): void; initialize(): void; destroy(): void; setSeriesStates(renderStateData: IRenderStateData[]): void; private onUpdate; private onUpdateDimensions; private updateTargetDimensions; private onSetSeriesStates; } /** * Chart assist implementation to be used with spark charts */ declare class SparkChartAssist implements IChartAssist { readonly showBottomAxis: boolean; readonly showTopBorder: boolean; palette: IChartPalette; markers: IValueProvider; /** Collection of ISpark objects */ sparks: ISpark[]; /** Used for keeping tabs on the legend's active state */ isLegendActive: boolean; /** Grid config for all sparks except the last (bottom) one */ readonly gridConfig: XYGridConfig; /** Grid config for the last (bottom) spark */ readonly lastGridConfig: XYGridConfig; highlightedDataPoints: IDataPointsPayload; constructor(showBottomAxis?: boolean, showTopBorder?: boolean, palette?: IChartPalette, markers?: IValueProvider); /** * Use this method to update the set of sparks if they all consist of only one series. * If one or more sparks has multiple series use the updateSparks method instead. * * See {@link IChartAssist#update} */ update(inputSeriesSet: IChartAssistSeries[]): void; /** * Use this method to update the set of sparks if any of them consist of more than one series. * * @param {ISpark[]} sparks The collection of sparks to update */ updateSparks(sparks: ISpark[]): void; /** See {@link IChartAssist#getHighlightedValue} */ getHighlightedValue(chartSeries: IChartSeries, scaleKey: string, formatterName?: string): string | number; /** * To use the for-cycle trackBy, set the id value on each spark * and assign this function to the ngFor trackBy property */ trackByFn(_index: number, spark: ISpark): string | undefined; setRenderState(_seriesId: string, _state: RenderState): void; getVisibleSeriesWithLegend(): IChartAssistSeries[]; protected createChart(lastSpark: boolean): Chart; private configureEventSubscriptions; private reconfigureChart; } /** Common CSS filter IDs */ declare enum CssFilterId { Grayscale = "grayscale" } /** CSS grayscale filter rule value */ declare const GRAYSCALE_FILTER = "url(\"#grayscale\")"; /** Transformation matrix value for applying a 100% grayscale appearance to an svg element */ declare const GRAYSCALE_COLOR_MATRIX = "\n0.2126 0.7152 0.0722 0 0\n0.2126 0.7152 0.0722 0 0\n0.2126 0.7152 0.0722 0 0\n0 0 0 1 0\n"; /** Renderer configuration for the thresholds on a chart */ declare const THRESHOLDS_MAIN_CHART_RENDERER_CONFIG: IRendererConfig; /** Renderer configuration for a thresholds summary chart */ declare const THRESHOLDS_SUMMARY_RENDERER_CONFIG: IRendererConfig; /** Default configuration for marker interaction */ declare const DEFAULT_MARKER_INTERACTION_CONFIG: IMarkerInteractionConfig; /** * Class name for gauge threshold markers */ declare const GAUGE_THRESHOLD_MARKER_CLASS = "gauge-threshold-marker"; /** Interface for side indicator data accessors */ interface ISideIndicatorDataAccessors extends IDataAccessors { /** Accessor indicating whether the side indicator should be active */ active: DataAccessor; } /** Interface for side indicator series accessors */ interface ISideIndicatorSeriesAccessors extends ISeriesAccessors { /** Indicates the start value of the side indicator */ start: SeriesAccessor; /** Indicates the end value of the side indicator */ end: SeriesAccessor; /** Indicates the active color of the side indicator */ activeColor: SeriesAccessor; /** Optional accessor indicating the inactive color of the side indicator. A grayscale filter is applied to the active color by default */ inactiveColor?: SeriesAccessor; } /** Interface for side indicator accessors */ interface ISideIndicatorAccessors { /** Accessors for the side indicator data */ data: ISideIndicatorDataAccessors; /** Accessors for the side indicator series */ series: ISideIndicatorSeriesAccessors; } /** Standard definition for side indicator series and data accessors */ declare class SideIndicatorAccessors implements ISideIndicatorAccessors { data: ISideIndicatorDataAccessors; series: ISideIndicatorSeriesAccessors; constructor(); } /** * Renderer for drawing threshold side indicators */ declare class SideIndicatorRenderer extends XYRenderer { /** @deprecated As of Nova v9, use RenderLayerName.unclippedData enum value instead. Removal: NUI-5753 */ static SIDE_INDICATORS_LAYER: string; private DEFAULT_CONFIG; /** * Creates an instance of SideIndicatorRenderer. * @param {IRendererConfig} [config={}] Renderer configuration object */ constructor(config?: IRendererConfig); /** See {@link Renderer#draw} */ draw(renderSeries: IRenderSeries, rendererSubject: Subject): void; /** See {@link Renderer#getDataPointIndex} */ getDataPointIndex(series: IDataSeries, values: { [p: string]: any; }, scales: Scales): number; /** See {@link Renderer#getRequiredLayers} */ getRequiredLayers(): ILasagnaLayer[]; } interface INoopAccessors extends IAccessors { data: any; /** Series level accessors - e.g. for colors, markers, etc. */ series: any; } declare class NoopAccessors implements INoopAccessors { series: any; data: any; constructor(); } /** * Renderer that is able to draw line chart */ declare class NoopRenderer extends Renderer { /** See {@link Renderer#draw} */ draw(renderSeries: IRenderSeries, rendererSubject: Subject): void; /** See {@link Renderer#highlightDataPoint} */ highlightDataPoint(renderSeries: IRenderSeries, dataPointIndex: number, rendererSubject: Subject): void; /** See {@link Renderer#getRequiredLayers} */ getRequiredLayers(): ILasagnaLayer[]; /** See {@link Renderer#getDataPointPosition} */ getDataPointPosition(dataSeries: IDataSeries, index: number, scales: Scales): IPosition; } interface IBarDataAccessors extends IRectangleDataAccessors { category: DataAccessor; start: DataAccessor; end: DataAccessor; thickness?: DataAccessor; value?: DataAccessor; color?: DataAccessor; marker?: DataAccessor; cssClass?: DataAccessor; } interface IBarAccessors extends IAccessors { data: IBarDataAccessors; series: IRectangleSeriesAccessors; } declare abstract class BarAccessors extends RectangleAccessors implements IBarAccessors { private colorProvider; private markerProvider; data: IBarDataAccessors; series: IRectangleSeriesAccessors; constructor(colorProvider?: IValueProvider, markerProvider?: IValueProvider); private getSingleValue; } declare function stackedPreprocessor(chartSeriesSet: IChartSeries[], isVisible: (chartSeries: IChartSeries) => boolean): IChartSeries[]; declare function stack(this: ChartAssist, chartSeriesSet: IChartAssistSeries[]): IChartAssistSeries[]; /** * Creates an {@link XYGrid} with predefined {@link BarGridConfig} or * {@link BarHorizontalGridConfig} using {@link IBarChartConfig#horizontal} horizontal property. Default orientation is **vertical**. * * @param {IBarChartConfig} [config] bar chart configuration for orientation definition. * @returns {XYGrid} */ declare function barGrid(config?: IBarChartConfig): XYGrid; /** * Generates scales definition to be used with category+value based bar charts * * @param config * @param valueScale */ declare function barScales(config?: IBarChartConfig, valueScale?: LinearScale): IXYScales; /** * Creates {@link VerticalBarAccessors} or {@link VerticalBarAccessors} * using {@link IBarChartConfig#horizontal} horizontal property. Default orientation is **vertical**. * * @param {IBarChartConfig} [config] * @param {IValueProvider} [colorProvider] * @param {IValueProvider} [markerProvider] * @returns {IBarAccessors} */ declare function barAccessors(config?: IBarChartConfig, colorProvider?: IValueProvider, markerProvider?: IValueProvider): IBarAccessors; declare class HorizontalBarAccessors extends BarAccessors { data: IBarDataAccessors; series: IRectangleSeriesAccessors; constructor(colorProvider?: IValueProvider, markerProvider?: IValueProvider); } declare class VerticalBarAccessors extends BarAccessors { data: IBarDataAccessors; series: IRectangleSeriesAccessors; constructor(colorProvider?: IValueProvider, markerProvider?: IValueProvider); } interface IStatusDataAccessors extends IBarDataAccessors { status: DataAccessor; } interface IStatusAccessors extends IBarAccessors { data: IStatusDataAccessors; } declare class StatusAccessors implements IStatusAccessors { private barAccessors; static STATUS_CATEGORY: string; static STATUS_DOMAIN: string[]; get data(): IStatusDataAccessors; get series(): IRectangleSeriesAccessors; constructor(barAccessors: IBarAccessors); } declare function statusAccessors(colorProvider: IValueProvider, markerProvider?: IValueProvider): StatusAccessors; type SelectedDatPointIdxFn = (seriesId: string) => number; declare class BarHighlightStrategy implements IHighlightStrategy { protected scaleKey: keyof IXYScales; protected levels: number; protected selectedDataPointIdxFn?: SelectedDatPointIdxFn | undefined; /** * @param scaleKey scale that will be used for searching for the data point that will be highlighted * @param levels for band scales, how many levels deep do we go to compare values */ constructor(scaleKey: keyof IXYScales, levels?: number, selectedDataPointIdxFn?: SelectedDatPointIdxFn | undefined); getDataPointIndex(renderer: BarRenderer, series: IDataSeries, values: { [p: string]: any; }, scales: Scales): number; findDataPointByValue(series: IDataSeries, value: any, scaleKey: keyof IXYScales, scales?: Scales): number; highlightDataPoint(renderer: BarRenderer, renderSeries: IRenderSeries, dataPointIndex: number, rendererSubject: Subject): void; draw(renderer: BarRenderer, renderSeries: IRenderSeries, rendererSubject: Subject): void; } declare class BarHighlightStrategyOutline extends BarHighlightStrategy { private outlineAdd; private outlineElsMap; /** * @param scaleKey scale that will be used for searching for the data point that will be highlighted * @param levels for band scales, how many levels deep do we go to compare values */ constructor(scaleKey: keyof IXYScales, levels?: number, selectedDataPointIdxFn?: SelectedDatPointIdxFn); highlightDataPoint(renderer: BarRenderer, renderSeries: IRenderSeries, dataPointIndex: number): void; } declare class BarSeriesHighlightStrategy implements IHighlightStrategy { private scaleKey; private levels; /** * @param scaleKey scale that will be used for searching for the datapoint that will be highlighted * @param levels for band scales, how many levels deep do we go to compare values */ constructor(scaleKey: keyof IXYScales, levels?: number); getDataPointIndex(renderer: BarRenderer, series: IDataSeries, values: { [p: string]: any; }, scales: Scales): number; findDataPointByValue(series: IDataSeries, value: any, scaleKey: keyof IXYScales): number; highlightDataPoint(renderer: BarRenderer, renderSeries: IRenderSeries, dataPointIndex: number, rendererSubject: Subject): void; draw(renderer: BarRenderer, renderSeries: IRenderSeries, rendererSubject: Subject): void; } /** * Default configuration for Linear Gauge Thresholds Renderer */ declare const DEFAULT_LINEAR_GAUGE_THRESHOLDS_RENDERER_CONFIG: ILinearGaugeThresholdsRendererConfig; /** * Renderer for drawing threshold level indicators for gauges */ declare class LinearGaugeThresholdsRenderer extends BarRenderer { config: ILinearGaugeThresholdsRendererConfig; /** * Creates an instance of LinearGaugeThresholdsRenderer. * @param {ILinearGaugeThresholdsRendererConfig} [config] * Renderer configuration object. Defaults to `DEFAULT_LINEAR_GAUGE_THRESHOLDS_RENDERER_CONFIG` constant value. */ constructor(config?: ILinearGaugeThresholdsRendererConfig); /** See {@link Renderer#draw} */ draw(renderSeries: IRenderSeries, rendererSubject: Subject): void; /** See {@link Renderer#getRequiredLayers} */ getRequiredLayers(): ILasagnaLayer[]; } interface IRadialDataAccessors { value: DataAccessor; color?: DataAccessor; /** Additional custom keys to match the base interface */ [key: string]: DataAccessor | undefined; } interface IRadialSeriesAccessors { color?: SeriesAccessor; /** Additional custom keys to match the base interface */ [key: string]: SeriesAccessor | undefined; } interface IRadialAccessors extends IAccessors { data: IRadialDataAccessors; series: IRadialSeriesAccessors; } declare class RadialAccessors implements IRadialAccessors { private colorProvider; data: IRadialDataAccessors; series: IRadialSeriesAccessors; constructor(colorProvider?: IValueProvider); } /** * Pre-processing function for Pie and Donut chart renderers. * * @param {IChartSeries[]} seriesSet incoming data series set * @param {(series: IChartSeries) => boolean} isVisible visibility accessor function * @returns {IChartSeries[]} */ declare function radialPreprocessor(seriesSet: IChartSeries[], isVisible: (series: IChartSeries) => boolean): IChartSeries[]; declare function radial(this: ChartAssist, chartSeriesSet: IChartAssistSeries[]): IChartSeries[]; /** * Default configuration for Radial Renderer */ declare const DEFAULT_RADIAL_RENDERER_CONFIG: IRadialRendererConfig; /** * Radial renderer is a generic renderer that is able to draw pie and donut charts */ declare class RadialRenderer extends Renderer { config: IRadialRendererConfig; protected segmentWidth?: number; /** * Creates an instance of RadialRenderer. * @param {IRadialRendererConfig} [config] * Renderer configuration object. Defaults to `DEFAULT_RADIAL_RENDERER_CONFIG` constant value. */ constructor(config?: IRadialRendererConfig); /** See {@link Renderer#draw} */ draw(renderSeries: IRenderSeries, rendererSubject: Subject): void; /** See {@link Renderer#getDataPointPosition} */ getDataPointPosition(dataSeries: IDataSeries, index: number, scales: Scales): IPosition | undefined; getInnerRadius(range: number[], index: number): number; getOuterRadius(range: [number, number], index: number): number; protected getArc(range: [number, number], generatedArc: Arc, index: number): Arc; protected getSegmentWidth(renderSeries: IRenderSeries): number | undefined; private emitDataPointHighlight; } /** * Default configuration for DonutGaugeThresholdsRenderer */ declare const DEFAULT_DONUT_GAUGE_THRESHOLDS_RENDERER_CONFIG: IDonutGaugeThresholdsRendererConfig; /** * Renderer for drawing threshold level markers for donut gauges */ declare class DonutGaugeThresholdsRenderer extends RadialRenderer { config: IDonutGaugeThresholdsRendererConfig; /** * Creates an instance of RadialGaugeThresholdsRenderer. * @param {IDonutGaugeThresholdsRendererConfig} [config] * Renderer configuration object. Defaults to `DEFAULT_DONUT_GAUGE_THRESHOLDS_RENDERER_CONFIG` constant value. */ constructor(config?: IDonutGaugeThresholdsRendererConfig); /** See {@link Renderer#draw} */ draw(renderSeries: IRenderSeries, rendererSubject: Subject): void; getInnerRadius(range: number[], index: number): number; } /** * Convenience function for generating a standard renderer configuration for a donut gauge * * @returns {IRadialRendererConfig} Standard renderer configuration for a gauge */ declare function donutGaugeRendererConfig(): IRadialRendererConfig; declare class DonutGaugeRenderingUtil { static generateThresholdArcData(data: IGaugeThresholdDatum[]): DefaultArcObject$1[]; private static generateArcValues; } /** * Renderer that is able to draw pie chart */ declare class PieRenderer extends RadialRenderer { protected getArc(range: [number, number], arc: Arc, index: number): Arc; } declare function radialGrid(): RadialGrid; /** * Generates scales definition to be used with radial charts */ declare function radialScales(): IRadialScales; /** * This function adds data points indicating that there is an interruption in the data. * * @param dataSeries * @param accessorKey * @param interval */ declare function calculateMissingData(dataSeries: IDataSeries, accessorKey: string, interval: Duration): any[]; declare class LineSelectSeriesInteractionStrategy implements IHighlightStrategy { readonly INTERACTION_MARGIN = 8; draw(renderer: LineRenderer, renderSeries: IRenderSeries, rendererSubject: Subject): void; getDataPointIndex(renderer: LineRenderer, series: IDataSeries, values: { [p: string]: any; }, scales: Scales): number; highlightDataPoint(renderer: LineRenderer, renderSeries: IRenderSeries, dataPointIndex: number, rendererSubject: Subject): void; private emitEvent; } /** Standard line renderer config for visualizing missing data */ declare class MissingDataLineRendererConfig implements ILineRendererConfig { strokeWidth: number; interactive: boolean; strokeStyle: string; useEnhancedLineCaps: boolean; } /** * Creates an {@link XYGrid} with predefined {@link AreaGridConfig} * * @returns {XYGrid} */ declare function areaGrid(): XYGrid; interface IAreaDataAccessors extends IDataAccessors { x: DataAccessor; x0: DataAccessor; x1: DataAccessor; absoluteX0: DataAccessor; absoluteX1: DataAccessor; y: DataAccessor; y0: DataAccessor; y1: DataAccessor; absoluteY0: DataAccessor; absoluteY1: DataAccessor; } interface IAreaSeriesAccessors extends ISeriesAccessors { color?: SeriesAccessor; marker?: SeriesAccessor; } interface IAreaAccessors extends IAccessors { data: IAreaDataAccessors; series: IAreaSeriesAccessors; } declare class AreaAccessors implements IAreaAccessors { private colorProvider; private markerProvider; data: IAreaDataAccessors; series: IAreaSeriesAccessors; constructor(colorProvider?: IValueProvider, markerProvider?: IValueProvider); } /** * Renderer that is able to draw line chart */ declare class AreaRenderer extends XYRenderer { config: IAreaRendererConfig; private DEFAULT_CONFIG; /** * Creates an instance of AreaRenderer. * @param {IAreaRendererConfig} [config={}] Renderer configuration object */ constructor(config?: IAreaRendererConfig); /** See {@link Renderer#draw} */ draw(renderSeries: IRenderSeries, rendererSubject: Subject): void; /** * Renders the line in prepared element * * @param {IRenderSeries} renderSeries * @param {D3Selection} path D3 Selection with element pre-created and pre-styled */ drawArea(renderSeries: IRenderSeries, path: D3Selection): void; getDomain(data: any[], dataSeries: IDataSeries, scaleName: string, scale: IScale): any[]; /** See {@link Renderer#getRequiredLayers} */ getRequiredLayers(): ILasagnaLayer[]; /** * Filters given dataset by domain of provided scale * * @param data * @param dataSeries * @param scaleName * @param domain */ filterDataByDomain(data: any[], dataSeries: IDataSeries, scaleName: string, domain: any[]): any[]; highlightDataPoint(renderSeries: IRenderSeries, dataPointIndex: number, rendererSubject: Subject): void; safetyCheck(value: number | undefined): number; } declare function stackedAreaPreprocessor(chartSeriesSet: IChartAssistSeries[], isVisible: (chartSeries: IChartSeries) => boolean): IChartSeries[]; declare function stackedArea(this: ChartAssist, chartSeriesSet: IChartAssistSeries[]): IChartAssistSeries[]; declare function stackedPercentageAreaPreprocessor(chartSeriesSet: IChartSeries[], isVisible: (chartSeries: IChartSeries) => boolean): IChartSeries[]; declare function stackedPercentageArea(this: ChartAssist, chartSeriesSet: IChartAssistSeries[]): IChartAssistSeries[]; declare function calculateDomainValueCombinedTotals(baseAccessorKey: string, valueAccessorKey: string, chartSeries: IChartSeries, isVisible: any, domainValueCombinedTotals: Record): void; declare function applyStackMetadata(baseAccessorKey: string, valueAccessorKey: string, chartSeries: IChartSeries, isVisible: any, domainValueStacks: Record, domainValueCombinedTotals: Record): void; declare function stackedAreaAccessors(colorProvider?: IValueProvider, markerProvider?: IValueProvider): IAreaAccessors; /** * Used for simplified threshold zone definition. It is expected the start to be < end. */ interface ISimpleThresholdZone { status: string; start?: number; end?: number; } interface ZoneCross { status: string; start?: Numeric; end?: Numeric; } /** * Used for specifying the start or end boundary of a zone */ declare enum ZoneBoundary { Start = "start", End = "end" } /** * This service provides functionality that facilitates the creation of thresholds related visual element on charts. */ declare class ThresholdsService { private loggerService; static SERIES_ID_SUFFIX: string; constructor(loggerService: LoggerService); /** * Calculates the threshold "statuses" - from/to and what zone we're in. It is the first step that is required before the usage of other methods. Having * the threshold "statuses" assigned to each data point enables us to access the threshold information not only in other methods for threshold * calculation, but also in other places, like legend or tooltips. * * @param dataSeries source data series that will be enhanced with threshold metadata * @param zones zones defined as data series with IAreaAccessors */ injectThresholdsData(dataSeries: IDataSeries, zones: IDataSeries[]): void; /** * This method creates a background series for TimeInterval or continuous (currently only works with time) scale. * If the series is continuous it detects intersection of source line data with given threshold zones and generates start / end for status periods. * Otherwise it will use the start and the end of the band. * * The default value of the rendererConfig parameter is {@link THRESHOLDS_MAIN_CHART_RENDERER_CONFIG}. For a summary chart, usually a smaller status * chart positioned below a main chart, use {@link THRESHOLDS_SUMMARY_RENDERER_CONFIG}. * * @param sourceSeries The data series from which to derive a background visualization * @param zones Zones defined as data series with IAreaAccessors * @param scales The scales to be used for the background visualization * @param colorProvider A value provider for the colors to be used for each status * @param thicknessMap Map of status to number specifying a custom height per status for the background visualization. * If a status is not specified in the map, the default thickness is the full height of the rendering area. * @param rendererConfig The renderer's configuration */ getBackgrounds(sourceSeries: IDataSeries, zones: IDataSeries[], scales: Scales, colorProvider: IValueProvider, thicknessMap?: Record, rendererConfig?: IRendererConfig): IChartAssistSeries; /** * Calculates background data for continuous scale based on intersections between the source data and zone definitions. * * @param sourceSeries source data series from which to derive background data * @param zones zones defined as data series with IAreaAccessors */ private getBackgroundsDataForContinuousScale; /** * Calculate all "interesting" points along the data series that will be important to calculate the threshold status changes * * @param sourceSeries source data series from which to derive the break points * @param zones zones defined as data series with IAreaAccessors */ private getBreakPoints; /** * Generates threshold zone series from simplified zone definition. Simplified definition provides only two numbers to define the zone interval. * Creating these series manually is also possible for dynamic threshold limits. * * @param sourceSeries source data series from which to derive the zones * @param simpleZones a collection of zones that are each defined by a start value and/or an end value. (A missing start or end value indicates an infinite zone.) * @param colorProvider A value provider for the colors to be used for each status */ getThresholdZones(sourceSeries: IDataSeries, simpleZones: ISimpleThresholdZone[], colorProvider: IValueProvider): IDataSeries[]; /** * Creates data series representing threshold lines on the chart. Solves collision between zones, where multiple zones are using the same limit value. * * @param zones Zones defined as data series with IAreaAccessors */ getThresholdLines(zones: IDataSeries[]): IChartAssistSeries[]; /** * Creates a IChartAssistSeries that represents a threshold zone limit defined by given valueAccessor * * @param zone A zone defined as a data series with IAreaAccessors * @param valueAccessor Accessor for the threshold limit * @param zoneBoundary The zone boundary represented by the line. Default is ZoneBoundary.Start. */ getThresholdLine(zone: IDataSeries, valueAccessor: DataAccessor, zoneBoundary?: ZoneBoundary): IChartAssistSeries; /** * Calculates the point where the data series line will cross a threshold line using the two closest points for each * * @param {IPosition} dataFrom Data starting point * @param {IPosition} dataTo Data ending point * @param {IPosition} thresholdFrom Threshold starting point * @param {IPosition} thresholdTo Threshold ending point * @returns {IPosition} the position of the cross point or `null` if lines don't cross */ getCrossPoint(dataFrom: IPosition, dataTo: IPosition, thresholdFrom: IPosition, thresholdTo: IPosition): IPosition | undefined; /** * Find the zone that is relevant for current input data point defined by x, y coordinates. * Keep increasing the index while the next x value of threshold zone is still less than input x * * @param zones Zones defined as data series with IAreaAccessors * @param zoneIndexes provided indexes keep the last used value for searching for the given x coordinate, so it is expected that provided data points * are ordered by x in ascending order. * @param x The x value of the zone * @param y The y value of the zone */ private getZoneByXY; private moveZoneIndex; getCrossPointWithY(dataFrom: IPosition, dataTo: IPosition, y: number): IPosition | undefined; /** * Creates side indicator data series for given threshold zones * * @param zones Zones defined as data series with IAreaAccessors * @param scales The scales to be used for the side indicators * @param rendererConfig Configuration for the renderer. Default is the exported constant 'THRESHOLDS_MAIN_CHART_RENDERER_CONFIG' */ getSideIndicators(zones: IDataSeries[], scales: Scales, rendererConfig?: IRendererConfig): IChartAssistSeries[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Applies grid configuration for summary thresholds section * * @param c */ declare function thresholdsSummaryGridConfig(c?: XYGridConfig): XYGridConfig; /** * Applies grid configuration that is used for main chart (with a threshold summary section below it) * * @param c */ declare function thresholdsTopGridConfig(c?: XYGridConfig): XYGridConfig; export { AXES_STYLE_CHANGE_EVENT, AreaAccessors, AreaGridConfig, AreaRenderer, AxisConfig, BandScale, BarAccessors, BarGridConfig, BarHighlightStrategy, BarHighlightStrategyOutline, BarHorizontalGridConfig, BarRenderer, BarSeriesHighlightStrategy, BarStatusGridConfig, BarTooltipsPlugin, BasicLegendTileComponent, BorderConfig, CHART_COMPONENT, CHART_MARKERS, CHART_PALETTE_CS1, CHART_PALETTE_CS2, CHART_PALETTE_CS3, CHART_PALETTE_CS_S, CHART_PALETTE_CS_S_EXTENDED, CHART_VIEW_STATUS_EVENT, Chart, ChartAssist, ChartAssistEventType, ChartAssistRenderStateData, ChartCollection, ChartCollectionIdDirective, ChartCollectionService, ChartComponent, ChartDonutContentComponent, ChartDonutContentPlugin, ChartMarkerComponent, ChartPalette, ChartPlugin, ChartPopoverComponent, ChartPopoverPlugin, ChartTooltipComponent, ChartTooltipDirective, ChartTooltipsComponent, ChartTooltipsPlugin, CssFilterId, DATA_POINT_INTERACTION_RESET, DATA_POINT_NOT_FOUND, DEFAULT_DONUT_GAUGE_THRESHOLDS_RENDERER_CONFIG, DEFAULT_LINEAR_GAUGE_THRESHOLDS_RENDERER_CONFIG, DEFAULT_MARKER_INTERACTION_CONFIG, DEFAULT_RADIAL_RENDERER_CONFIG, DESTROY_EVENT, DONUT_GAUGE_LABEL_CLEARANCE_DEFAULT, DataManager, DataSeries, DimensionConfig, DonutGaugeLabelsPlugin, DonutGaugeRenderingUtil, DonutGaugeThresholdsRenderer, EMPTY_CONTINUOUS_DOMAIN, EventBus, GAUGE_LABELS_CONTAINER_CLASS, GAUGE_LABEL_FORMATTER_NAME_DEFAULT, GAUGE_QUANTITY_SERIES_ID, GAUGE_REMAINDER_SERIES_ID, GAUGE_THRESHOLD_LABEL_CLASS, GAUGE_THRESHOLD_MARKERS_SERIES_ID, GAUGE_THRESHOLD_MARKER_CLASS, GRAYSCALE_COLOR_MATRIX, GRAYSCALE_FILTER, GaugeMode, GaugeUtil, Grid, GridConfig, HIGHLIGHT_DATA_POINT_EVENT, HIGHLIGHT_SERIES_EVENT, HorizontalBarAccessors, IGNORE_INTERACTION_CLASS, INTERACTION_COORDINATES_EVENT, INTERACTION_DATA_POINTS_EVENT, INTERACTION_DATA_POINT_EVENT, INTERACTION_SERIES_EVENT, INTERACTION_VALUES_ACTIVE_EVENT, INTERACTION_VALUES_EVENT, InteractionLabelPlugin, InteractionLinePlugin, InteractionType, LEGEND_SERIES_CLASS_NAME, LINEAR_GAUGE_LABEL_CLEARANCE_DEFAULTS, Lasagna, LegendComponent, LegendInteractionAssist, LegendSeriesComponent, LineAccessors, LineRenderer, LineSelectSeriesInteractionStrategy, LinearGaugeLabelsPlugin, LinearGaugeThresholdsRenderer, LinearScale, MOUSE_ACTIVE_EVENT, MappedValueProvider, MissingDataLineRendererConfig, MouseInteractiveArea, MouseInteractiveAreaPlugin, NORMALIZED_DOMAIN, NoopAccessors, NoopRenderer, NoopScale, NuiChartsModule, PathMarker, PieRenderer, PointScale, ProcessedColorProvider, REFRESH_EVENT, RadialAccessors, RadialGrid, RadialPopoverPlugin, RadialRenderer, RadialTooltipsPlugin, RectangleAccessors, RenderEngine, RenderEnginePlugin, RenderLayerName, RenderState, Renderer, RichLegendTileComponent, SELECT_DATA_POINT_EVENT, SERIES_STATE_CHANGE_EVENT, SET_DOMAIN_EVENT, STANDARD_RENDER_LAYERS, Scale, SequentialChartMarkerProvider, SequentialColorProvider, SequentialValueProvider, SideIndicatorAccessors, SideIndicatorRenderer, SparkChartAssist, StandardGaugeColor, StandardGaugeThresholdId, StandardGaugeThresholdMarkerRadius, StandardLinearGaugeThickness, StatusAccessors, SvgMarker, THRESHOLDS_MAIN_CHART_RENDERER_CONFIG, THRESHOLDS_SUMMARY_RENDERER_CONFIG, TOOLTIP_POSITION_OFFSET, TextColorProvider, ThresholdsService, TimeIntervalScale, TimeScale, TimeseriesZoomPlugin, TimeseriesZoomPluginsSyncService, UtilityService, VerticalBarAccessors, XYAccessors, XYGrid, XYGridConfig, XYRenderer, ZoneBoundary, ZoomPlugin, applyStackMetadata, areaGrid, barAccessors, barGrid, barScales, borderMidpoint, calculateDomainValueCombinedTotals, calculateMissingData, convert, datetimeFormatter, defaultColorProvider, defaultMarkerProvider, defaultPalette, domainWithAuxiliarySeries, donutGaugeRendererConfig, getAutomaticDomain, getAutomaticDomainWithIncludedInterval, getAutomaticDomainWithTicks, getHorizontalSetup, getVerticalSetup, hasInnerScale, invert, isBandScale, isDaylightSavingTime, isDomainWithTicksCalculator, linearGaugeGridConfig, mergeDomains, radial, radialGrid, radialPreprocessor, radialScales, sparkChartGridConfig, stack, stackedArea, stackedAreaAccessors, stackedAreaPreprocessor, stackedPercentageArea, stackedPercentageAreaPreprocessor, stackedPreprocessor, statusAccessors, thresholdsSummaryGridConfig, thresholdsTopGridConfig }; export type { D3Selection, DataAccessor, DomainCalculator, Formatter, GaugeThresholdDefs, IAccessors, IAllAround, IAreaAccessors, IAreaDataAccessors, IAreaRendererConfig, IAreaSeriesAccessors, IAxesStyleChangeEventPayload, IAxis, IAxisConfig, IBandScale, IBarAccessors, IBarChartConfig, IBarDataAccessors, IBarRendererConfig, IBorderConfig, IBorders, IChart, IChartAssist, IChartAssistEvent, IChartAssistSeries, IChartCollectionEvent, IChartComponent, IChartConfiguration, IChartEvent, IChartMarker, IChartPalette, IChartPlugin, IChartSeries, IChartViewStatusEventPayload, ICoordinates, IDataAccessors, IDataPoint, IDataPointsPayload, IDataSeries, IDimensionConfig, IDimensions, IDomainLimits, IDomainWithTicksCalculator, IDonutGaugeThresholdsRendererConfig, IElementPosition, IEnhancedLineCapConfig, IFormatters, IGaugeConfig, IGaugeLabelsConfig, IGaugeLabelsPluginConfig, IGaugeRenderingAttributes, IGaugeRenderingTools, IGaugeThresholdDatum, IGaugeThresholdDef, IGaugeThresholdsConfig, IGaugeThresholdsData, IGaugeThresholdsRendererConfig, IGrid, IGridConfig, IHasInnerScale, IHighlightStrategy, IInteractionCoordinatesPayload, IInteractionDataPointEvent, IInteractionDataPointsEvent, IInteractionEvent, IInteractionPayload, IInteractionValues, IInteractionValuesPayload, ILasagnaLayer, ILineAccessors, ILineDataAccessors, ILineRendererConfig, ILineSeriesAccessors, ILinearGaugeThresholdsRendererConfig, ILinearScales, IMarkerInteractionConfig, INoopAccessors, IPopoverPluginConfig, IPosition, IRadialAccessors, IRadialDataAccessors, IRadialRendererConfig, IRadialScales, IRadialSeriesAccessors, IRectangleAccessors, IRectangleDataAccessors, IRectangleSeriesAccessors, IRenderContainers, IRenderSeries, IRenderStateData, IRenderStatesIndex, IRendererConfig, IRendererEventPayload, IScale, ISeriesAccessors, ISetDomainEventPayload, ISideIndicatorAccessors, ISideIndicatorDataAccessors, ISideIndicatorSeriesAccessors, ISimpleThresholdZone, ISpark, IStackMetadata, IStartEndRangeAccessors, IStatusAccessors, IStatusDataAccessors, ITextOverflowArgs, ITickLabelConfig, ITimeseriesZoomPluginConfig, ITimeseriesZoomPluginInspectionFrame, ITooltipPosition, IValueProvider, IValueThicknessAccessors, IXYDataAccessors, IXYGridConfig, IXYScales, IZoneCrossPoint, IZoomPluginConfiguration, Scales, ScalesIndex, SelectedDatPointIdxFn, SeriesAccessor, TextOverflowHandler, ZoneCross };