@nova-ui/charts 20.0.0 → 20.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/css/styles.css +1 -1
- package/fesm2022/nova-ui-charts.mjs +51 -82
- package/fesm2022/nova-ui-charts.mjs.map +1 -1
- package/index.d.ts +4104 -3
- package/package.json +10 -2
- package/chart/chart.component.d.ts +0 -22
- package/chart-collection/chart-collection-id.directive.d.ts +0 -19
- package/chart-collection/chart-collection.service.d.ts +0 -11
- package/chart-collection/public-api.d.ts +0 -2
- package/chart-donut-content/chart-donut-content.component.d.ts +0 -15
- package/chart-marker/chart-marker.component.d.ts +0 -22
- package/chart-popover/chart-popover.component.d.ts +0 -22
- package/chart-tooltips/chart-tooltip.component.d.ts +0 -7
- package/chart-tooltips/chart-tooltip.directive.d.ts +0 -28
- package/chart-tooltips/chart-tooltips.component.d.ts +0 -41
- package/charts.module.d.ts +0 -21
- package/constants.d.ts +0 -30
- package/core/chart-assists/chart-assist.d.ts +0 -120
- package/core/chart-assists/public-api.d.ts +0 -3
- package/core/chart-assists/spark-chart-assist.d.ts +0 -49
- package/core/chart-assists/types.d.ts +0 -59
- package/core/chart-collection.d.ts +0 -51
- package/core/chart.d.ts +0 -46
- package/core/common/chart-plugin.d.ts +0 -9
- package/core/common/data-manager.d.ts +0 -25
- package/core/common/data-series.d.ts +0 -11
- package/core/common/event-bus.d.ts +0 -6
- package/core/common/lasagna.d.ts +0 -15
- package/core/common/mouse-interactive-area.d.ts +0 -23
- package/core/common/palette/chart-palette.d.ts +0 -12
- package/core/common/palette/color.helper.d.ts +0 -1
- package/core/common/palette/default-providers.d.ts +0 -4
- package/core/common/palette/mapped-value-provider.d.ts +0 -14
- package/core/common/palette/markers/path-marker.d.ts +0 -19
- package/core/common/palette/markers/svg-marker.d.ts +0 -11
- package/core/common/palette/palettes.d.ts +0 -20
- package/core/common/palette/processed-color-provider.d.ts +0 -13
- package/core/common/palette/public-api.d.ts +0 -12
- package/core/common/palette/sequential-chart-marker-provider.d.ts +0 -10
- package/core/common/palette/sequential-color-provider.d.ts +0 -9
- package/core/common/palette/sequential-value-provider.d.ts +0 -13
- package/core/common/palette/text-color-provider.d.ts +0 -27
- package/core/common/public-api.d.ts +0 -12
- package/core/common/render-engine.d.ts +0 -59
- package/core/common/renderer.d.ts +0 -110
- package/core/common/scales/band-scale.d.ts +0 -91
- package/core/common/scales/constants.d.ts +0 -2
- package/core/common/scales/domain-calculation/automatic-domain.d.ts +0 -19
- package/core/common/scales/domain-calculation/domain-with-auxiliary-series.d.ts +0 -9
- package/core/common/scales/domain-calculation/domain-with-ticks.d.ts +0 -3
- package/core/common/scales/domain-calculation/merge-domains.d.ts +0 -8
- package/core/common/scales/formatters/datetime-formatter.d.ts +0 -5
- package/core/common/scales/formatters/public-api.d.ts +0 -1
- package/core/common/scales/helpers/convert.d.ts +0 -10
- package/core/common/scales/helpers/domain.d.ts +0 -2
- package/core/common/scales/helpers/invert.d.ts +0 -2
- package/core/common/scales/helpers/is-in-range.d.ts +0 -8
- package/core/common/scales/linear-scale.d.ts +0 -12
- package/core/common/scales/noop-scale.d.ts +0 -21
- package/core/common/scales/point-scale.d.ts +0 -55
- package/core/common/scales/public-api.d.ts +0 -15
- package/core/common/scales/scale.d.ts +0 -44
- package/core/common/scales/time-interval-scale.d.ts +0 -30
- package/core/common/scales/time-scale.d.ts +0 -13
- package/core/common/scales/types.d.ts +0 -144
- package/core/common/types.d.ts +0 -327
- package/core/common/utility.service.d.ts +0 -53
- package/core/grid/config/area-grid-config.d.ts +0 -7
- package/core/grid/config/axis-config.d.ts +0 -20
- package/core/grid/config/bar-grid-config.d.ts +0 -7
- package/core/grid/config/bar-horizontal-grid-config.d.ts +0 -7
- package/core/grid/config/bar-status-grid-config.d.ts +0 -6
- package/core/grid/config/border-config.d.ts +0 -9
- package/core/grid/config/dimension-config.d.ts +0 -31
- package/core/grid/config/grid-config.d.ts +0 -16
- package/core/grid/config/linear-gauge-grid-config-fn.d.ts +0 -11
- package/core/grid/config/public-api.d.ts +0 -11
- package/core/grid/config/spark-chart-grid-config.d.ts +0 -9
- package/core/grid/config/xy-grid-config.d.ts +0 -10
- package/core/grid/default-text-overflow-handler.d.ts +0 -10
- package/core/grid/grid.d.ts +0 -125
- package/core/grid/public-api.d.ts +0 -5
- package/core/grid/radial-grid.d.ts +0 -9
- package/core/grid/types.d.ts +0 -285
- package/core/grid/xy-grid.d.ts +0 -107
- package/core/plugins/chart-donut-content-plugin.d.ts +0 -15
- package/core/plugins/chart-popover-plugin.d.ts +0 -39
- package/core/plugins/gauge/constants.d.ts +0 -12
- package/core/plugins/gauge/donut-gauge-labels-plugin.d.ts +0 -21
- package/core/plugins/gauge/linear-gauge-labels-plugin.d.ts +0 -26
- package/core/plugins/gauge/public-api.d.ts +0 -4
- package/core/plugins/gauge/types.d.ts +0 -16
- package/core/plugins/interaction/interaction-label-plugin.d.ts +0 -24
- package/core/plugins/interaction/interaction-line-plugin.d.ts +0 -18
- package/core/plugins/interaction/public-api.d.ts +0 -2
- package/core/plugins/mouse-interactive-area-plugin.d.ts +0 -14
- package/core/plugins/public-api.d.ts +0 -12
- package/core/plugins/radial-popover-plugin.d.ts +0 -8
- package/core/plugins/render-engine-plugin.d.ts +0 -12
- package/core/plugins/timeseries-zoom-plugin-sync.service.d.ts +0 -13
- package/core/plugins/timeseries-zoom-plugin.d.ts +0 -55
- package/core/plugins/tooltips/bar-tooltips-plugin.d.ts +0 -5
- package/core/plugins/tooltips/chart-tooltips-plugin.d.ts +0 -63
- package/core/plugins/tooltips/index.d.ts +0 -3
- package/core/plugins/tooltips/radial-tooltips-plugin.d.ts +0 -23
- package/core/plugins/types.d.ts +0 -30
- package/core/plugins/zoom-plugin.d.ts +0 -23
- package/core/public-api.d.ts +0 -7
- package/core/types.d.ts +0 -8
- package/gauge/constants.d.ts +0 -54
- package/gauge/gauge-util.d.ts +0 -161
- package/gauge/public-api.d.ts +0 -3
- package/gauge/types.d.ts +0 -89
- package/legend/legend-series/legend-series.component.d.ts +0 -79
- package/legend/legend-tile/basic-legend-tile/basic-legend-tile.component.d.ts +0 -5
- package/legend/legend-tile/public-api.d.ts +0 -2
- package/legend/legend-tile/rich-legend-tile/rich-legend-tile.component.d.ts +0 -33
- package/legend/legend.component.d.ts +0 -37
- package/legend/public-api.d.ts +0 -3
- package/legend/types.d.ts +0 -4
- package/public-api.d.ts +0 -15
- package/renderers/accessors/noop-accessors.d.ts +0 -11
- package/renderers/accessors/public-api.d.ts +0 -3
- package/renderers/accessors/rectangle-accessors.d.ts +0 -30
- package/renderers/accessors/xy-accessors.d.ts +0 -13
- package/renderers/area/area-accessors.d.ts +0 -28
- package/renderers/area/area-grid.d.ts +0 -7
- package/renderers/area/area-renderer.d.ts +0 -41
- package/renderers/area/public-api.d.ts +0 -6
- package/renderers/area/stacked-area-accessors.d.ts +0 -3
- package/renderers/area/stacked-area-preprocessor.d.ts +0 -5
- package/renderers/area/stacked-percentage-area-preprocessor.d.ts +0 -7
- package/renderers/bar/accessors/bar-accessors-fn.d.ts +0 -13
- package/renderers/bar/accessors/bar-accessors.d.ts +0 -24
- package/renderers/bar/accessors/horizontal-bar-accessors.d.ts +0 -8
- package/renderers/bar/accessors/public-api.d.ts +0 -6
- package/renderers/bar/accessors/status-accessors-fn.d.ts +0 -3
- package/renderers/bar/accessors/status-accessors.d.ts +0 -17
- package/renderers/bar/accessors/vertical-bar-accessors.d.ts +0 -8
- package/renderers/bar/bar-grid.d.ts +0 -10
- package/renderers/bar/bar-renderer.d.ts +0 -47
- package/renderers/bar/bar-scales.d.ts +0 -10
- package/renderers/bar/highlight-strategies/bar-highlight-strategy-outline.d.ts +0 -15
- package/renderers/bar/highlight-strategies/bar-highlight-strategy.d.ts +0 -23
- package/renderers/bar/highlight-strategies/bar-series-highlight-strategy.d.ts +0 -21
- package/renderers/bar/highlight-strategies/public-api.d.ts +0 -3
- package/renderers/bar/linear-gauge-renderer-config.d.ts +0 -7
- package/renderers/bar/linear-gauge-thresholds-renderer.d.ts +0 -25
- package/renderers/bar/preprocessor-utils.d.ts +0 -4
- package/renderers/bar/public-api.d.ts +0 -8
- package/renderers/bar/stacked-preprocessor.d.ts +0 -5
- package/renderers/bar/types.d.ts +0 -13
- package/renderers/constants.d.ts +0 -12
- package/renderers/line/calculate-missing-data.d.ts +0 -10
- package/renderers/line/interaction-strategies/line-select-series-interaction-strategy.d.ts +0 -15
- package/renderers/line/interaction-strategies/public-api.d.ts +0 -1
- package/renderers/line/line-accessors.d.ts +0 -37
- package/renderers/line/line-renderer.d.ts +0 -46
- package/renderers/line/missing-data-line-renderer-config.d.ts +0 -8
- package/renderers/line/public-api.d.ts +0 -5
- package/renderers/marker-utils.d.ts +0 -21
- package/renderers/noop-renderer.d.ts +0 -19
- package/renderers/public-api.d.ts +0 -10
- package/renderers/radial/accessors/radial-accessors.d.ts +0 -22
- package/renderers/radial/gauge/donut-gauge-renderer-config.d.ts +0 -7
- package/renderers/radial/gauge/donut-gauge-rendering-util.d.ts +0 -6
- package/renderers/radial/gauge/donut-gauge-thresholds-renderer.d.ts +0 -24
- package/renderers/radial/pie-renderer.d.ts +0 -8
- package/renderers/radial/public-api.d.ts +0 -9
- package/renderers/radial/radial-grid-fn.d.ts +0 -2
- package/renderers/radial/radial-preprocessor.d.ts +0 -12
- package/renderers/radial/radial-renderer.d.ts +0 -33
- package/renderers/radial/radial-scales.d.ts +0 -5
- package/renderers/side-indicator-renderer.d.ts +0 -55
- package/renderers/types.d.ts +0 -99
- package/renderers/xy-renderer.d.ts +0 -15
- package/thresholds/public-api.d.ts +0 -4
- package/thresholds/thresholds-service.d.ts +0 -114
- package/thresholds/thresholds-summary-grid-config.d.ts +0 -7
- package/thresholds/thresholds-top-grid-config.d.ts +0 -7
- package/thresholds/types.d.ts +0 -21
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Arc, DefaultArcObject } from "d3-shape";
|
|
2
|
-
import { Subject } from "rxjs";
|
|
3
|
-
import { Renderer } from "../../core/common/renderer";
|
|
4
|
-
import { Scales } from "../../core/common/scales/types";
|
|
5
|
-
import { IDataSeries, IPosition, IRadialRendererConfig, IRendererEventPayload } from "../../core/common/types";
|
|
6
|
-
import { IRenderSeries } from "../types";
|
|
7
|
-
import { IRadialAccessors } from "./accessors/radial-accessors";
|
|
8
|
-
/**
|
|
9
|
-
* Default configuration for Radial Renderer
|
|
10
|
-
*/
|
|
11
|
-
export declare const DEFAULT_RADIAL_RENDERER_CONFIG: IRadialRendererConfig;
|
|
12
|
-
/**
|
|
13
|
-
* Radial renderer is a generic renderer that is able to draw pie and donut charts
|
|
14
|
-
*/
|
|
15
|
-
export declare class RadialRenderer extends Renderer<IRadialAccessors> {
|
|
16
|
-
config: IRadialRendererConfig;
|
|
17
|
-
protected segmentWidth?: number;
|
|
18
|
-
/**
|
|
19
|
-
* Creates an instance of RadialRenderer.
|
|
20
|
-
* @param {IRadialRendererConfig} [config]
|
|
21
|
-
* Renderer configuration object. Defaults to `DEFAULT_RADIAL_RENDERER_CONFIG` constant value.
|
|
22
|
-
*/
|
|
23
|
-
constructor(config?: IRadialRendererConfig);
|
|
24
|
-
/** See {@link Renderer#draw} */
|
|
25
|
-
draw(renderSeries: IRenderSeries<IRadialAccessors>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
26
|
-
/** See {@link Renderer#getDataPointPosition} */
|
|
27
|
-
getDataPointPosition(dataSeries: IDataSeries<IRadialAccessors>, index: number, scales: Scales): IPosition | undefined;
|
|
28
|
-
getInnerRadius(range: number[], index: number): number;
|
|
29
|
-
getOuterRadius(range: [number, number], index: number): number;
|
|
30
|
-
protected getArc(range: [number, number], generatedArc: Arc<any, DefaultArcObject>, index: number): Arc<any, DefaultArcObject>;
|
|
31
|
-
protected getSegmentWidth(renderSeries: IRenderSeries<IRadialAccessors>): number | undefined;
|
|
32
|
-
private emitDataPointHighlight;
|
|
33
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Subject } from "rxjs";
|
|
2
|
-
import { IRenderSeries } from "./types";
|
|
3
|
-
import { XYRenderer } from "./xy-renderer";
|
|
4
|
-
import { Scales } from "../core/common/scales/types";
|
|
5
|
-
import { DataAccessor, IDataAccessors, IDataSeries, ILasagnaLayer, IRendererConfig, IRendererEventPayload, ISeriesAccessors, SeriesAccessor } from "../core/common/types";
|
|
6
|
-
/** Interface for side indicator data accessors */
|
|
7
|
-
export interface ISideIndicatorDataAccessors extends IDataAccessors {
|
|
8
|
-
/** Accessor indicating whether the side indicator should be active */
|
|
9
|
-
active: DataAccessor;
|
|
10
|
-
}
|
|
11
|
-
/** Interface for side indicator series accessors */
|
|
12
|
-
export interface ISideIndicatorSeriesAccessors extends ISeriesAccessors {
|
|
13
|
-
/** Indicates the start value of the side indicator */
|
|
14
|
-
start: SeriesAccessor;
|
|
15
|
-
/** Indicates the end value of the side indicator */
|
|
16
|
-
end: SeriesAccessor;
|
|
17
|
-
/** Indicates the active color of the side indicator */
|
|
18
|
-
activeColor: SeriesAccessor;
|
|
19
|
-
/** Optional accessor indicating the inactive color of the side indicator. A grayscale filter is applied to the active color by default */
|
|
20
|
-
inactiveColor?: SeriesAccessor;
|
|
21
|
-
}
|
|
22
|
-
/** Interface for side indicator accessors */
|
|
23
|
-
export interface ISideIndicatorAccessors {
|
|
24
|
-
/** Accessors for the side indicator data */
|
|
25
|
-
data: ISideIndicatorDataAccessors;
|
|
26
|
-
/** Accessors for the side indicator series */
|
|
27
|
-
series: ISideIndicatorSeriesAccessors;
|
|
28
|
-
}
|
|
29
|
-
/** Standard definition for side indicator series and data accessors */
|
|
30
|
-
export declare class SideIndicatorAccessors implements ISideIndicatorAccessors {
|
|
31
|
-
data: ISideIndicatorDataAccessors;
|
|
32
|
-
series: ISideIndicatorSeriesAccessors;
|
|
33
|
-
constructor();
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Renderer for drawing threshold side indicators
|
|
37
|
-
*/
|
|
38
|
-
export declare class SideIndicatorRenderer extends XYRenderer<ISideIndicatorAccessors> {
|
|
39
|
-
/** @deprecated As of Nova v9, use RenderLayerName.unclippedData enum value instead. Removal: NUI-5753 */
|
|
40
|
-
static SIDE_INDICATORS_LAYER: string;
|
|
41
|
-
private DEFAULT_CONFIG;
|
|
42
|
-
/**
|
|
43
|
-
* Creates an instance of SideIndicatorRenderer.
|
|
44
|
-
* @param {IRendererConfig} [config={}] Renderer configuration object
|
|
45
|
-
*/
|
|
46
|
-
constructor(config?: IRendererConfig);
|
|
47
|
-
/** See {@link Renderer#draw} */
|
|
48
|
-
draw(renderSeries: IRenderSeries<ISideIndicatorAccessors>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
49
|
-
/** See {@link Renderer#getDataPointIndex} */
|
|
50
|
-
getDataPointIndex(series: IDataSeries<ISideIndicatorAccessors>, values: {
|
|
51
|
-
[p: string]: any;
|
|
52
|
-
}, scales: Scales): number;
|
|
53
|
-
/** See {@link Renderer#getRequiredLayers} */
|
|
54
|
-
getRequiredLayers(): ILasagnaLayer[];
|
|
55
|
-
}
|
package/renderers/types.d.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { CurveFactory } from "d3-shape";
|
|
2
|
-
import { Subject } from "rxjs";
|
|
3
|
-
import { IRectangleAccessors } from "./accessors/rectangle-accessors";
|
|
4
|
-
import { BarRenderer } from "./bar/bar-renderer";
|
|
5
|
-
import { ILineAccessors } from "./line/line-accessors";
|
|
6
|
-
import { LineRenderer } from "./line/line-renderer";
|
|
7
|
-
import { Renderer } from "../core/common/renderer";
|
|
8
|
-
import { Scales } from "../core/common/scales/types";
|
|
9
|
-
import { D3Selection, IAccessors, IDataSeries, IRenderContainers, IRendererConfig, IRendererEventPayload } from "../core/common/types";
|
|
10
|
-
export declare enum RenderState {
|
|
11
|
-
hidden = "hidden",
|
|
12
|
-
deemphasized = "deemphasized",
|
|
13
|
-
emphasized = "emphasized",
|
|
14
|
-
default = "default"
|
|
15
|
-
}
|
|
16
|
-
export declare enum RenderLayerName {
|
|
17
|
-
background = "background",
|
|
18
|
-
data = "data",
|
|
19
|
-
unclippedData = "unclipped-data",
|
|
20
|
-
foreground = "foreground"
|
|
21
|
-
}
|
|
22
|
-
/** The configuration interface for marker interaction */
|
|
23
|
-
export interface IMarkerInteractionConfig {
|
|
24
|
-
/** Enables mouse events on data point markers */
|
|
25
|
-
enabled: boolean;
|
|
26
|
-
/** Enables the pointer style mouse cursor when data point markers are hovered */
|
|
27
|
-
clickable?: boolean;
|
|
28
|
-
}
|
|
29
|
-
/** The configuration interface for the enhanced line caps */
|
|
30
|
-
export interface IEnhancedLineCapConfig {
|
|
31
|
-
/** Set the stroke color */
|
|
32
|
-
stroke?: string;
|
|
33
|
-
/** Set the stroke width in pixels */
|
|
34
|
-
strokeWidth?: number;
|
|
35
|
-
/** Set the fill color */
|
|
36
|
-
fill?: string;
|
|
37
|
-
/** Set the radius in pixels */
|
|
38
|
-
radius?: number;
|
|
39
|
-
}
|
|
40
|
-
/** The configuration interface for the line renderer */
|
|
41
|
-
export interface ILineRendererConfig extends IRendererConfig {
|
|
42
|
-
/** Set the width of the line in pixels */
|
|
43
|
-
strokeWidth?: number;
|
|
44
|
-
/** Set the stroke-dasharray of the line, e.g. "1,1", "2,2", etc. */
|
|
45
|
-
strokeStyle?: string;
|
|
46
|
-
/** Set the stroke-linecap of the line, e.g. "round" */
|
|
47
|
-
strokeLinecap?: string;
|
|
48
|
-
/** Set the d3 curve algorithm to be used for drawing the lines */
|
|
49
|
-
curveType?: CurveFactory;
|
|
50
|
-
/** Set the strategy for determining the behavior of the chart resulting from user interaction, e.g. LineSelectSeriesInteractionStrategy */
|
|
51
|
-
interactionStrategy?: IHighlightStrategy<ILineAccessors, LineRenderer>;
|
|
52
|
-
/** Configure the interaction behavior for markers */
|
|
53
|
-
markerInteraction?: IMarkerInteractionConfig;
|
|
54
|
-
/** Set whether enhanced line caps should be displayed */
|
|
55
|
-
useEnhancedLineCaps?: boolean;
|
|
56
|
-
/** Optionally configure enhanced line caps. Prerequisite: 'useEnhancedLineCaps' is set to true */
|
|
57
|
-
enhancedLineCap?: IEnhancedLineCapConfig;
|
|
58
|
-
}
|
|
59
|
-
/** The configuration interface for the bar renderer */
|
|
60
|
-
export interface IBarRendererConfig extends IRendererConfig {
|
|
61
|
-
/** Set the padding on both sides of each bar */
|
|
62
|
-
padding?: number;
|
|
63
|
-
/** Set the class name to apply custom styles to the bars */
|
|
64
|
-
barClass?: string;
|
|
65
|
-
/** Set the strategy for determining the behavior of the chart resulting from user interaction, e.g. BarHighlightStrategy */
|
|
66
|
-
highlightStrategy?: IHighlightStrategy<IRectangleAccessors, BarRenderer>;
|
|
67
|
-
/** Set the mouse cursor style to use when hovering over individual bars */
|
|
68
|
-
cursor?: string;
|
|
69
|
-
/** Enables pointer events on the bars */
|
|
70
|
-
pointerEvents?: boolean;
|
|
71
|
-
/** Set the stroke width in pixels */
|
|
72
|
-
strokeWidth?: number;
|
|
73
|
-
/** Enable the minimum bar thickness (BarRenderer.MIN_BAR_THICKNESS) */
|
|
74
|
-
enableMinBarThickness?: boolean;
|
|
75
|
-
}
|
|
76
|
-
/** The configuration interface for the area renderer */
|
|
77
|
-
export interface IAreaRendererConfig extends IRendererConfig {
|
|
78
|
-
/** Set the d3 curve algorithm to be used for drawing the area boundaries */
|
|
79
|
-
curveType?: CurveFactory;
|
|
80
|
-
/** Set the class name to apply custom styles to the areas */
|
|
81
|
-
areaClass?: string;
|
|
82
|
-
/** Enables the pointer cursor when data point markers are hovered */
|
|
83
|
-
markerInteraction?: IMarkerInteractionConfig;
|
|
84
|
-
/** The width of the area path's stroke in pixels. Default is 1. */
|
|
85
|
-
strokeWidth?: number;
|
|
86
|
-
}
|
|
87
|
-
export interface IRenderSeries<TA extends IAccessors> {
|
|
88
|
-
dataSeries: IDataSeries<TA>;
|
|
89
|
-
containers: IRenderContainers;
|
|
90
|
-
scales: Scales;
|
|
91
|
-
parentContainer?: D3Selection<SVGElement>;
|
|
92
|
-
}
|
|
93
|
-
export interface IHighlightStrategy<TA extends IAccessors<any>, T = Renderer<TA>> {
|
|
94
|
-
getDataPointIndex(renderer: T, series: IDataSeries<TA>, values: {
|
|
95
|
-
[p: string]: any;
|
|
96
|
-
}, scales: Scales): number;
|
|
97
|
-
highlightDataPoint(renderer: T, renderSeries: IRenderSeries<TA>, dataPointIndex: number, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
98
|
-
draw(renderer: T, renderSeries: IRenderSeries<TA>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
99
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Subject } from "rxjs";
|
|
2
|
-
import { IRenderSeries } from "./types";
|
|
3
|
-
import { Renderer } from "../core/common/renderer";
|
|
4
|
-
import { Scales } from "../core/common/scales/types";
|
|
5
|
-
import { IAccessors, IDataSeries, IPosition, IRendererEventPayload } from "../core/common/types";
|
|
6
|
-
export declare class XYRenderer<TA extends IAccessors> extends Renderer<TA> {
|
|
7
|
-
/** See {@link Renderer#draw} */
|
|
8
|
-
draw(renderSeries: IRenderSeries<TA>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
9
|
-
/** See {@link Renderer#getDataPointPosition} */
|
|
10
|
-
getDataPointPosition(dataSeries: IDataSeries<TA>, index: number, scales: Scales): IPosition | undefined;
|
|
11
|
-
/** See {@link Renderer#getDataPointIndex} */
|
|
12
|
-
getDataPointIndex(series: IDataSeries<TA>, values: {
|
|
13
|
-
[p: string]: any;
|
|
14
|
-
}, scales: Scales): number;
|
|
15
|
-
}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { LoggerService } from "@nova-ui/bits";
|
|
2
|
-
import { ISimpleThresholdZone, ZoneBoundary } from "./types";
|
|
3
|
-
import { Scales } from "../core/common/scales/types";
|
|
4
|
-
import { DataAccessor, IChartAssistSeries, IDataSeries, IPosition, IRendererConfig, IValueProvider } from "../core/common/types";
|
|
5
|
-
import { IAreaAccessors } from "../renderers/area/area-accessors";
|
|
6
|
-
import { IStatusAccessors } from "../renderers/bar/accessors/status-accessors";
|
|
7
|
-
import { ILineAccessors } from "../renderers/line/line-accessors";
|
|
8
|
-
import { ISideIndicatorAccessors } from "../renderers/side-indicator-renderer";
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
/**
|
|
11
|
-
* This service provides functionality that facilitates the creation of thresholds related visual element on charts.
|
|
12
|
-
*/
|
|
13
|
-
export declare class ThresholdsService {
|
|
14
|
-
private loggerService;
|
|
15
|
-
static SERIES_ID_SUFFIX: string;
|
|
16
|
-
constructor(loggerService: LoggerService);
|
|
17
|
-
/**
|
|
18
|
-
* 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
|
|
19
|
-
* the threshold "statuses" assigned to each data point enables us to access the threshold information not only in other methods for threshold
|
|
20
|
-
* calculation, but also in other places, like legend or tooltips.
|
|
21
|
-
*
|
|
22
|
-
* @param dataSeries source data series that will be enhanced with threshold metadata
|
|
23
|
-
* @param zones zones defined as data series with IAreaAccessors
|
|
24
|
-
*/
|
|
25
|
-
injectThresholdsData(dataSeries: IDataSeries<ILineAccessors>, zones: IDataSeries<IAreaAccessors>[]): void;
|
|
26
|
-
/**
|
|
27
|
-
* This method creates a background series for TimeInterval or continuous (currently only works with time) scale.
|
|
28
|
-
* If the series is continuous it detects intersection of source line data with given threshold zones and generates start / end for status periods.
|
|
29
|
-
* Otherwise it will use the start and the end of the band.
|
|
30
|
-
*
|
|
31
|
-
* The default value of the rendererConfig parameter is {@link THRESHOLDS_MAIN_CHART_RENDERER_CONFIG}. For a summary chart, usually a smaller status
|
|
32
|
-
* chart positioned below a main chart, use {@link THRESHOLDS_SUMMARY_RENDERER_CONFIG}.
|
|
33
|
-
*
|
|
34
|
-
* @param sourceSeries The data series from which to derive a background visualization
|
|
35
|
-
* @param zones Zones defined as data series with IAreaAccessors
|
|
36
|
-
* @param scales The scales to be used for the background visualization
|
|
37
|
-
* @param colorProvider A value provider for the colors to be used for each status
|
|
38
|
-
* @param thicknessMap Map of status to number specifying a custom height per status for the background visualization.
|
|
39
|
-
* If a status is not specified in the map, the default thickness is the full height of the rendering area.
|
|
40
|
-
* @param rendererConfig The renderer's configuration
|
|
41
|
-
*/
|
|
42
|
-
getBackgrounds(sourceSeries: IDataSeries<ILineAccessors>, zones: IDataSeries<IAreaAccessors>[], scales: Scales, colorProvider: IValueProvider<string>, thicknessMap?: Record<string, number>, rendererConfig?: IRendererConfig): IChartAssistSeries<IStatusAccessors>;
|
|
43
|
-
/**
|
|
44
|
-
* Calculates background data for continuous scale based on intersections between the source data and zone definitions.
|
|
45
|
-
*
|
|
46
|
-
* @param sourceSeries source data series from which to derive background data
|
|
47
|
-
* @param zones zones defined as data series with IAreaAccessors
|
|
48
|
-
*/
|
|
49
|
-
private getBackgroundsDataForContinuousScale;
|
|
50
|
-
/**
|
|
51
|
-
* Calculate all "interesting" points along the data series that will be important to calculate the threshold status changes
|
|
52
|
-
*
|
|
53
|
-
* @param sourceSeries source data series from which to derive the break points
|
|
54
|
-
* @param zones zones defined as data series with IAreaAccessors
|
|
55
|
-
*/
|
|
56
|
-
private getBreakPoints;
|
|
57
|
-
/**
|
|
58
|
-
* Generates threshold zone series from simplified zone definition. Simplified definition provides only two numbers to define the zone interval.
|
|
59
|
-
* Creating these series manually is also possible for dynamic threshold limits.
|
|
60
|
-
*
|
|
61
|
-
* @param sourceSeries source data series from which to derive the zones
|
|
62
|
-
* @param simpleZones a collection of zones that are each defined by a start value and/or an end value. (A missing
|
|
63
|
-
start or end value indicates an infinite zone.)
|
|
64
|
-
* @param colorProvider A value provider for the colors to be used for each status
|
|
65
|
-
*/
|
|
66
|
-
getThresholdZones(sourceSeries: IDataSeries<ILineAccessors>, simpleZones: ISimpleThresholdZone[], colorProvider: IValueProvider<string>): IDataSeries<IAreaAccessors>[];
|
|
67
|
-
/**
|
|
68
|
-
* Creates data series representing threshold lines on the chart. Solves collision between zones, where multiple zones are using the same limit value.
|
|
69
|
-
*
|
|
70
|
-
* @param zones Zones defined as data series with IAreaAccessors
|
|
71
|
-
*/
|
|
72
|
-
getThresholdLines(zones: IDataSeries<IAreaAccessors>[]): IChartAssistSeries<ILineAccessors>[];
|
|
73
|
-
/**
|
|
74
|
-
* Creates a IChartAssistSeries that represents a threshold zone limit defined by given valueAccessor
|
|
75
|
-
*
|
|
76
|
-
* @param zone A zone defined as a data series with IAreaAccessors
|
|
77
|
-
* @param valueAccessor Accessor for the threshold limit
|
|
78
|
-
* @param zoneBoundary The zone boundary represented by the line. Default is ZoneBoundary.Start.
|
|
79
|
-
*/
|
|
80
|
-
getThresholdLine(zone: IDataSeries<IAreaAccessors>, valueAccessor: DataAccessor, zoneBoundary?: ZoneBoundary): IChartAssistSeries<ILineAccessors>;
|
|
81
|
-
/**
|
|
82
|
-
* Calculates the point where the data series line will cross a threshold line using the two closest points for each
|
|
83
|
-
*
|
|
84
|
-
* @param {IPosition} dataFrom Data starting point
|
|
85
|
-
* @param {IPosition} dataTo Data ending point
|
|
86
|
-
* @param {IPosition} thresholdFrom Threshold starting point
|
|
87
|
-
* @param {IPosition} thresholdTo Threshold ending point
|
|
88
|
-
* @returns {IPosition} the position of the cross point or `null` if lines don't cross
|
|
89
|
-
*/
|
|
90
|
-
getCrossPoint(dataFrom: IPosition, dataTo: IPosition, thresholdFrom: IPosition, thresholdTo: IPosition): IPosition | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* Find the zone that is relevant for current input data point defined by x, y coordinates.
|
|
93
|
-
* Keep increasing the index while the next x value of threshold zone is still less than input x
|
|
94
|
-
*
|
|
95
|
-
* @param zones Zones defined as data series with IAreaAccessors
|
|
96
|
-
* @param zoneIndexes provided indexes keep the last used value for searching for the given x coordinate, so it is expected that provided data points
|
|
97
|
-
* are ordered by x in ascending order.
|
|
98
|
-
* @param x The x value of the zone
|
|
99
|
-
* @param y The y value of the zone
|
|
100
|
-
*/
|
|
101
|
-
private getZoneByXY;
|
|
102
|
-
private moveZoneIndex;
|
|
103
|
-
getCrossPointWithY(dataFrom: IPosition, dataTo: IPosition, y: number): IPosition | undefined;
|
|
104
|
-
/**
|
|
105
|
-
* Creates side indicator data series for given threshold zones
|
|
106
|
-
*
|
|
107
|
-
* @param zones Zones defined as data series with IAreaAccessors
|
|
108
|
-
* @param scales The scales to be used for the side indicators
|
|
109
|
-
* @param rendererConfig Configuration for the renderer. Default is the exported constant 'THRESHOLDS_MAIN_CHART_RENDERER_CONFIG'
|
|
110
|
-
*/
|
|
111
|
-
getSideIndicators(zones: IDataSeries<IAreaAccessors>[], scales: Scales, rendererConfig?: IRendererConfig): IChartAssistSeries<ISideIndicatorAccessors>[];
|
|
112
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ThresholdsService, never>;
|
|
113
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ThresholdsService>;
|
|
114
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { XYGridConfig } from "../core/grid/config/xy-grid-config";
|
|
2
|
-
/**
|
|
3
|
-
* Applies grid configuration that is used for main chart (with a threshold summary section below it)
|
|
4
|
-
*
|
|
5
|
-
* @param c
|
|
6
|
-
*/
|
|
7
|
-
export declare function thresholdsTopGridConfig(c?: XYGridConfig): XYGridConfig;
|
package/thresholds/types.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Numeric } from "d3-array";
|
|
2
|
-
/**
|
|
3
|
-
* Used for simplified threshold zone definition. It is expected the <code>start</code> to be <code>< end</code>.
|
|
4
|
-
*/
|
|
5
|
-
export interface ISimpleThresholdZone {
|
|
6
|
-
status: string;
|
|
7
|
-
start?: number;
|
|
8
|
-
end?: number;
|
|
9
|
-
}
|
|
10
|
-
export interface ZoneCross {
|
|
11
|
-
status: string;
|
|
12
|
-
start?: Numeric;
|
|
13
|
-
end?: Numeric;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Used for specifying the start or end boundary of a zone
|
|
17
|
-
*/
|
|
18
|
-
export declare enum ZoneBoundary {
|
|
19
|
-
Start = "start",
|
|
20
|
-
End = "end"
|
|
21
|
-
}
|