@nova-ui/charts 20.0.0 → 20.0.3
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
package/index.d.ts
CHANGED
|
@@ -1,5 +1,4106 @@
|
|
|
1
|
+
import * as i14 from '@angular/cdk/overlay';
|
|
2
|
+
import { ConnectedPosition, Overlay, OverlayPositionBuilder, ScrollStrategyOptions } from '@angular/cdk/overlay';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { OnInit, OnDestroy, ElementRef, TemplateRef, OnChanges, SimpleChanges, QueryList, ChangeDetectorRef, InjectionToken, EventEmitter, AfterViewInit, AfterContentInit, NgZone } from '@angular/core';
|
|
5
|
+
import * as rxjs from 'rxjs';
|
|
6
|
+
import { Subject, Observable, BehaviorSubject } from 'rxjs';
|
|
7
|
+
import { ScaleLinear } from 'd3-scale';
|
|
8
|
+
import { Selection } from 'd3-selection';
|
|
9
|
+
import { ValueMap } from 'd3-selection-multi';
|
|
10
|
+
import { AxisScale, Axis } from 'd3-axis';
|
|
11
|
+
import * as i13 from '@nova-ui/bits';
|
|
12
|
+
import { UnitOption, PopoverComponent, LoggerService } from '@nova-ui/bits';
|
|
13
|
+
import { CurveFactory, Arc, DefaultArcObject } from 'd3-shape';
|
|
14
|
+
import { BaseType, DefaultArcObject as DefaultArcObject$1 } from 'd3';
|
|
15
|
+
import moment, { Duration } from 'moment/moment';
|
|
16
|
+
import { Numeric } from 'd3-array';
|
|
17
|
+
|
|
18
|
+
/** @ignore */
|
|
19
|
+
declare class ChartTooltipDirective implements OnInit, OnDestroy {
|
|
20
|
+
private overlay;
|
|
21
|
+
private overlayPositionBuilder;
|
|
22
|
+
private scrollStrategyOptions;
|
|
23
|
+
elementRef: ElementRef<HTMLElement>;
|
|
24
|
+
template: TemplateRef<any>;
|
|
25
|
+
openRemoteControl: Subject<void>;
|
|
26
|
+
closeRemoteControl: Subject<void>;
|
|
27
|
+
positions: ConnectedPosition[];
|
|
28
|
+
private overlayRef;
|
|
29
|
+
private openSubscription;
|
|
30
|
+
private closeSubscription;
|
|
31
|
+
private positionStrategy;
|
|
32
|
+
constructor(overlay: Overlay, overlayPositionBuilder: OverlayPositionBuilder, scrollStrategyOptions: ScrollStrategyOptions, elementRef: ElementRef<HTMLElement>);
|
|
33
|
+
ngOnInit(): void;
|
|
34
|
+
show(): void;
|
|
35
|
+
hide(): void;
|
|
36
|
+
ngOnDestroy(): void;
|
|
37
|
+
getOverlayElement(): HTMLElement;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartTooltipDirective, never>;
|
|
39
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChartTooltipDirective, "[nuiChartTooltip]", never, { "template": { "alias": "template"; "required": false; }; "openRemoteControl": { "alias": "openRemoteControl"; "required": false; }; "closeRemoteControl": { "alias": "closeRemoteControl"; "required": false; }; "positions": { "alias": "positions"; "required": false; }; }, {}, never, never, false, never>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class ChartTooltipComponent {
|
|
43
|
+
template: TemplateRef<any>;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartTooltipComponent, never>;
|
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartTooltipComponent, "nui-chart-tooltip", never, { "template": { "alias": "template"; "required": false; }; }, {}, never, never, false, never>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare abstract class ChartPlugin implements IChartPlugin {
|
|
49
|
+
constructor();
|
|
50
|
+
chart: IChart;
|
|
51
|
+
initialize(): void;
|
|
52
|
+
update(): void;
|
|
53
|
+
updateDimensions(): void;
|
|
54
|
+
destroy(): void;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Domain for series with empty or null data */
|
|
58
|
+
declare const EMPTY_CONTINUOUS_DOMAIN: number[];
|
|
59
|
+
/** A reasonable non-data-driven domain for charts */
|
|
60
|
+
declare const NORMALIZED_DOMAIN: number[];
|
|
61
|
+
/** Signature for domain calculator */
|
|
62
|
+
type DomainCalculator = (chartSeriesSet: IChartSeries<IAccessors>[], scaleId: string, scale: IScale<any>) => any[];
|
|
63
|
+
/** Signature for a specific domain calculator that rounds domain to the closes tick */
|
|
64
|
+
interface IDomainWithTicksCalculator extends DomainCalculator {
|
|
65
|
+
domainWithTicks?: true;
|
|
66
|
+
}
|
|
67
|
+
/** Type guard for the domain calculator with ticks */
|
|
68
|
+
declare function isDomainWithTicksCalculator(obj: any): obj is IDomainWithTicksCalculator;
|
|
69
|
+
/** Interface for scale formatters */
|
|
70
|
+
interface IFormatters<T> {
|
|
71
|
+
/** Formatter for tick labels */
|
|
72
|
+
tick?: Formatter<T>;
|
|
73
|
+
/** Additional formatters */
|
|
74
|
+
[p: string]: Formatter<T> | undefined;
|
|
75
|
+
}
|
|
76
|
+
/** Signature for label formatters */
|
|
77
|
+
type Formatter<T> = (value: T) => string;
|
|
78
|
+
/** Dictionary of scale collections in index and array form */
|
|
79
|
+
interface ScalesIndex {
|
|
80
|
+
[key: string]: {
|
|
81
|
+
/** Scale collection as an index */
|
|
82
|
+
index: {
|
|
83
|
+
[scaleId: string]: IScale<any>;
|
|
84
|
+
};
|
|
85
|
+
/** Scale collection as an array */
|
|
86
|
+
list: IScale<any>[];
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/** Dictionary of scales */
|
|
90
|
+
type Scales = Record<string, IScale<any>>;
|
|
91
|
+
interface IXYScales extends Scales {
|
|
92
|
+
x: IScale<any>;
|
|
93
|
+
y: IScale<any>;
|
|
94
|
+
}
|
|
95
|
+
interface IRadialScales extends Scales {
|
|
96
|
+
r: IScale<number>;
|
|
97
|
+
}
|
|
98
|
+
/** Interface for a scale */
|
|
99
|
+
interface IScale<T> {
|
|
100
|
+
/** The scale identifier */
|
|
101
|
+
readonly id: string;
|
|
102
|
+
readonly d3Scale: AxisScale<T>;
|
|
103
|
+
fixDomainValues?: T[];
|
|
104
|
+
/** If this flag is enabled, the domain of this scale is not recalculated */
|
|
105
|
+
isDomainFixed?: boolean;
|
|
106
|
+
/** Method used to calculate the scale's domain */
|
|
107
|
+
domainCalculator?: DomainCalculator;
|
|
108
|
+
/** The scales formatters */
|
|
109
|
+
formatters: IFormatters<T>;
|
|
110
|
+
/** If this flag is enabled, the domain has been recalculated with ticks in mind */
|
|
111
|
+
__domainCalculatedWithTicks?: boolean;
|
|
112
|
+
scaleUnits?: UnitOption;
|
|
113
|
+
/** If this flag is enabled, the label generated by InteractionLabelPlugin will be shown only on a chart that is beeing hovered */
|
|
114
|
+
isTimeseriesScale?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Sets fix domain to the first and last value and assigns values to fixDomainValues property
|
|
117
|
+
*/
|
|
118
|
+
setFixDomainValues?(values: T[]): void;
|
|
119
|
+
/**
|
|
120
|
+
* Determines if the scale's domain is continuous
|
|
121
|
+
*
|
|
122
|
+
* @returns {boolean} true if the scale's domain is continuous (numeric), false otherwise
|
|
123
|
+
*/
|
|
124
|
+
isContinuous(): boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Determines if the scale's domain is valid
|
|
127
|
+
*
|
|
128
|
+
* @returns {boolean} true if the scale's domain is valid, false otherwise
|
|
129
|
+
*/
|
|
130
|
+
isDomainValid(): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Converts a value to its corresponding coordinate
|
|
133
|
+
*
|
|
134
|
+
* @param {T} value The value to be converted
|
|
135
|
+
* @returns {number} The coordinate corresponding to the specified value
|
|
136
|
+
*/
|
|
137
|
+
convert(value: T): number;
|
|
138
|
+
/**
|
|
139
|
+
* Converts a coordinate to its corresponding value
|
|
140
|
+
*
|
|
141
|
+
* @param {number} coordinate The coordinate to be converted
|
|
142
|
+
* @returns {T} The value corresponding to the specified coordinate
|
|
143
|
+
*/
|
|
144
|
+
invert(coordinate: number): T | undefined;
|
|
145
|
+
/**
|
|
146
|
+
* Gets the scale's range
|
|
147
|
+
*
|
|
148
|
+
* @returns {[number, number]} The scale's range
|
|
149
|
+
*/
|
|
150
|
+
range(): [number, number];
|
|
151
|
+
/**
|
|
152
|
+
* Sets the scale's range
|
|
153
|
+
*
|
|
154
|
+
* @param {[number, number]} range The scale's new range
|
|
155
|
+
*/
|
|
156
|
+
range(range: [number, number]): this;
|
|
157
|
+
/**
|
|
158
|
+
* Gets the scale's domain
|
|
159
|
+
*
|
|
160
|
+
* @returns {T[]} The scale's domain
|
|
161
|
+
*/
|
|
162
|
+
domain(): T[];
|
|
163
|
+
/**
|
|
164
|
+
* Sets the scale's domain
|
|
165
|
+
*
|
|
166
|
+
* @param {T[]} domain The scale's new domain
|
|
167
|
+
*/
|
|
168
|
+
domain(domain: T[]): this;
|
|
169
|
+
/**
|
|
170
|
+
* Shorthand method for setting the domain and isDomainFixed at once
|
|
171
|
+
*
|
|
172
|
+
* @param {T[]} domain The scale's fixed domain
|
|
173
|
+
*/
|
|
174
|
+
fixDomain(domain: T[]): void;
|
|
175
|
+
/**
|
|
176
|
+
* Reverse the scale orientation by toggling the reversed flag
|
|
177
|
+
*/
|
|
178
|
+
reverse(): this;
|
|
179
|
+
/**
|
|
180
|
+
* Getter for the reversed flag (see #reverse)
|
|
181
|
+
*/
|
|
182
|
+
reversed(): boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Setter for the reversed flag (see #reverse)
|
|
185
|
+
*
|
|
186
|
+
* @param reversed
|
|
187
|
+
*/
|
|
188
|
+
reversed(reversed: boolean): this;
|
|
189
|
+
}
|
|
190
|
+
interface IBandScale<T> extends IScale<T> {
|
|
191
|
+
bandwidth(): number;
|
|
192
|
+
}
|
|
193
|
+
declare function isBandScale(scale: any): scale is IBandScale<any>;
|
|
194
|
+
interface IHasInnerScale<T> extends IScale<T> {
|
|
195
|
+
innerScale: IScale<any>;
|
|
196
|
+
}
|
|
197
|
+
declare function hasInnerScale(scale: any): scale is IHasInnerScale<any>;
|
|
198
|
+
|
|
1
199
|
/**
|
|
2
|
-
*
|
|
200
|
+
* @ignore
|
|
201
|
+
*
|
|
202
|
+
* Manages data and their domains
|
|
3
203
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
204
|
+
declare class DataManager {
|
|
205
|
+
private chart?;
|
|
206
|
+
private _chartSeriesSet;
|
|
207
|
+
private dataIndex;
|
|
208
|
+
private _scalesIndexByKey;
|
|
209
|
+
private _scalesIndexById;
|
|
210
|
+
get chartSeriesSet(): IChartSeries<IAccessors>[];
|
|
211
|
+
get scalesIndexByKey(): ScalesIndex;
|
|
212
|
+
get scalesIndexById(): {
|
|
213
|
+
[scaleId: string]: IScale<any>;
|
|
214
|
+
};
|
|
215
|
+
constructor(chart?: IChart | undefined);
|
|
216
|
+
update(seriesSet: IChartSeries<IAccessors>[]): void;
|
|
217
|
+
getChartSeries(seriesId: string): IChartSeries<IAccessors>;
|
|
218
|
+
private updateScaleDomain;
|
|
219
|
+
private buildScalesIndex;
|
|
220
|
+
updateScaleDomains(): void;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
declare class EventBus<T> {
|
|
224
|
+
private streams;
|
|
225
|
+
getStream(streamId: string): Subject<T>;
|
|
226
|
+
destroy(): void;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/** @ignore */
|
|
230
|
+
declare class Lasagna {
|
|
231
|
+
private readonly clipPath;
|
|
232
|
+
static CONTAINER_CLASS: string;
|
|
233
|
+
static LAYER_CLASS: string;
|
|
234
|
+
layers: ILasagnaLayer[];
|
|
235
|
+
private readonly container;
|
|
236
|
+
constructor(target: D3Selection<SVGSVGElement>, clipPath: string);
|
|
237
|
+
addLayer(layer: ILasagnaLayer): D3Selection;
|
|
238
|
+
removeLayer(layerName: string): void;
|
|
239
|
+
getLayerContainer(name: string): D3Selection;
|
|
240
|
+
getContainer(): D3Selection<SVGGElement>;
|
|
241
|
+
private update;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* @ignore
|
|
246
|
+
*
|
|
247
|
+
* Manages and executes drawing and data point highlighting for each data series renderer and handles the setting of series display states
|
|
248
|
+
*/
|
|
249
|
+
declare class RenderEngine {
|
|
250
|
+
private lasagna;
|
|
251
|
+
private dataManager;
|
|
252
|
+
/** Subject for emitting events to the outside world about data points closest to an interaction on the chart */
|
|
253
|
+
interactionDataPointsSubject: Subject<IInteractionDataPointsEvent>;
|
|
254
|
+
/** Subject passed to the renderer for triggering events regarding a data point */
|
|
255
|
+
rendererSubject: Subject<IRendererEventPayload<any>>;
|
|
256
|
+
private highlightDataPointSubscription;
|
|
257
|
+
private highlightedDataPoints;
|
|
258
|
+
private renderLayers;
|
|
259
|
+
private layerIndex;
|
|
260
|
+
constructor(lasagna: Lasagna, dataManager: DataManager);
|
|
261
|
+
/**
|
|
262
|
+
* Invokes the draw method on each of the series renderers
|
|
263
|
+
*/
|
|
264
|
+
update(): void;
|
|
265
|
+
/**
|
|
266
|
+
* Updates the lasagna layers and series containers based on the current series set
|
|
267
|
+
*/
|
|
268
|
+
updateSeriesContainers(): void;
|
|
269
|
+
/**
|
|
270
|
+
* Emits the HIGHLIGHT_DATA_POINT_EVENT if the highlighted index changes for a particular series.
|
|
271
|
+
* Emits an event with information about all of the highlighted data points if the highlighted index changes for any series.
|
|
272
|
+
*
|
|
273
|
+
* @param {IHighlightXYPayload} highlightedValues The highlighted values for each scale
|
|
274
|
+
*/
|
|
275
|
+
emitInteractionDataPoints(payload: IInteractionValuesPayload): void;
|
|
276
|
+
/**
|
|
277
|
+
* Invokes the renderer highlightDataPoint method for the specified series
|
|
278
|
+
*
|
|
279
|
+
* @param {string} seriesId The series on which to highlight a data point
|
|
280
|
+
* @param {number} index The data point index to highlight
|
|
281
|
+
*/
|
|
282
|
+
highlightDataPoint(seriesId: string, index: number): void;
|
|
283
|
+
/**
|
|
284
|
+
* Sets attributes specified in each state data object to the appropriate the series containers.
|
|
285
|
+
* Invokes a renderer's setSeriesState method when the state of its series container has been updated.
|
|
286
|
+
*
|
|
287
|
+
* @param {IRenderStateData[]} stateDataSet A collection of series states
|
|
288
|
+
*/
|
|
289
|
+
setSeriesStates(stateDataSet: IRenderStateData[]): void;
|
|
290
|
+
destroy(): void;
|
|
291
|
+
private buildLayerIndex;
|
|
292
|
+
private removeUnusedLayers;
|
|
293
|
+
private addNeededLayers;
|
|
294
|
+
private updateLayerContents;
|
|
295
|
+
private getSeriesChildContainers;
|
|
296
|
+
private getChildContainerId;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
interface IStartEndRangeAccessors extends IDataAccessors {
|
|
300
|
+
start: DataAccessor;
|
|
301
|
+
end: DataAccessor;
|
|
302
|
+
}
|
|
303
|
+
interface IValueThicknessAccessors extends IDataAccessors {
|
|
304
|
+
value: DataAccessor;
|
|
305
|
+
thickness: DataAccessor;
|
|
306
|
+
}
|
|
307
|
+
interface IRectangleDataAccessors extends IDataAccessors {
|
|
308
|
+
startX?: DataAccessor;
|
|
309
|
+
endX?: DataAccessor;
|
|
310
|
+
thicknessX?: DataAccessor;
|
|
311
|
+
startY?: DataAccessor;
|
|
312
|
+
endY?: DataAccessor;
|
|
313
|
+
thicknessY?: DataAccessor;
|
|
314
|
+
}
|
|
315
|
+
interface IRectangleSeriesAccessors extends ISeriesAccessors {
|
|
316
|
+
color?: SeriesAccessor;
|
|
317
|
+
marker?: SeriesAccessor;
|
|
318
|
+
}
|
|
319
|
+
interface IRectangleAccessors extends IAccessors {
|
|
320
|
+
data: IRectangleDataAccessors;
|
|
321
|
+
series: IRectangleSeriesAccessors;
|
|
322
|
+
}
|
|
323
|
+
declare class RectangleAccessors implements IRectangleAccessors {
|
|
324
|
+
data: IRectangleDataAccessors;
|
|
325
|
+
series: IRectangleSeriesAccessors;
|
|
326
|
+
constructor();
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
declare class XYRenderer<TA extends IAccessors> extends Renderer<TA> {
|
|
330
|
+
/** See {@link Renderer#draw} */
|
|
331
|
+
draw(renderSeries: IRenderSeries<TA>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
332
|
+
/** See {@link Renderer#getDataPointPosition} */
|
|
333
|
+
getDataPointPosition(dataSeries: IDataSeries<TA>, index: number, scales: Scales): IPosition | undefined;
|
|
334
|
+
/** See {@link Renderer#getDataPointIndex} */
|
|
335
|
+
getDataPointIndex(series: IDataSeries<TA>, values: {
|
|
336
|
+
[p: string]: any;
|
|
337
|
+
}, scales: Scales): number;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Renderer that is able to draw bar chart
|
|
342
|
+
*/
|
|
343
|
+
declare class BarRenderer extends XYRenderer<IRectangleAccessors> {
|
|
344
|
+
config: IBarRendererConfig;
|
|
345
|
+
/**
|
|
346
|
+
* Creates an instance of BarRenderer.
|
|
347
|
+
* @param {IBarRendererConfig} [config] Renderer configuration object
|
|
348
|
+
*/
|
|
349
|
+
constructor(config?: IBarRendererConfig);
|
|
350
|
+
static THICK: number;
|
|
351
|
+
static THIN: number;
|
|
352
|
+
static MIN_BAR_SIZE_FOR_ICON: number;
|
|
353
|
+
static MIN_BAR_THICKNESS: number;
|
|
354
|
+
static readonly BAR_RECT_CLASS = "bar";
|
|
355
|
+
DEFAULT_CONFIG: IBarRendererConfig;
|
|
356
|
+
readonly barContainerClass = "bar-container";
|
|
357
|
+
/** See {@link Renderer#draw} */
|
|
358
|
+
draw(renderSeries: IRenderSeries<IRectangleAccessors>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
359
|
+
/** See {@link Renderer#getDataPointIndex} */
|
|
360
|
+
getDataPointIndex(series: IDataSeries<IRectangleAccessors>, values: {
|
|
361
|
+
[p: string]: any;
|
|
362
|
+
}, scales: Scales): number;
|
|
363
|
+
/** See {@link Renderer#highlightDataPoint} */
|
|
364
|
+
highlightDataPoint(renderSeries: IRenderSeries<IRectangleAccessors>, dataPointIndex: number, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
365
|
+
/** See {@link Renderer#getDataPointPosition} */
|
|
366
|
+
getDataPointPosition(dataSeries: IDataSeries<IRectangleAccessors>, index: number, scales: Scales): IPosition;
|
|
367
|
+
getDataPoint(renderSeries: IRenderSeries<IRectangleAccessors>, data: any, i: number): IDataPoint;
|
|
368
|
+
filterDataByDomain(data: any[]): any[];
|
|
369
|
+
getDomain(data: any[], dataSeries: IDataSeries<IRectangleAccessors>, scaleKey: string, scale: IScale<any>): any[];
|
|
370
|
+
protected emitBarClick(renderSeries: IRenderSeries<IRectangleAccessors>, data: any, i: number, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
371
|
+
/**
|
|
372
|
+
* Returns function to generate attributes to draw bar from dataSeries that typically comes from preprocessor with help of accessors that
|
|
373
|
+
* are aware of how to access renderParameters to draw individual bars
|
|
374
|
+
* @param dataSeries Series to draw
|
|
375
|
+
* @param scales Scales used to draw bars
|
|
376
|
+
* Except of bars this is also used for highlights (which may have a bit different values)
|
|
377
|
+
*/
|
|
378
|
+
protected getAttrsGenerator(dataSeries: IDataSeries<IRectangleAccessors>, scales: Scales): (d: any, i: number) => IPosition;
|
|
379
|
+
private getDimensions;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
interface IXYDataAccessors {
|
|
383
|
+
/** Accessor for value plotted on the <code>x</code> coordinate */
|
|
384
|
+
x: DataAccessor;
|
|
385
|
+
/** Accessor for value plotted on the <code>y</code> coordinate */
|
|
386
|
+
y: DataAccessor;
|
|
387
|
+
/** Additional custom keys to match the base interface */
|
|
388
|
+
[key: string]: DataAccessor | undefined;
|
|
389
|
+
}
|
|
390
|
+
declare class XYAccessors implements IAccessors {
|
|
391
|
+
/** The default data accessors for using with renderers deriving from XYRenderer */
|
|
392
|
+
data: IXYDataAccessors;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
interface ILineDataAccessors extends IXYDataAccessors {
|
|
396
|
+
defined?: DataAccessor<any, boolean>;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Series accessors used in {@link LineAccessors}.
|
|
400
|
+
*/
|
|
401
|
+
interface ILineSeriesAccessors {
|
|
402
|
+
/** Color of the series */
|
|
403
|
+
color?: SeriesAccessor;
|
|
404
|
+
/** Marker for the series */
|
|
405
|
+
marker?: SeriesAccessor;
|
|
406
|
+
/** Additional custom keys to match the base interface */
|
|
407
|
+
[key: string]: SeriesAccessor | undefined;
|
|
408
|
+
}
|
|
409
|
+
interface ILineAccessors extends IAccessors {
|
|
410
|
+
data: ILineDataAccessors;
|
|
411
|
+
/** Series level accessors - e.g. for colors, markers, etc. */
|
|
412
|
+
series: ILineSeriesAccessors;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Accessor class supporting the {@link LineRenderer}, that defines required inputs acquired from data points.
|
|
416
|
+
* This class includes default behavior for all required fields. It's using properties of the same name for data accessors.
|
|
417
|
+
* <p>
|
|
418
|
+
* 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
|
|
419
|
+
* kept in mind when configuring charts as it could cause potential color synchronization problems.
|
|
420
|
+
*
|
|
421
|
+
* <p>See referenced <code>data</code> and <code>series</code> interfaces for required properties.</p>
|
|
422
|
+
*/
|
|
423
|
+
declare class LineAccessors extends XYAccessors implements ILineAccessors {
|
|
424
|
+
colorProvider: IValueProvider<string>;
|
|
425
|
+
markerProvider: IValueProvider<IChartMarker>;
|
|
426
|
+
data: ILineDataAccessors;
|
|
427
|
+
series: ILineSeriesAccessors;
|
|
428
|
+
constructor(colorProvider?: IValueProvider<string>, markerProvider?: IValueProvider<IChartMarker>);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Renderer that is able to draw line chart
|
|
433
|
+
*/
|
|
434
|
+
declare class LineRenderer extends XYRenderer<ILineAccessors> {
|
|
435
|
+
readonly config: ILineRendererConfig;
|
|
436
|
+
static UNCLIPPED_DATA_LAYER_NAME: string;
|
|
437
|
+
static LINE_CAP_CLASS_NAME: string;
|
|
438
|
+
static getStrokeStyleDashed(width: number): string;
|
|
439
|
+
static getStrokeStyleDotted(width: number): string;
|
|
440
|
+
private DEFAULT_CONFIG;
|
|
441
|
+
/**
|
|
442
|
+
* Creates an instance of LineRenderer.
|
|
443
|
+
* @param {ILineRendererConfig} [config={}] Renderer configuration object
|
|
444
|
+
*/
|
|
445
|
+
constructor(config?: ILineRendererConfig);
|
|
446
|
+
/** See {@link Renderer#draw} */
|
|
447
|
+
draw(renderSeries: IRenderSeries<ILineAccessors>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
448
|
+
/**
|
|
449
|
+
* When the data contains only one data point with undefined 'x' value, it is considered an infinite line and special approach is applied
|
|
450
|
+
*
|
|
451
|
+
* @param renderSeries
|
|
452
|
+
*/
|
|
453
|
+
isInfiniteLineData(renderSeries: IRenderSeries<ILineAccessors>): boolean;
|
|
454
|
+
/**
|
|
455
|
+
* Renders the line in prepared <path> element
|
|
456
|
+
*
|
|
457
|
+
* @param {IRenderSeries<ILineAccessors>} renderSeries
|
|
458
|
+
* @param {D3Selection} path D3 Selection with <path> element pre-created and pre-styled
|
|
459
|
+
*/
|
|
460
|
+
drawLine(renderSeries: IRenderSeries<ILineAccessors>, path: D3Selection<SVGPathElement>): void;
|
|
461
|
+
/** See {@link Renderer#highlightDataPoint} */
|
|
462
|
+
highlightDataPoint(renderSeries: IRenderSeries<ILineAccessors>, dataPointIndex: number, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
463
|
+
/** See {@link Renderer#getRequiredLayers} */
|
|
464
|
+
getRequiredLayers(): ILasagnaLayer[];
|
|
465
|
+
/** See {@link Renderer#getDataPointPosition} */
|
|
466
|
+
getDataPointPosition(dataSeries: IDataSeries<ILineAccessors>, index: number, scales: Scales): IPosition | undefined;
|
|
467
|
+
private drawStandardLine;
|
|
468
|
+
private drawInfiniteLine;
|
|
469
|
+
private updateLineCaps;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
declare enum RenderState {
|
|
473
|
+
hidden = "hidden",
|
|
474
|
+
deemphasized = "deemphasized",
|
|
475
|
+
emphasized = "emphasized",
|
|
476
|
+
default = "default"
|
|
477
|
+
}
|
|
478
|
+
declare enum RenderLayerName {
|
|
479
|
+
background = "background",
|
|
480
|
+
data = "data",
|
|
481
|
+
unclippedData = "unclipped-data",
|
|
482
|
+
foreground = "foreground"
|
|
483
|
+
}
|
|
484
|
+
/** The configuration interface for marker interaction */
|
|
485
|
+
interface IMarkerInteractionConfig {
|
|
486
|
+
/** Enables mouse events on data point markers */
|
|
487
|
+
enabled: boolean;
|
|
488
|
+
/** Enables the pointer style mouse cursor when data point markers are hovered */
|
|
489
|
+
clickable?: boolean;
|
|
490
|
+
}
|
|
491
|
+
/** The configuration interface for the enhanced line caps */
|
|
492
|
+
interface IEnhancedLineCapConfig {
|
|
493
|
+
/** Set the stroke color */
|
|
494
|
+
stroke?: string;
|
|
495
|
+
/** Set the stroke width in pixels */
|
|
496
|
+
strokeWidth?: number;
|
|
497
|
+
/** Set the fill color */
|
|
498
|
+
fill?: string;
|
|
499
|
+
/** Set the radius in pixels */
|
|
500
|
+
radius?: number;
|
|
501
|
+
}
|
|
502
|
+
/** The configuration interface for the line renderer */
|
|
503
|
+
interface ILineRendererConfig extends IRendererConfig {
|
|
504
|
+
/** Set the width of the line in pixels */
|
|
505
|
+
strokeWidth?: number;
|
|
506
|
+
/** Set the stroke-dasharray of the line, e.g. "1,1", "2,2", etc. */
|
|
507
|
+
strokeStyle?: string;
|
|
508
|
+
/** Set the stroke-linecap of the line, e.g. "round" */
|
|
509
|
+
strokeLinecap?: string;
|
|
510
|
+
/** Set the d3 curve algorithm to be used for drawing the lines */
|
|
511
|
+
curveType?: CurveFactory;
|
|
512
|
+
/** Set the strategy for determining the behavior of the chart resulting from user interaction, e.g. LineSelectSeriesInteractionStrategy */
|
|
513
|
+
interactionStrategy?: IHighlightStrategy<ILineAccessors, LineRenderer>;
|
|
514
|
+
/** Configure the interaction behavior for markers */
|
|
515
|
+
markerInteraction?: IMarkerInteractionConfig;
|
|
516
|
+
/** Set whether enhanced line caps should be displayed */
|
|
517
|
+
useEnhancedLineCaps?: boolean;
|
|
518
|
+
/** Optionally configure enhanced line caps. Prerequisite: 'useEnhancedLineCaps' is set to true */
|
|
519
|
+
enhancedLineCap?: IEnhancedLineCapConfig;
|
|
520
|
+
}
|
|
521
|
+
/** The configuration interface for the bar renderer */
|
|
522
|
+
interface IBarRendererConfig extends IRendererConfig {
|
|
523
|
+
/** Set the padding on both sides of each bar */
|
|
524
|
+
padding?: number;
|
|
525
|
+
/** Set the class name to apply custom styles to the bars */
|
|
526
|
+
barClass?: string;
|
|
527
|
+
/** Set the strategy for determining the behavior of the chart resulting from user interaction, e.g. BarHighlightStrategy */
|
|
528
|
+
highlightStrategy?: IHighlightStrategy<IRectangleAccessors, BarRenderer>;
|
|
529
|
+
/** Set the mouse cursor style to use when hovering over individual bars */
|
|
530
|
+
cursor?: string;
|
|
531
|
+
/** Enables pointer events on the bars */
|
|
532
|
+
pointerEvents?: boolean;
|
|
533
|
+
/** Set the stroke width in pixels */
|
|
534
|
+
strokeWidth?: number;
|
|
535
|
+
/** Enable the minimum bar thickness (BarRenderer.MIN_BAR_THICKNESS) */
|
|
536
|
+
enableMinBarThickness?: boolean;
|
|
537
|
+
}
|
|
538
|
+
/** The configuration interface for the area renderer */
|
|
539
|
+
interface IAreaRendererConfig extends IRendererConfig {
|
|
540
|
+
/** Set the d3 curve algorithm to be used for drawing the area boundaries */
|
|
541
|
+
curveType?: CurveFactory;
|
|
542
|
+
/** Set the class name to apply custom styles to the areas */
|
|
543
|
+
areaClass?: string;
|
|
544
|
+
/** Enables the pointer cursor when data point markers are hovered */
|
|
545
|
+
markerInteraction?: IMarkerInteractionConfig;
|
|
546
|
+
/** The width of the area path's stroke in pixels. Default is 1. */
|
|
547
|
+
strokeWidth?: number;
|
|
548
|
+
}
|
|
549
|
+
interface IRenderSeries<TA extends IAccessors> {
|
|
550
|
+
dataSeries: IDataSeries<TA>;
|
|
551
|
+
containers: IRenderContainers;
|
|
552
|
+
scales: Scales;
|
|
553
|
+
parentContainer?: D3Selection<SVGElement>;
|
|
554
|
+
}
|
|
555
|
+
interface IHighlightStrategy<TA extends IAccessors<any>, T = Renderer<TA>> {
|
|
556
|
+
getDataPointIndex(renderer: T, series: IDataSeries<TA>, values: {
|
|
557
|
+
[p: string]: any;
|
|
558
|
+
}, scales: Scales): number;
|
|
559
|
+
highlightDataPoint(renderer: T, renderSeries: IRenderSeries<TA>, dataPointIndex: number, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
560
|
+
draw(renderer: T, renderSeries: IRenderSeries<TA>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* The abstract base class for chart renderers with some limited default functionality
|
|
565
|
+
*/
|
|
566
|
+
declare abstract class Renderer<TA extends IAccessors> {
|
|
567
|
+
config: IRendererConfig;
|
|
568
|
+
static readonly DEFAULT_CONFIG: IRendererConfig;
|
|
569
|
+
constructor(config?: IRendererConfig);
|
|
570
|
+
interaction: Record<string, any>;
|
|
571
|
+
/**
|
|
572
|
+
* Draw the visual representation of the provided data series
|
|
573
|
+
*
|
|
574
|
+
* @param {IRenderSeries} renderSeries The series to render
|
|
575
|
+
* @param {Subject<IRendererEventPayload>} rendererSubject A subject to optionally invoke for emitting events regarding a data point
|
|
576
|
+
*/
|
|
577
|
+
abstract draw(renderSeries: IRenderSeries<TA>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
578
|
+
/**
|
|
579
|
+
* Return position of a specified datapoint
|
|
580
|
+
*
|
|
581
|
+
* @param {IDataSeries} dataSeries
|
|
582
|
+
* @param {number} index
|
|
583
|
+
* @param {Scales} scales
|
|
584
|
+
* @returns {IPosition}
|
|
585
|
+
*/
|
|
586
|
+
abstract getDataPointPosition(dataSeries: IDataSeries<TA>, index: number, scales: Scales): IPosition | undefined;
|
|
587
|
+
/**
|
|
588
|
+
* Based on provided values, return the nearest data point that the given coordinates represent. This is used for mouse hover behavior
|
|
589
|
+
*
|
|
590
|
+
* @param {IDataSeries} series series from which to determine the index corresponding to the specified values
|
|
591
|
+
* @param {{ [axis: string]: any }} values the values from which a data point index can be determined
|
|
592
|
+
* @param {Scales} scales the scales to be used in the index calculation
|
|
593
|
+
*
|
|
594
|
+
* @returns {number} negative value means that index is not found
|
|
595
|
+
*/
|
|
596
|
+
getDataPointIndex(series: IDataSeries<TA>, values: {
|
|
597
|
+
[axis: string]: any;
|
|
598
|
+
}, scales: Scales): number;
|
|
599
|
+
/**
|
|
600
|
+
* Highlight the data point corresponding to the specified data point index
|
|
601
|
+
*
|
|
602
|
+
* @param {IRenderSeries} renderSeries The series on which to render the data point highlight
|
|
603
|
+
* @param {number} dataPointIndex index of the highlighted point within the data series (pass -1 to remove the highlight marker)
|
|
604
|
+
* @param {Subject<IRendererEventPayload>} rendererSubject A subject to optionally invoke for emitting events regarding a data point
|
|
605
|
+
*/
|
|
606
|
+
highlightDataPoint(renderSeries: IRenderSeries<TA>, dataPointIndex: number, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
607
|
+
/**
|
|
608
|
+
* Get the style attributes for the specified state that we need to apply to a series container
|
|
609
|
+
*
|
|
610
|
+
* @param {RenderState} state the state for which to retrieve container styles
|
|
611
|
+
*
|
|
612
|
+
* @returns {ValueMap<any, any>} the container styles for the specified state
|
|
613
|
+
*/
|
|
614
|
+
getContainerStateStyles: (state: RenderState) => ValueMap<any, any>;
|
|
615
|
+
/**
|
|
616
|
+
* Set the RenderState of the target data series
|
|
617
|
+
*
|
|
618
|
+
* @param {IRenderContainers} renderContainers the render containers of the series
|
|
619
|
+
* @param {RenderState} state The new state for the target series
|
|
620
|
+
*/
|
|
621
|
+
setSeriesState(renderContainers: IRenderContainers, state: RenderState): void;
|
|
622
|
+
/**
|
|
623
|
+
* Set the RenderState of the target data point
|
|
624
|
+
*
|
|
625
|
+
* @param {D3Selection} target the target data point
|
|
626
|
+
* @param {RenderState} state The new state for the target data point
|
|
627
|
+
*/
|
|
628
|
+
setDataPointState(target: D3Selection, state: RenderState): void;
|
|
629
|
+
/**
|
|
630
|
+
* Calculate domain for data filtered by given filterScales
|
|
631
|
+
*
|
|
632
|
+
* @param dataSeries
|
|
633
|
+
* @param filterScales
|
|
634
|
+
* @param scaleKey
|
|
635
|
+
* @param scale
|
|
636
|
+
* @returns array of datapoints from <code>dataSeries</code> filtered by domains of given <code>filterScale</code>s
|
|
637
|
+
*/
|
|
638
|
+
getDomainOfFilteredData(dataSeries: IDataSeries<TA>, filterScales: Record<string, IScale<any>>, scaleKey: string, scale: IScale<any>): any[];
|
|
639
|
+
/**
|
|
640
|
+
* Calculate the domain using the data of a series
|
|
641
|
+
*
|
|
642
|
+
* @param {any[]} data source data, can be filtered
|
|
643
|
+
* @param dataSeries related data series
|
|
644
|
+
* @param {string} scaleName name of the scale for which domain calculation is needed
|
|
645
|
+
* @param scale
|
|
646
|
+
*
|
|
647
|
+
* @returns {[any, any]} min and max values as an array
|
|
648
|
+
*/
|
|
649
|
+
getDomain(data: any[], dataSeries: IDataSeries<TA>, scaleName: string, scale: IScale<any>): any[];
|
|
650
|
+
/**
|
|
651
|
+
* Filters given dataset by domain of provided scale
|
|
652
|
+
*
|
|
653
|
+
* @param data
|
|
654
|
+
* @param dataSeries
|
|
655
|
+
* @param scaleName
|
|
656
|
+
* @param domain
|
|
657
|
+
*/
|
|
658
|
+
filterDataByDomain(data: any[], dataSeries: IDataSeries<TA>, scaleName: string, domain: any[]): any[];
|
|
659
|
+
/**
|
|
660
|
+
* Get the definitions of lasagna layers required for visualizing data
|
|
661
|
+
*
|
|
662
|
+
* @returns {ILasagnaLayer[]} lasagna layer definitions
|
|
663
|
+
*/
|
|
664
|
+
getRequiredLayers(): ILasagnaLayer[];
|
|
665
|
+
protected setupInteraction(path: string[], nativeEvent: string, target: Selection<any, any, any, any>, dataPointSubject: Subject<IRendererEventPayload>, dataPoint: Partial<IDataPoint>): void;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Interface for defining aspects of the top, right, bottom, and left sides of a grid
|
|
670
|
+
*/
|
|
671
|
+
interface IAllAround<T> {
|
|
672
|
+
/** Object defining aspects of the top of an entity */
|
|
673
|
+
top: T;
|
|
674
|
+
/** Object defining aspects of the right side of an entity */
|
|
675
|
+
right: T;
|
|
676
|
+
/** Object defining aspects of the bottom of an entity */
|
|
677
|
+
bottom: T;
|
|
678
|
+
/** Object defining aspects of the left side of an entity */
|
|
679
|
+
left: T;
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* The width and height of an grid
|
|
683
|
+
*/
|
|
684
|
+
interface IDimensions {
|
|
685
|
+
width: number;
|
|
686
|
+
height: number;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Configuration of grid dimensions
|
|
690
|
+
*/
|
|
691
|
+
interface IDimensionConfig {
|
|
692
|
+
/** The top, right, bottom, and left margin sizes in pixels */
|
|
693
|
+
margin: IAllAround<number>;
|
|
694
|
+
/** The top, right, bottom, and left padding sizes in pixels */
|
|
695
|
+
padding: IAllAround<number>;
|
|
696
|
+
/** Sets whether the grid uses the chart's container to determine its width */
|
|
697
|
+
autoWidth: boolean;
|
|
698
|
+
/** Sets whether the grid uses the chart's container to determine its height */
|
|
699
|
+
autoHeight: boolean;
|
|
700
|
+
/** Set of booleans indicating whether a specific margin will be recalculated on chart dimension updates */
|
|
701
|
+
marginLocked?: IAllAround<boolean>;
|
|
702
|
+
/**
|
|
703
|
+
* Sets the grid's width. Note: 'autoWidth' must be set to false for this setting to have an effect.
|
|
704
|
+
*
|
|
705
|
+
* @param {number} value The new grid width
|
|
706
|
+
* @returns {IDimensionConfig} The resulting dimension config
|
|
707
|
+
*/
|
|
708
|
+
width(value: number): IDimensionConfig;
|
|
709
|
+
/**
|
|
710
|
+
* Gets the grid's width -- excluding margins.
|
|
711
|
+
*
|
|
712
|
+
* @returns {number} The grid's width
|
|
713
|
+
*/
|
|
714
|
+
width(): number;
|
|
715
|
+
/**
|
|
716
|
+
* Sets the grid's height. Note: 'autoHeight' must be set to false for this setting to have an effect.
|
|
717
|
+
*
|
|
718
|
+
* @param {number} value The new grid height
|
|
719
|
+
* @returns {IDimensionConfig} The resulting dimension config
|
|
720
|
+
*/
|
|
721
|
+
height(value: number): IDimensionConfig;
|
|
722
|
+
/**
|
|
723
|
+
* Gets the grid's height -- excluding margins.
|
|
724
|
+
*
|
|
725
|
+
* @returns {number} The grid's height
|
|
726
|
+
*/
|
|
727
|
+
height(): number;
|
|
728
|
+
/**
|
|
729
|
+
* Sets the grid's width by subtracting the grid's horizontal margins from the specified value.
|
|
730
|
+
* Note: 'autoWidth' must be set to false for this setting to have an effect.
|
|
731
|
+
*
|
|
732
|
+
* @param {number} value The new width plus the grid's horizontal margins
|
|
733
|
+
* @returns {IDimensionConfig} The resulting dimension config
|
|
734
|
+
*/
|
|
735
|
+
outerWidth(value: number): IDimensionConfig;
|
|
736
|
+
/**
|
|
737
|
+
* Gets the grid's width -- including horizontal margins.
|
|
738
|
+
*
|
|
739
|
+
* @returns {number} The grid's width plus horizontal margins
|
|
740
|
+
*/
|
|
741
|
+
outerWidth(): number;
|
|
742
|
+
/**
|
|
743
|
+
* Sets the grid's height by subtracting the grid's vertical margins from the specified value.
|
|
744
|
+
* Note: 'autoWidth' must be set to false for this setting to have an effect.
|
|
745
|
+
*
|
|
746
|
+
* @param {number} value The new height plus the grid's vertical margins *
|
|
747
|
+
* @returns {IDimensionConfig} The resulting dimension config
|
|
748
|
+
*/
|
|
749
|
+
outerHeight(value: number): IDimensionConfig;
|
|
750
|
+
/**
|
|
751
|
+
* Gets the grid's height -- including vertical margins.
|
|
752
|
+
*
|
|
753
|
+
* @returns {number} The grid's height plus vertical margins
|
|
754
|
+
*/
|
|
755
|
+
outerHeight(): number;
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* Interface for defining the SVGElements forming the top, right, bottom, and left borders of an entity
|
|
759
|
+
*/
|
|
760
|
+
type IBorders = IAllAround<SVGElement>;
|
|
761
|
+
/**
|
|
762
|
+
* Configuration of grid borders
|
|
763
|
+
*/
|
|
764
|
+
interface IBorderConfig {
|
|
765
|
+
/** The stroke color */
|
|
766
|
+
color?: string;
|
|
767
|
+
/** The thickness of the border */
|
|
768
|
+
width?: number;
|
|
769
|
+
/** The class name */
|
|
770
|
+
className?: string;
|
|
771
|
+
/** Boolean indicating whether the border should be visible */
|
|
772
|
+
visible?: boolean;
|
|
773
|
+
}
|
|
774
|
+
interface ITextOverflowArgs {
|
|
775
|
+
widthLimit: number;
|
|
776
|
+
horizontalPadding: number;
|
|
777
|
+
ellipsisWidth: number;
|
|
778
|
+
}
|
|
779
|
+
/** Type for tick overflow handler */
|
|
780
|
+
type TextOverflowHandler = (textSelection: Selection<BaseType, unknown, null, undefined>, args: ITextOverflowArgs) => void;
|
|
781
|
+
/** Interface representing the configuration for tick labels */
|
|
782
|
+
interface ITickLabelConfig {
|
|
783
|
+
/**
|
|
784
|
+
* Padding for left and right sides of label used for calculating text overflow limits
|
|
785
|
+
* (number represents the padding on each side)
|
|
786
|
+
*/
|
|
787
|
+
horizontalPadding: number;
|
|
788
|
+
/** Handler for text overflow. Set to 'undefined' to disable overflow handling */
|
|
789
|
+
overflowHandler?: TextOverflowHandler;
|
|
790
|
+
/**
|
|
791
|
+
* Setting this insures the label's width is smaller or equal to the provided number
|
|
792
|
+
*/
|
|
793
|
+
maxWidth?: number;
|
|
794
|
+
}
|
|
795
|
+
/** Configuration of a grid axis */
|
|
796
|
+
interface IAxisConfig {
|
|
797
|
+
/** Boolean indicating whether the axis should be visible */
|
|
798
|
+
visible: boolean;
|
|
799
|
+
/** The approximate number of ticks to display */
|
|
800
|
+
approximateTicks: number;
|
|
801
|
+
/** Boolean indicating whether grid ticks should be displayed */
|
|
802
|
+
gridTicks: boolean;
|
|
803
|
+
/** The length of the ticks in pixels */
|
|
804
|
+
tickSize: number;
|
|
805
|
+
/** Configuration for the tick labels */
|
|
806
|
+
tickLabel: ITickLabelConfig;
|
|
807
|
+
/** Sets whether to fit the grid margins to the axis labels */
|
|
808
|
+
fit: boolean;
|
|
809
|
+
/** Sets the axis padding */
|
|
810
|
+
padding: number;
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Basic grid configuration
|
|
814
|
+
*/
|
|
815
|
+
interface IGridConfig {
|
|
816
|
+
/** Boolean indicating whether the grid will respond to mouse events */
|
|
817
|
+
interactive: boolean;
|
|
818
|
+
/** Configuration for the grid's dimensions */
|
|
819
|
+
dimension: IDimensionConfig;
|
|
820
|
+
/** Configuration for the grid's borders */
|
|
821
|
+
borders: IAllAround<IBorderConfig>;
|
|
822
|
+
/** String indicating the desired cursor style */
|
|
823
|
+
cursor: string;
|
|
824
|
+
/** Set to true to disable the render area height correction */
|
|
825
|
+
disableRenderAreaHeightCorrection?: boolean;
|
|
826
|
+
/** Set to true to disable the render area width correction */
|
|
827
|
+
disableRenderAreaWidthCorrection?: boolean;
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* Configuration for an XYGrid
|
|
831
|
+
*/
|
|
832
|
+
interface IXYGridConfig extends IGridConfig {
|
|
833
|
+
/** The IAllAround value for the grid's axis configurations */
|
|
834
|
+
axis: IAllAround<IAxisConfig>;
|
|
835
|
+
/**
|
|
836
|
+
* Add interaction line and label plugins automatically
|
|
837
|
+
* Note: This was added to prevent a breaking change. We should avoid this kind of option in future
|
|
838
|
+
* versions of IXYGridConfig because ideally all plugins should be added manually (NUI-3304).
|
|
839
|
+
*/
|
|
840
|
+
interactionPlugins: boolean;
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* The basic interface for a grid's dimensions, scaling, interaction, and borders
|
|
844
|
+
*
|
|
845
|
+
* @interface
|
|
846
|
+
*/
|
|
847
|
+
interface IGrid {
|
|
848
|
+
/** The grid scales
|
|
849
|
+
*
|
|
850
|
+
* @type {ScalesIndex}
|
|
851
|
+
*/
|
|
852
|
+
scales: ScalesIndex;
|
|
853
|
+
/**
|
|
854
|
+
* Subject for indicating that the chart's dimensions should be updated
|
|
855
|
+
*/
|
|
856
|
+
updateChartDimensionsSubject?: Subject<void>;
|
|
857
|
+
/**
|
|
858
|
+
* Chart event bus
|
|
859
|
+
*/
|
|
860
|
+
eventBus: EventBus<IChartEvent>;
|
|
861
|
+
/**
|
|
862
|
+
* Provides access to the grid's layering mechanism
|
|
863
|
+
*
|
|
864
|
+
* @returns {Lasagna} The grid's layering mechanism
|
|
865
|
+
*/
|
|
866
|
+
getLasagna(): Lasagna;
|
|
867
|
+
/**
|
|
868
|
+
* Provides access to the grid's interactive area
|
|
869
|
+
*
|
|
870
|
+
* @returns {D3Selection} The grid's interactive area
|
|
871
|
+
*/
|
|
872
|
+
getInteractiveArea(): D3Selection<SVGRectElement>;
|
|
873
|
+
/**
|
|
874
|
+
* getter for the grid's target d3 selection
|
|
875
|
+
*
|
|
876
|
+
* @returns {D3Selection} The grid's target d3 selection
|
|
877
|
+
*/
|
|
878
|
+
target(): D3Selection<SVGSVGElement>;
|
|
879
|
+
/**
|
|
880
|
+
* setter for the grid's target d3 selection
|
|
881
|
+
*
|
|
882
|
+
* @param {D3Selection} [target] The grid's new target d3 selection
|
|
883
|
+
* @returns {IGrid} The grid instance
|
|
884
|
+
*/
|
|
885
|
+
target(target: D3Selection<SVGSVGElement>): IGrid;
|
|
886
|
+
target(target: D3Selection<SVGSVGElement>): D3Selection<SVGSVGElement> | IGrid;
|
|
887
|
+
/**
|
|
888
|
+
* getter for the grid configuration
|
|
889
|
+
*
|
|
890
|
+
* @returns {IGridConfig} The grid configuration
|
|
891
|
+
*/
|
|
892
|
+
config(): IGridConfig;
|
|
893
|
+
/**
|
|
894
|
+
* setter for the grid configuration
|
|
895
|
+
*
|
|
896
|
+
* @param {IGridConfig} config The new grid configuration
|
|
897
|
+
* @returns {this} The grid instance
|
|
898
|
+
*/
|
|
899
|
+
config(config: IGridConfig): this;
|
|
900
|
+
/**
|
|
901
|
+
* Builds the grid's rendered elements
|
|
902
|
+
*
|
|
903
|
+
* @returns {IGrid} The grid instance
|
|
904
|
+
*/
|
|
905
|
+
build(): IGrid;
|
|
906
|
+
/**
|
|
907
|
+
* Updates the grid's rendered elements based on the current scales and configuration
|
|
908
|
+
*
|
|
909
|
+
* @returns {IGrid} The grid instance
|
|
910
|
+
*/
|
|
911
|
+
update(): IGrid;
|
|
912
|
+
/**
|
|
913
|
+
* Updates the grid's dimensions as specified
|
|
914
|
+
*
|
|
915
|
+
* @param {Partial<IDimensions>} dimensions The new grid dimensions
|
|
916
|
+
* @returns {IGrid} The grid instance
|
|
917
|
+
*/
|
|
918
|
+
updateDimensions(dimensions: Partial<IDimensions>): IGrid;
|
|
919
|
+
/**
|
|
920
|
+
* Updates the ranges on the grid's scales based on the grid's configured dimensions
|
|
921
|
+
*
|
|
922
|
+
* @returns {IGrid} The grid instance
|
|
923
|
+
*/
|
|
924
|
+
updateRanges(): IGrid;
|
|
925
|
+
/**
|
|
926
|
+
* Builds the grid's plugins
|
|
927
|
+
*
|
|
928
|
+
* @returns {IChartPlugin[]} The set of generated plugins
|
|
929
|
+
*/
|
|
930
|
+
buildPlugins(chart: IChart): IChartPlugin[];
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* Interface for a d3 axis entity
|
|
934
|
+
*/
|
|
935
|
+
interface IAxis {
|
|
936
|
+
/** The d3 group element for the axis label */
|
|
937
|
+
labelGroup: D3Selection<SVGGElement>;
|
|
938
|
+
/** The d3 group element for the axis ticks */
|
|
939
|
+
tickGroup: D3Selection<SVGGElement>;
|
|
940
|
+
/** The d3 group element for the axis */
|
|
941
|
+
group: D3Selection<SVGGElement>;
|
|
942
|
+
/** The d3 axis */
|
|
943
|
+
axis: Axis<any>;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
declare const GAUGE_QUANTITY_SERIES_ID = "quantity";
|
|
947
|
+
declare const GAUGE_REMAINDER_SERIES_ID = "remainder";
|
|
948
|
+
declare const GAUGE_THRESHOLD_MARKERS_SERIES_ID = "threshold-markers";
|
|
949
|
+
/**
|
|
950
|
+
* The visualization modes for a gauge
|
|
951
|
+
*/
|
|
952
|
+
declare enum GaugeMode {
|
|
953
|
+
Donut = "donut",
|
|
954
|
+
Horizontal = "horizontal",
|
|
955
|
+
Vertical = "vertical"
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* Standard thicknesses for the linear gauge
|
|
959
|
+
*/
|
|
960
|
+
declare enum StandardLinearGaugeThickness {
|
|
961
|
+
Small = 10,
|
|
962
|
+
Large = 15
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* Standard values for gauge threshold marker radii
|
|
966
|
+
*/
|
|
967
|
+
declare enum StandardGaugeThresholdMarkerRadius {
|
|
968
|
+
Small = 3,
|
|
969
|
+
Large = 4
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* Standard values for gauge threshold marker radii
|
|
973
|
+
*/
|
|
974
|
+
declare enum StandardGaugeThresholdId {
|
|
975
|
+
Warning = "warning",
|
|
976
|
+
Critical = "critical"
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* Standard gauge colors
|
|
980
|
+
*/
|
|
981
|
+
declare enum StandardGaugeColor {
|
|
982
|
+
/** Standard color for the part of the gauge that's not filled in */
|
|
983
|
+
Remainder = "var(--nui-color-semantic-unknown-bg-hover)",
|
|
984
|
+
/** Standard color for the value part of the gauge when the value represents an ok status */
|
|
985
|
+
Ok = "var(--nui-color-chart-one)",
|
|
986
|
+
/** Standard color for the value part of the gauge when the value has a warning status */
|
|
987
|
+
Warning = "var(--nui-color-semantic-warning)",
|
|
988
|
+
/** Standard color for the value part of the gauge when the value has a critical status */
|
|
989
|
+
Critical = "var(--nui-color-semantic-critical)"
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* Default donut gauge margin for label clearance
|
|
993
|
+
*/
|
|
994
|
+
declare const DONUT_GAUGE_LABEL_CLEARANCE_DEFAULT = 30;
|
|
995
|
+
/**
|
|
996
|
+
* Default linear gauge margins for label clearance
|
|
997
|
+
*/
|
|
998
|
+
declare const LINEAR_GAUGE_LABEL_CLEARANCE_DEFAULTS: IAllAround<number>;
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* Short-form alias for the most commonly used generic D3 Selection type
|
|
1002
|
+
*/
|
|
1003
|
+
type D3Selection<T extends SVGElement = SVGElement> = Selection<T, any, SVGElement, any>;
|
|
1004
|
+
/**
|
|
1005
|
+
* Signature for data accessors
|
|
1006
|
+
*
|
|
1007
|
+
* @param d data point
|
|
1008
|
+
* @param i index
|
|
1009
|
+
* @param series the whole data series
|
|
1010
|
+
*/
|
|
1011
|
+
type DataAccessor<D = any, T = any> = (d: D, i: number, series: D[], dataSeries: IDataSeries<IAccessors>) => T;
|
|
1012
|
+
/**
|
|
1013
|
+
* Signature for series accessors
|
|
1014
|
+
*/
|
|
1015
|
+
type SeriesAccessor = (seriesId: string, series: IDataSeries<IAccessors>) => any;
|
|
1016
|
+
/** @ignore */
|
|
1017
|
+
interface ILasagnaLayer {
|
|
1018
|
+
name: string;
|
|
1019
|
+
order: number;
|
|
1020
|
+
clipped: boolean;
|
|
1021
|
+
}
|
|
1022
|
+
/** Mouse interaction types */
|
|
1023
|
+
declare enum InteractionType {
|
|
1024
|
+
/** Indicates that an element has been clicked */
|
|
1025
|
+
Click = "click",
|
|
1026
|
+
/** Indicates that an element is hovered */
|
|
1027
|
+
Hover = "hover",
|
|
1028
|
+
/** Indicates a 'mousedown' event */
|
|
1029
|
+
MouseDown = "mousedown",
|
|
1030
|
+
/** Indicates that the mouse has entered the bounds of an element */
|
|
1031
|
+
MouseEnter = "mouseenter",
|
|
1032
|
+
/** Indicates that the mouse has left the bounds of an element */
|
|
1033
|
+
MouseLeave = "mouseleave",
|
|
1034
|
+
/** Indicates a movement of the mouse across the chart */
|
|
1035
|
+
MouseMove = "mousemove",
|
|
1036
|
+
/** Indicates a 'mouseup' event */
|
|
1037
|
+
MouseUp = "mouseup"
|
|
1038
|
+
}
|
|
1039
|
+
/** @ignore */
|
|
1040
|
+
interface ICoordinates {
|
|
1041
|
+
x: number;
|
|
1042
|
+
y: number;
|
|
1043
|
+
}
|
|
1044
|
+
/** @ignore */
|
|
1045
|
+
interface IInteractionEvent {
|
|
1046
|
+
type: InteractionType;
|
|
1047
|
+
coordinates: ICoordinates;
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* Information about the render state of a series
|
|
1051
|
+
*/
|
|
1052
|
+
interface IRenderStateData {
|
|
1053
|
+
/** Series identifier */
|
|
1054
|
+
seriesId: string;
|
|
1055
|
+
/** Series render state */
|
|
1056
|
+
state: RenderState;
|
|
1057
|
+
/** Series */
|
|
1058
|
+
series?: IChartSeries<IAccessors>;
|
|
1059
|
+
}
|
|
1060
|
+
/** @ignore */
|
|
1061
|
+
interface IDomainLimits<T> {
|
|
1062
|
+
min: T;
|
|
1063
|
+
max: T;
|
|
1064
|
+
}
|
|
1065
|
+
interface IRendererConfig {
|
|
1066
|
+
stateStyles?: Record<RenderState, ValueMap<any, any>>;
|
|
1067
|
+
transitionDuration?: number;
|
|
1068
|
+
interactive?: boolean;
|
|
1069
|
+
/** Excludes series from scale domain calculations */
|
|
1070
|
+
ignoreForDomainCalculation?: boolean;
|
|
1071
|
+
}
|
|
1072
|
+
interface IRadialRendererConfig extends IRendererConfig {
|
|
1073
|
+
annularWidth?: number;
|
|
1074
|
+
annularPadding?: number;
|
|
1075
|
+
/** annularGrowth is a percentage value to define annular width automatically.
|
|
1076
|
+
* It will grow until it reaches maxThickness.
|
|
1077
|
+
* Set one to 0 to use annularWidth constant value instead */
|
|
1078
|
+
maxThickness?: number;
|
|
1079
|
+
annularGrowth?: number;
|
|
1080
|
+
cursor?: string;
|
|
1081
|
+
strokeWidth?: number;
|
|
1082
|
+
enableSeriesHighlighting?: boolean;
|
|
1083
|
+
enableDataPointHighlighting?: boolean;
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Standard configuration for gauge threshold renderers
|
|
1087
|
+
*/
|
|
1088
|
+
interface IGaugeThresholdsRendererConfig {
|
|
1089
|
+
/** The radius of each threshold marker */
|
|
1090
|
+
markerRadius?: StandardGaugeThresholdMarkerRadius | number;
|
|
1091
|
+
/** Boolean indicating whether the renderer is enabled */
|
|
1092
|
+
enabled?: boolean;
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* Configuration for the DonutGaugeThresholdsRenderer
|
|
1096
|
+
*/
|
|
1097
|
+
interface IDonutGaugeThresholdsRendererConfig extends IRadialRendererConfig, IGaugeThresholdsRendererConfig {
|
|
1098
|
+
}
|
|
1099
|
+
/**
|
|
1100
|
+
* Configuration for the LinearGaugeThresholdsRenderer
|
|
1101
|
+
*/
|
|
1102
|
+
interface ILinearGaugeThresholdsRendererConfig extends IRendererConfig, IGaugeThresholdsRendererConfig {
|
|
1103
|
+
}
|
|
1104
|
+
interface ILinearScales {
|
|
1105
|
+
x: ScaleLinear<number, number>;
|
|
1106
|
+
y: ScaleLinear<number, number>;
|
|
1107
|
+
}
|
|
1108
|
+
interface IDataAccessors<D = any> {
|
|
1109
|
+
[key: string]: DataAccessor<D> | undefined;
|
|
1110
|
+
}
|
|
1111
|
+
interface ISeriesAccessors {
|
|
1112
|
+
[key: string]: SeriesAccessor | undefined;
|
|
1113
|
+
}
|
|
1114
|
+
/**
|
|
1115
|
+
* Accessors describe the data for the consumers.
|
|
1116
|
+
*/
|
|
1117
|
+
interface IAccessors<D = any> {
|
|
1118
|
+
/** Data point level accessors for defining what part of a datum is used for visualizations */
|
|
1119
|
+
data?: IDataAccessors<D>;
|
|
1120
|
+
/** Series level accessors - e.g. for colors, markers, etc. */
|
|
1121
|
+
series?: ISeriesAccessors;
|
|
1122
|
+
}
|
|
1123
|
+
/**
|
|
1124
|
+
* A set of data to visualize on the chart
|
|
1125
|
+
*/
|
|
1126
|
+
interface IDataSeries<A extends IAccessors<D>, D = any> {
|
|
1127
|
+
/** The series identifier */
|
|
1128
|
+
id: string;
|
|
1129
|
+
/**
|
|
1130
|
+
* The series data. It is an array of arbitrary objects, the structure of which is prescribed by the consumer of this data series. Specific
|
|
1131
|
+
* renderers require specific accessor keys that are used to access values on data points. The renderers and other consumers rarely access
|
|
1132
|
+
* data point properties directly, but usually through accessors.
|
|
1133
|
+
*/
|
|
1134
|
+
data: D[];
|
|
1135
|
+
/** Accessors describing the data */
|
|
1136
|
+
accessors: A;
|
|
1137
|
+
/** Allow any properties to be stored on this object to facilitate the transfer of data from APIs */
|
|
1138
|
+
[key: string]: any;
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
* The set of elements required for a chart to visualize some data
|
|
1142
|
+
*/
|
|
1143
|
+
interface IChartSeries<A extends IAccessors> extends IDataSeries<A> {
|
|
1144
|
+
/** The renderer to be used for visualizing the data */
|
|
1145
|
+
renderer: Renderer<A>;
|
|
1146
|
+
/**
|
|
1147
|
+
* Information about how chart data should conform to the drawable area.
|
|
1148
|
+
* Grids expect certain scale keys to be used depending on the type of grid, for example an x-y grid
|
|
1149
|
+
* uses 'x' and 'y' as the keys for its scales.
|
|
1150
|
+
*/
|
|
1151
|
+
scales: Scales;
|
|
1152
|
+
/**
|
|
1153
|
+
* Represents an emphasis/visibility state of this series
|
|
1154
|
+
*/
|
|
1155
|
+
renderState?: RenderState;
|
|
1156
|
+
}
|
|
1157
|
+
interface IChartAssistSeries<A extends IAccessors> extends IChartSeries<A> {
|
|
1158
|
+
/**
|
|
1159
|
+
* Whether this series should be shown in the legend
|
|
1160
|
+
*/
|
|
1161
|
+
showInLegend?: boolean;
|
|
1162
|
+
/**
|
|
1163
|
+
* Whether this series should be preprocessed in the chart assist
|
|
1164
|
+
*/
|
|
1165
|
+
preprocess?: boolean;
|
|
1166
|
+
}
|
|
1167
|
+
interface IChartMarker {
|
|
1168
|
+
getSvg(): string;
|
|
1169
|
+
setColor(color: string): void;
|
|
1170
|
+
}
|
|
1171
|
+
interface IChart {
|
|
1172
|
+
target?: D3Selection<SVGSVGElement>;
|
|
1173
|
+
configuration?: IChartConfiguration;
|
|
1174
|
+
getEventBus(): EventBus<IChartEvent>;
|
|
1175
|
+
getDataManager(): DataManager;
|
|
1176
|
+
getRenderEngine(): RenderEngine;
|
|
1177
|
+
getGrid(): IGrid;
|
|
1178
|
+
addPlugin(plugin: IChartPlugin): void;
|
|
1179
|
+
removePlugin?(classRef: typeof ChartPlugin): void;
|
|
1180
|
+
build(element: HTMLElement): void;
|
|
1181
|
+
update(seriesSet: IChartSeries<IAccessors>[]): void;
|
|
1182
|
+
updateDimensions(): void;
|
|
1183
|
+
setSeriesStates(renderStateData: IRenderStateData[]): void;
|
|
1184
|
+
destroy(): void;
|
|
1185
|
+
}
|
|
1186
|
+
interface IChartConfiguration {
|
|
1187
|
+
updateDomainForEmptySeries?: boolean;
|
|
1188
|
+
}
|
|
1189
|
+
/** @ignore */
|
|
1190
|
+
interface IChartComponent {
|
|
1191
|
+
chart: IChart;
|
|
1192
|
+
}
|
|
1193
|
+
/** Interface defining a chart plugin */
|
|
1194
|
+
interface IChartPlugin {
|
|
1195
|
+
/**
|
|
1196
|
+
* Associated chart - set automatically on chart initialization
|
|
1197
|
+
*/
|
|
1198
|
+
chart: IChart;
|
|
1199
|
+
/** Initialize the plugin - Invoked automatically on chart initialization */
|
|
1200
|
+
initialize(): void;
|
|
1201
|
+
/** Update the plugin - Invoked automatically on chart update */
|
|
1202
|
+
update(): void;
|
|
1203
|
+
/** Update the plugin's dimensions - Invoked automatically on update of the chart's dimensions */
|
|
1204
|
+
updateDimensions(): void;
|
|
1205
|
+
/** Perform plugin cleanup - Invoked automatically on chart destruction */
|
|
1206
|
+
destroy(): void;
|
|
1207
|
+
}
|
|
1208
|
+
interface IChartEvent<T = any> {
|
|
1209
|
+
broadcast?: boolean;
|
|
1210
|
+
data: T;
|
|
1211
|
+
}
|
|
1212
|
+
/** @ignore */
|
|
1213
|
+
interface IChartCollectionEvent {
|
|
1214
|
+
chartIndex: string;
|
|
1215
|
+
event: IChartEvent;
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* Dictionary of render container name to render container
|
|
1219
|
+
*/
|
|
1220
|
+
interface IRenderContainers {
|
|
1221
|
+
/** Container name as key to render container */
|
|
1222
|
+
[name: string]: D3Selection<SVGGElement>;
|
|
1223
|
+
}
|
|
1224
|
+
/**
|
|
1225
|
+
* Position on the chart
|
|
1226
|
+
*/
|
|
1227
|
+
interface IPosition {
|
|
1228
|
+
x: number;
|
|
1229
|
+
y: number;
|
|
1230
|
+
width?: number;
|
|
1231
|
+
height?: number;
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* A point at which a data series enters or exits a threshold zone
|
|
1235
|
+
*/
|
|
1236
|
+
interface IZoneCrossPoint extends IPosition {
|
|
1237
|
+
/** Indicates whether the cross point is on the edge of a threshold zone */
|
|
1238
|
+
isZoneEdge?: boolean;
|
|
1239
|
+
}
|
|
1240
|
+
/**
|
|
1241
|
+
* Information about a data point
|
|
1242
|
+
*/
|
|
1243
|
+
interface IDataPoint {
|
|
1244
|
+
/** Series identifier */
|
|
1245
|
+
seriesId: string;
|
|
1246
|
+
/** Series */
|
|
1247
|
+
dataSeries: IDataSeries<IAccessors>;
|
|
1248
|
+
/** Data index */
|
|
1249
|
+
index: number;
|
|
1250
|
+
/** Data */
|
|
1251
|
+
data: any;
|
|
1252
|
+
/** Position */
|
|
1253
|
+
position?: IPosition;
|
|
1254
|
+
}
|
|
1255
|
+
/**
|
|
1256
|
+
* Payload for the chart's visibility status in relation to the nearest scrollable parent
|
|
1257
|
+
*/
|
|
1258
|
+
interface IChartViewStatusEventPayload {
|
|
1259
|
+
/**
|
|
1260
|
+
* Indicates whether at least one pixel of the chart's parent element has
|
|
1261
|
+
* intersected with the visible area of its nearest scrollable parent
|
|
1262
|
+
*/
|
|
1263
|
+
isChartInView: boolean;
|
|
1264
|
+
}
|
|
1265
|
+
/**
|
|
1266
|
+
* Payload for events regarding a data point
|
|
1267
|
+
*/
|
|
1268
|
+
interface IRendererEventPayload<T = any> {
|
|
1269
|
+
/** Name of the event */
|
|
1270
|
+
eventName: string;
|
|
1271
|
+
/** Information about the data point */
|
|
1272
|
+
data: T;
|
|
1273
|
+
}
|
|
1274
|
+
/**
|
|
1275
|
+
* Collection of one or more data points as a dictionary of seriesId to IDataPoint
|
|
1276
|
+
*/
|
|
1277
|
+
interface IDataPointsPayload {
|
|
1278
|
+
/** Series id as key to highlighted data point */
|
|
1279
|
+
[seriesId: string]: IDataPoint;
|
|
1280
|
+
}
|
|
1281
|
+
/**
|
|
1282
|
+
* Payload for interaction events
|
|
1283
|
+
*/
|
|
1284
|
+
interface IInteractionPayload {
|
|
1285
|
+
interactionType: InteractionType;
|
|
1286
|
+
}
|
|
1287
|
+
/**
|
|
1288
|
+
* Payload for interaction events regarding a single data point
|
|
1289
|
+
*/
|
|
1290
|
+
interface IInteractionDataPointEvent extends IInteractionPayload {
|
|
1291
|
+
dataPoint: IDataPoint;
|
|
1292
|
+
}
|
|
1293
|
+
/**
|
|
1294
|
+
* Payload for axes style change when emphasizing series on grid
|
|
1295
|
+
*/
|
|
1296
|
+
type IAxesStyleChangeEventPayload = Record<string, Record<string, any>>;
|
|
1297
|
+
/**
|
|
1298
|
+
* Payload for interaction events regarding one or more data points
|
|
1299
|
+
*/
|
|
1300
|
+
interface IInteractionDataPointsEvent extends IInteractionPayload {
|
|
1301
|
+
dataPoints: IDataPointsPayload;
|
|
1302
|
+
}
|
|
1303
|
+
interface ISetDomainEventPayload {
|
|
1304
|
+
[scaleId: string]: any[];
|
|
1305
|
+
}
|
|
1306
|
+
interface IValueProvider<T> {
|
|
1307
|
+
get(entityId: string): T | undefined;
|
|
1308
|
+
reset(): void;
|
|
1309
|
+
}
|
|
1310
|
+
interface IChartPalette {
|
|
1311
|
+
readonly standardColors: IValueProvider<string>;
|
|
1312
|
+
readonly backgroundColors: IValueProvider<string>;
|
|
1313
|
+
readonly textColors: IValueProvider<string>;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* Interface used for interaction values with scaleKey as key to a dictionary of scaleId to value. Typical scale keys are "x" and "y"
|
|
1318
|
+
*/
|
|
1319
|
+
interface IInteractionValues {
|
|
1320
|
+
[scaleKey: string]: {
|
|
1321
|
+
[scaleId: string]: any;
|
|
1322
|
+
};
|
|
1323
|
+
}
|
|
1324
|
+
/**
|
|
1325
|
+
* Payload for an INTERACTION_VALUES_EVENT
|
|
1326
|
+
*/
|
|
1327
|
+
interface IInteractionValuesPayload extends IInteractionPayload {
|
|
1328
|
+
/** The values of the interaction */
|
|
1329
|
+
values: IInteractionValues;
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
* Payload for an INTERACTION_COORDINATES_EVENT
|
|
1333
|
+
*/
|
|
1334
|
+
interface IInteractionCoordinatesPayload extends IInteractionPayload {
|
|
1335
|
+
/** The coordinates of an interaction */
|
|
1336
|
+
coordinates: ICoordinates;
|
|
1337
|
+
}
|
|
1338
|
+
/** Interface for defining an element's position */
|
|
1339
|
+
interface IElementPosition {
|
|
1340
|
+
top: number;
|
|
1341
|
+
left: number;
|
|
1342
|
+
width: number;
|
|
1343
|
+
height: number;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
/**
|
|
1347
|
+
* This plugin calculates new size and position for content inside donut chart
|
|
1348
|
+
*/
|
|
1349
|
+
declare class ChartDonutContentPlugin extends ChartPlugin {
|
|
1350
|
+
/** Subject for getting updates on the content position */
|
|
1351
|
+
contentPositionUpdateSubject: Subject<IElementPosition>;
|
|
1352
|
+
/** The current content position */
|
|
1353
|
+
contentPosition: IElementPosition;
|
|
1354
|
+
updateDimensions(): void;
|
|
1355
|
+
destroy(): void;
|
|
1356
|
+
private getContentPosition;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
declare class ChartDonutContentComponent implements OnDestroy, OnChanges {
|
|
1360
|
+
/** The plugin instance */
|
|
1361
|
+
plugin: ChartDonutContentPlugin;
|
|
1362
|
+
/** The current content position */
|
|
1363
|
+
contentPosition: IElementPosition;
|
|
1364
|
+
private contentPositionUpdateSubscription;
|
|
1365
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1366
|
+
ngOnDestroy(): void;
|
|
1367
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartDonutContentComponent, never>;
|
|
1368
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartDonutContentComponent, "nui-chart-donut-content", never, { "plugin": { "alias": "plugin"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
/** Position with extended information for positioning a tooltip */
|
|
1372
|
+
interface ITooltipPosition extends IPosition {
|
|
1373
|
+
overlayPositions: ConnectedPosition[];
|
|
1374
|
+
}
|
|
1375
|
+
/** How far away from the data point position will the tooltip be positioned */
|
|
1376
|
+
declare const TOOLTIP_POSITION_OFFSET = 10;
|
|
1377
|
+
/** @ignore
|
|
1378
|
+
* Used for charts where tooltips should be placed aside of some vertical line */
|
|
1379
|
+
declare const getVerticalSetup: (offset: number) => ConnectedPosition[];
|
|
1380
|
+
/** @ignore
|
|
1381
|
+
* Used for charts where tooltips should be placed aligned to some horizontal line (as Horizontal Bar Charts) */
|
|
1382
|
+
declare const getHorizontalSetup: (offset: number) => ConnectedPosition[];
|
|
1383
|
+
/**
|
|
1384
|
+
* This plugin listens to the INTERACTION_DATA_POINTS_EVENT and transforms received data into tooltips inputs.
|
|
1385
|
+
* The actual tooltips are handled by the ChartTooltipsComponent.
|
|
1386
|
+
*/
|
|
1387
|
+
declare class ChartTooltipsPlugin extends ChartPlugin {
|
|
1388
|
+
readonly tooltipPositionOffset: number;
|
|
1389
|
+
orientation: "right" | "top";
|
|
1390
|
+
/** Highlighted data points received from the chart */
|
|
1391
|
+
dataPoints: IDataPointsPayload;
|
|
1392
|
+
/** Calculated positions for the data point tooltips */
|
|
1393
|
+
dataPointPositions: {
|
|
1394
|
+
[stringId: string]: ITooltipPosition;
|
|
1395
|
+
};
|
|
1396
|
+
/**
|
|
1397
|
+
* This publishes an event to show tooltips
|
|
1398
|
+
*/
|
|
1399
|
+
showSubject: Subject<void>;
|
|
1400
|
+
/**
|
|
1401
|
+
* This publishes an event to hide tooltips
|
|
1402
|
+
*/
|
|
1403
|
+
hideSubject: Subject<void>;
|
|
1404
|
+
protected overlaySetup: ConnectedPosition[];
|
|
1405
|
+
private isChartInView;
|
|
1406
|
+
private readonly destroy$;
|
|
1407
|
+
private seriesVisibilityMap;
|
|
1408
|
+
/**
|
|
1409
|
+
* @param tooltipPositionOffset Offset of a tooltip from edge of a highlighted element
|
|
1410
|
+
* @param orientation
|
|
1411
|
+
*/
|
|
1412
|
+
constructor(tooltipPositionOffset?: number, orientation?: "right" | "top");
|
|
1413
|
+
initialize(): void;
|
|
1414
|
+
destroy(): void;
|
|
1415
|
+
processHighlightedDataPoints(dataPoints: IDataPointsPayload): void;
|
|
1416
|
+
/**
|
|
1417
|
+
* Calculate tooltip position. Default implementation shows the tooltip on left / right with
|
|
1418
|
+
* @param dataPoint
|
|
1419
|
+
* @param chartSeries
|
|
1420
|
+
*/
|
|
1421
|
+
protected getTooltipPosition(dataPoint: IDataPoint, chartSeries: IChartSeries<IAccessors>): ITooltipPosition;
|
|
1422
|
+
/**
|
|
1423
|
+
* Converts the relative position within a chart into an absolute position on the screen
|
|
1424
|
+
*
|
|
1425
|
+
* @param relativePosition
|
|
1426
|
+
* @param chartPosition
|
|
1427
|
+
*/
|
|
1428
|
+
protected getAbsolutePosition(relativePosition: ITooltipPosition, chartPosition: IPosition): ITooltipPosition;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
declare class ChartTooltipsComponent implements OnChanges, OnDestroy {
|
|
1432
|
+
private changeDetector;
|
|
1433
|
+
plugin: ChartTooltipsPlugin;
|
|
1434
|
+
template: ElementRef;
|
|
1435
|
+
tooltips: QueryList<ChartTooltipDirective>;
|
|
1436
|
+
openTooltips: Subject<void>;
|
|
1437
|
+
closeTooltips: Subject<void>;
|
|
1438
|
+
private unsubscribe$;
|
|
1439
|
+
private simulation;
|
|
1440
|
+
private tooltipDirectivesIndex;
|
|
1441
|
+
private closePending;
|
|
1442
|
+
private isOpen;
|
|
1443
|
+
private openTimeout;
|
|
1444
|
+
private collisionTimeout;
|
|
1445
|
+
private closeTimeout;
|
|
1446
|
+
constructor(changeDetector: ChangeDetectorRef);
|
|
1447
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1448
|
+
ngOnDestroy(): void;
|
|
1449
|
+
trackByFn(index: number, item: any): string | undefined;
|
|
1450
|
+
private handleOpen;
|
|
1451
|
+
private handleClose;
|
|
1452
|
+
/**
|
|
1453
|
+
* Runs the D3 forceCollide based tooltip collision avoidance algorithm
|
|
1454
|
+
*/
|
|
1455
|
+
private avoidTooltipCollisions;
|
|
1456
|
+
/**
|
|
1457
|
+
* Starts the force simulation to avoid tooltip overlap
|
|
1458
|
+
*
|
|
1459
|
+
* @param tooltipIndex
|
|
1460
|
+
* @param tooltipPositions
|
|
1461
|
+
*/
|
|
1462
|
+
private startSimulation;
|
|
1463
|
+
private isVertical;
|
|
1464
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartTooltipsComponent, never>;
|
|
1465
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartTooltipsComponent, "nui-chart-tooltips", never, { "plugin": { "alias": "plugin"; "required": false; }; "template": { "alias": "template"; "required": false; }; }, {}, never, never, false, never>;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
declare const MOUSE_ACTIVE_EVENT = "mouse_active";
|
|
1469
|
+
declare const INTERACTION_VALUES_ACTIVE_EVENT = "interaction_values_active";
|
|
1470
|
+
declare const INTERACTION_VALUES_EVENT = "interaction_values";
|
|
1471
|
+
declare const INTERACTION_COORDINATES_EVENT = "interaction_coordinates";
|
|
1472
|
+
declare const HIGHLIGHT_DATA_POINT_EVENT = "highlight_data_point";
|
|
1473
|
+
declare const SELECT_DATA_POINT_EVENT = "select_data_point";
|
|
1474
|
+
declare const HIGHLIGHT_SERIES_EVENT = "highlight_series";
|
|
1475
|
+
declare const INTERACTION_SERIES_EVENT = "interaction_series";
|
|
1476
|
+
declare const INTERACTION_DATA_POINTS_EVENT = "interaction_data_points";
|
|
1477
|
+
declare const INTERACTION_DATA_POINT_EVENT = "interaction_data_point";
|
|
1478
|
+
declare const DESTROY_EVENT = "destroy";
|
|
1479
|
+
declare const SET_DOMAIN_EVENT = "set_domain";
|
|
1480
|
+
declare const REFRESH_EVENT = "refresh";
|
|
1481
|
+
declare const CHART_VIEW_STATUS_EVENT = "chart_view_status";
|
|
1482
|
+
declare const SERIES_STATE_CHANGE_EVENT = "series_state_change";
|
|
1483
|
+
declare const AXES_STYLE_CHANGE_EVENT = "axes_style_change";
|
|
1484
|
+
/** @ignore */
|
|
1485
|
+
declare const CHART_COMPONENT: InjectionToken<IChartComponent>;
|
|
1486
|
+
/** @ignore */
|
|
1487
|
+
declare const STANDARD_RENDER_LAYERS: {
|
|
1488
|
+
[name: string]: ILasagnaLayer;
|
|
1489
|
+
};
|
|
1490
|
+
/** @ignore */
|
|
1491
|
+
declare const DATA_POINT_NOT_FOUND = -1;
|
|
1492
|
+
/** @ignore */
|
|
1493
|
+
declare const DATA_POINT_INTERACTION_RESET = -2;
|
|
1494
|
+
/** Use this class to prevent DOM elements from triggering mouse-interactive-area events */
|
|
1495
|
+
declare const IGNORE_INTERACTION_CLASS = "ignore-interaction";
|
|
1496
|
+
|
|
1497
|
+
/** Configuration for the popover plugin */
|
|
1498
|
+
interface IPopoverPluginConfig {
|
|
1499
|
+
/** ID of the event stream the plugin will respond to */
|
|
1500
|
+
eventStreamId?: typeof INTERACTION_DATA_POINTS_EVENT | typeof INTERACTION_DATA_POINT_EVENT;
|
|
1501
|
+
/** The type of interaction that will trigger the showing and hiding of the popovers */
|
|
1502
|
+
interactionType?: InteractionType;
|
|
1503
|
+
}
|
|
1504
|
+
/**
|
|
1505
|
+
* This plugin listens for the INTERACTION_DATA_POINTS_EVENT by default and transforms received data into
|
|
1506
|
+
* popover inputs. The listened event can be configured using the 'config.eventStreamId' property.
|
|
1507
|
+
* The actual popover is handled by the ChartPopoverComponent.
|
|
1508
|
+
*/
|
|
1509
|
+
declare class ChartPopoverPlugin extends ChartPlugin {
|
|
1510
|
+
config: IPopoverPluginConfig;
|
|
1511
|
+
/** Info about the data point(s) received in the most recent interaction event */
|
|
1512
|
+
dataPoints: IDataPointsPayload;
|
|
1513
|
+
/** Emits the popover's target position */
|
|
1514
|
+
updatePositionSubject: Subject<IElementPosition>;
|
|
1515
|
+
/** Emits an event indicating the popover should open */
|
|
1516
|
+
openPopoverSubject: Subject<void>;
|
|
1517
|
+
/** Emits an event indicating the popover should close */
|
|
1518
|
+
closePopoverSubject: Subject<void>;
|
|
1519
|
+
/** The target position of the popover */
|
|
1520
|
+
popoverTargetPosition: IElementPosition;
|
|
1521
|
+
/** The default plugin configuration */
|
|
1522
|
+
DEFAULT_CONFIG: IPopoverPluginConfig;
|
|
1523
|
+
private isOpen;
|
|
1524
|
+
private readonly destroy$;
|
|
1525
|
+
constructor(config?: IPopoverPluginConfig);
|
|
1526
|
+
initialize(): void;
|
|
1527
|
+
destroy(): void;
|
|
1528
|
+
protected getAbsolutePosition(valuesArray: any[]): IElementPosition;
|
|
1529
|
+
private processDataPoints;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
declare class ChartPopoverComponent implements OnChanges, OnInit, OnDestroy {
|
|
1533
|
+
private changeDetector;
|
|
1534
|
+
element: ElementRef;
|
|
1535
|
+
plugin: ChartPopoverPlugin;
|
|
1536
|
+
template: TemplateRef<any>;
|
|
1537
|
+
update: EventEmitter<IDataPointsPayload>;
|
|
1538
|
+
popover: PopoverComponent;
|
|
1539
|
+
private readonly destroy$;
|
|
1540
|
+
private initPlugin$;
|
|
1541
|
+
constructor(changeDetector: ChangeDetectorRef, element: ElementRef);
|
|
1542
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1543
|
+
ngOnInit(): void;
|
|
1544
|
+
ngOnDestroy(): void;
|
|
1545
|
+
private initPlugin;
|
|
1546
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartPopoverComponent, never>;
|
|
1547
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartPopoverComponent, "nui-chart-popover", never, { "plugin": { "alias": "plugin"; "required": false; }; "template": { "alias": "template"; "required": false; }; }, { "update": "update"; }, never, never, false, never>;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
declare class ChartMarkerComponent implements OnDestroy, AfterViewInit, OnChanges {
|
|
1551
|
+
private changeDetector;
|
|
1552
|
+
marker: IChartMarker;
|
|
1553
|
+
drawLine: boolean;
|
|
1554
|
+
color: string;
|
|
1555
|
+
maxSize: number;
|
|
1556
|
+
svgContent: ElementRef<SVGElement>;
|
|
1557
|
+
viewBox: string;
|
|
1558
|
+
height: string;
|
|
1559
|
+
width: string;
|
|
1560
|
+
private svg;
|
|
1561
|
+
constructor(changeDetector: ChangeDetectorRef);
|
|
1562
|
+
ngAfterViewInit(): void;
|
|
1563
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1564
|
+
ngOnDestroy(): void;
|
|
1565
|
+
private renderMarkerSvg;
|
|
1566
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartMarkerComponent, never>;
|
|
1567
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartMarkerComponent, "nui-chart-marker", never, { "marker": { "alias": "marker"; "required": false; }; "drawLine": { "alias": "drawLine"; "required": false; }; "color": { "alias": "color"; "required": false; }; "maxSize": { "alias": "maxSize"; "required": false; }; }, {}, never, never, false, never>;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
declare enum LegendOrientation {
|
|
1571
|
+
vertical = "vertical",
|
|
1572
|
+
horizontal = "horizontal"
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
declare class LegendComponent implements OnChanges, OnDestroy {
|
|
1576
|
+
/**
|
|
1577
|
+
* EventEmitter for notifying subscribers of a change in the active state
|
|
1578
|
+
*/
|
|
1579
|
+
activeChanged: EventEmitter<boolean>;
|
|
1580
|
+
/**
|
|
1581
|
+
* The active state
|
|
1582
|
+
*/
|
|
1583
|
+
active: boolean;
|
|
1584
|
+
/**
|
|
1585
|
+
* The legend's interactive mode switch
|
|
1586
|
+
*/
|
|
1587
|
+
interactive: boolean;
|
|
1588
|
+
/**
|
|
1589
|
+
* The legend's orientation
|
|
1590
|
+
*/
|
|
1591
|
+
orientation: LegendOrientation;
|
|
1592
|
+
/**
|
|
1593
|
+
* The legend's overall series color. Individual legend series may override this.
|
|
1594
|
+
*/
|
|
1595
|
+
seriesColor: string;
|
|
1596
|
+
/**
|
|
1597
|
+
* The legend's overall series icon. Individual legend series may override this.
|
|
1598
|
+
*/
|
|
1599
|
+
seriesIcon: string;
|
|
1600
|
+
/**
|
|
1601
|
+
* The legend's overall series unit label. Individual legend series may override this.
|
|
1602
|
+
*/
|
|
1603
|
+
seriesUnitLabel: string;
|
|
1604
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1605
|
+
ngOnDestroy(): void;
|
|
1606
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LegendComponent, never>;
|
|
1607
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LegendComponent, "nui-legend", never, { "active": { "alias": "active"; "required": false; }; "interactive": { "alias": "interactive"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "seriesColor": { "alias": "seriesColor"; "required": false; }; "seriesIcon": { "alias": "seriesIcon"; "required": false; }; "seriesUnitLabel": { "alias": "seriesUnitLabel"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
/** @ignore */
|
|
1611
|
+
declare const LEGEND_SERIES_CLASS_NAME = "nui-legend-series";
|
|
1612
|
+
declare class LegendSeriesComponent implements AfterContentInit {
|
|
1613
|
+
private legend;
|
|
1614
|
+
/**
|
|
1615
|
+
* Sets the series active status
|
|
1616
|
+
*
|
|
1617
|
+
* @param {boolean} active The new active status
|
|
1618
|
+
*/
|
|
1619
|
+
set active(active: boolean);
|
|
1620
|
+
/**
|
|
1621
|
+
* Sets the series interactive mode switch
|
|
1622
|
+
*
|
|
1623
|
+
* @param {boolean} interactive The new interactive mode
|
|
1624
|
+
*/
|
|
1625
|
+
set interactive(interactive: boolean);
|
|
1626
|
+
/**
|
|
1627
|
+
* Gets the series interactive mode value
|
|
1628
|
+
*
|
|
1629
|
+
* @returns {boolean} The current interactive mode
|
|
1630
|
+
*/
|
|
1631
|
+
get interactive(): boolean;
|
|
1632
|
+
/**
|
|
1633
|
+
* Set whether the series is selected
|
|
1634
|
+
*/
|
|
1635
|
+
isSelected: boolean;
|
|
1636
|
+
/**
|
|
1637
|
+
* Emits an event with a boolean value indicating a new selected status
|
|
1638
|
+
*/
|
|
1639
|
+
isSelectedChange: EventEmitter<any>;
|
|
1640
|
+
/**
|
|
1641
|
+
* The primary description of the series
|
|
1642
|
+
*/
|
|
1643
|
+
descriptionPrimary: string;
|
|
1644
|
+
/**
|
|
1645
|
+
* The secondary description of the series
|
|
1646
|
+
*/
|
|
1647
|
+
descriptionSecondary: string;
|
|
1648
|
+
/**
|
|
1649
|
+
* The series icon
|
|
1650
|
+
*/
|
|
1651
|
+
icon: string;
|
|
1652
|
+
/**
|
|
1653
|
+
* Color of the series
|
|
1654
|
+
*/
|
|
1655
|
+
color: string;
|
|
1656
|
+
/**
|
|
1657
|
+
* The render state of the legend series
|
|
1658
|
+
*/
|
|
1659
|
+
set seriesRenderState(renderState: RenderState);
|
|
1660
|
+
get seriesRenderState(): RenderState;
|
|
1661
|
+
private projectedDescription;
|
|
1662
|
+
get isInteractiveClassApplied(): boolean;
|
|
1663
|
+
isHorizontalClassApplied: boolean;
|
|
1664
|
+
get isActiveClassApplied(): boolean;
|
|
1665
|
+
private _seriesRenderState;
|
|
1666
|
+
private _active;
|
|
1667
|
+
private _interactive;
|
|
1668
|
+
constructor(legend: LegendComponent);
|
|
1669
|
+
ngAfterContentInit(): void;
|
|
1670
|
+
/**
|
|
1671
|
+
* Emits an isSelectedChange event on series click if the series is in interactive mode
|
|
1672
|
+
*/
|
|
1673
|
+
onClick(): void;
|
|
1674
|
+
/**
|
|
1675
|
+
* @returns boolean indicating whether the series has a primary or secondary description
|
|
1676
|
+
*/
|
|
1677
|
+
hasInputDescription(): boolean;
|
|
1678
|
+
/**
|
|
1679
|
+
* @returns boolean indicating whether the series has a projected description
|
|
1680
|
+
*/
|
|
1681
|
+
hasProjectedDescription(): boolean;
|
|
1682
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LegendSeriesComponent, [{ optional: true; host: true; }]>;
|
|
1683
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LegendSeriesComponent, "nui-legend-series", never, { "active": { "alias": "active"; "required": false; }; "interactive": { "alias": "interactive"; "required": false; }; "isSelected": { "alias": "isSelected"; "required": false; }; "descriptionPrimary": { "alias": "descriptionPrimary"; "required": false; }; "descriptionSecondary": { "alias": "descriptionSecondary"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "color": { "alias": "color"; "required": false; }; "seriesRenderState": { "alias": "seriesRenderState"; "required": false; }; }, { "isSelectedChange": "isSelectedChange"; }, never, ["*", "[legendMenu]", "[description]"], false, never>;
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
declare class BasicLegendTileComponent {
|
|
1687
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BasicLegendTileComponent, never>;
|
|
1688
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BasicLegendTileComponent, "nui-basic-legend-tile", never, {}, {}, never, ["*"], false, never>;
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
declare class RichLegendTileComponent implements AfterContentInit, AfterViewInit {
|
|
1692
|
+
private legendSeries;
|
|
1693
|
+
private legend;
|
|
1694
|
+
private changeDetector;
|
|
1695
|
+
/**
|
|
1696
|
+
* The series unit label
|
|
1697
|
+
*/
|
|
1698
|
+
unitLabel: string;
|
|
1699
|
+
/**
|
|
1700
|
+
* The current value of the series
|
|
1701
|
+
*/
|
|
1702
|
+
value: string;
|
|
1703
|
+
/**
|
|
1704
|
+
* The series color
|
|
1705
|
+
*/
|
|
1706
|
+
backgroundColor: string;
|
|
1707
|
+
/**
|
|
1708
|
+
* Color for the text
|
|
1709
|
+
*/
|
|
1710
|
+
color: string;
|
|
1711
|
+
seriesHasAdditionalContent: boolean;
|
|
1712
|
+
constructor(legendSeries: LegendSeriesComponent, legend: LegendComponent, changeDetector: ChangeDetectorRef);
|
|
1713
|
+
ngAfterContentInit(): void;
|
|
1714
|
+
ngAfterViewInit(): void;
|
|
1715
|
+
hasInputValue(): boolean;
|
|
1716
|
+
hasInputUnitLabel(): boolean;
|
|
1717
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RichLegendTileComponent, [{ host: true; }, { optional: true; host: true; }, null]>;
|
|
1718
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RichLegendTileComponent, "nui-rich-legend-tile", never, { "unitLabel": { "alias": "unitLabel"; "required": false; }; "value": { "alias": "value"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, ["*", "[leftEdge]", "[rightEdge]", "[top]", "[bottom]"], false, never>;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
declare class ChartComponent implements OnInit, AfterContentInit, AfterViewInit, OnDestroy, IChartComponent, OnChanges {
|
|
1722
|
+
private elRef;
|
|
1723
|
+
private ngZone;
|
|
1724
|
+
private cd;
|
|
1725
|
+
chart: IChart;
|
|
1726
|
+
resizeObserver?: ResizeObserver;
|
|
1727
|
+
private resizeHandler;
|
|
1728
|
+
private intersectionObserver;
|
|
1729
|
+
constructor(elRef: ElementRef, ngZone: NgZone, cd: ChangeDetectorRef);
|
|
1730
|
+
ngOnInit(): void;
|
|
1731
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1732
|
+
ngAfterContentInit(): void;
|
|
1733
|
+
ngAfterViewInit(): void;
|
|
1734
|
+
ngOnDestroy(): void;
|
|
1735
|
+
redraw: () => void;
|
|
1736
|
+
private intersectionObserverCallback;
|
|
1737
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartComponent, never>;
|
|
1738
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartComponent, "nui-chart", never, { "chart": { "alias": "chart"; "required": false; }; }, {}, never, never, false, never>;
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
/**
|
|
1742
|
+
* @ignore
|
|
1743
|
+
*
|
|
1744
|
+
* Chart collection takes care of charts grouping and rebroadcasting selected events coming from one charts to other charts
|
|
1745
|
+
*/
|
|
1746
|
+
declare class ChartCollection {
|
|
1747
|
+
lastIndex: number;
|
|
1748
|
+
/**
|
|
1749
|
+
* These events will be rebroadcasted to other charts in the collection
|
|
1750
|
+
*
|
|
1751
|
+
* @type {[string]}
|
|
1752
|
+
*/
|
|
1753
|
+
events: string[];
|
|
1754
|
+
private charts;
|
|
1755
|
+
private subscriptions;
|
|
1756
|
+
private eventBus?;
|
|
1757
|
+
constructor();
|
|
1758
|
+
/**
|
|
1759
|
+
* Register chart in this collection and subscribe to all configured events
|
|
1760
|
+
*
|
|
1761
|
+
* @param {IChart} chart
|
|
1762
|
+
*/
|
|
1763
|
+
addChart(chart: IChart): void;
|
|
1764
|
+
/**
|
|
1765
|
+
* Removed chart from the collection and unsubscribes all related subscriptions
|
|
1766
|
+
*
|
|
1767
|
+
* @param {IChart} chart
|
|
1768
|
+
*/
|
|
1769
|
+
removeChart(chart: IChart): void;
|
|
1770
|
+
/**
|
|
1771
|
+
* Destroy this collection and release related resources
|
|
1772
|
+
*/
|
|
1773
|
+
destroy(): void;
|
|
1774
|
+
private initializeEventBus;
|
|
1775
|
+
/**
|
|
1776
|
+
* Register subscription for given chart key on given observable
|
|
1777
|
+
*
|
|
1778
|
+
* @param {string} chartKey
|
|
1779
|
+
* @param {Observable<any>} observable
|
|
1780
|
+
* @param {(value: any) => void} next
|
|
1781
|
+
*/
|
|
1782
|
+
private subscribe;
|
|
1783
|
+
/**
|
|
1784
|
+
* Unsubscribes subscriptions that belong to given chart key
|
|
1785
|
+
*
|
|
1786
|
+
* @param {string} chartKey
|
|
1787
|
+
*/
|
|
1788
|
+
private unsubscribeChart;
|
|
1789
|
+
private getChartKey;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
/**
|
|
1793
|
+
* This service registers collections of charts identified by given id. It is used primarily by the ChartCollectionId directive.
|
|
1794
|
+
*/
|
|
1795
|
+
declare class ChartCollectionService {
|
|
1796
|
+
private collections;
|
|
1797
|
+
getChartCollection(collectionId: string): ChartCollection;
|
|
1798
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartCollectionService, never>;
|
|
1799
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ChartCollectionService>;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
/**
|
|
1803
|
+
* This directive represents a grouping behavior that is separated from chart components. Any chart component
|
|
1804
|
+
* registering the CHART_COMPONENT provider can be injected into this.
|
|
1805
|
+
*
|
|
1806
|
+
* A group of charts with the same associated chart collection id will share events broadcasted through their event buses.
|
|
1807
|
+
*/
|
|
1808
|
+
declare class ChartCollectionIdDirective implements OnChanges {
|
|
1809
|
+
private chartComponent;
|
|
1810
|
+
private chartCollectionService;
|
|
1811
|
+
collectionId: string;
|
|
1812
|
+
constructor(chartComponent: IChartComponent, chartCollectionService: ChartCollectionService);
|
|
1813
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1814
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChartCollectionIdDirective, never>;
|
|
1815
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChartCollectionIdDirective, "[nuiChartCollectionId]", never, { "collectionId": { "alias": "nuiChartCollectionId"; "required": false; }; }, {}, never, never, false, never>;
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
declare class NuiChartsModule {
|
|
1819
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NuiChartsModule, never>;
|
|
1820
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NuiChartsModule, [typeof LegendComponent, typeof LegendSeriesComponent, typeof BasicLegendTileComponent, typeof RichLegendTileComponent, typeof ChartComponent, typeof ChartCollectionIdDirective, typeof ChartMarkerComponent, typeof ChartPopoverComponent, typeof ChartDonutContentComponent, typeof ChartTooltipsComponent, typeof ChartTooltipComponent, typeof ChartTooltipDirective], [typeof i13.NuiCommonModule, typeof i13.NuiIconModule, typeof i13.NuiPopoverModule, typeof i14.OverlayModule], [typeof LegendComponent, typeof LegendSeriesComponent, typeof RichLegendTileComponent, typeof BasicLegendTileComponent, typeof ChartComponent, typeof ChartCollectionIdDirective, typeof ChartMarkerComponent, typeof ChartPopoverComponent, typeof ChartDonutContentComponent, typeof ChartTooltipsComponent, typeof ChartTooltipComponent, typeof ChartTooltipDirective]>;
|
|
1821
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NuiChartsModule>;
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
/**
|
|
1825
|
+
* Configuration for a gauge
|
|
1826
|
+
*/
|
|
1827
|
+
interface IGaugeConfig {
|
|
1828
|
+
/** The value of the gauge */
|
|
1829
|
+
value: number;
|
|
1830
|
+
/** The max value of the gauge */
|
|
1831
|
+
max: number;
|
|
1832
|
+
/** Optional threshold configuration */
|
|
1833
|
+
thresholds?: IGaugeThresholdsConfig;
|
|
1834
|
+
/** Optional configuration for value labels (currently only used for thresholds) */
|
|
1835
|
+
labels?: IGaugeLabelsConfig;
|
|
1836
|
+
/** The color to display for the quantity when no threshold is active */
|
|
1837
|
+
defaultQuantityColor?: string;
|
|
1838
|
+
/** The color to display for the unfilled segment */
|
|
1839
|
+
remainderColor?: string;
|
|
1840
|
+
/** Used for linear gauges; sets the thickness of the bar. */
|
|
1841
|
+
linearThickness?: number;
|
|
1842
|
+
}
|
|
1843
|
+
/**
|
|
1844
|
+
* Configuration for a gauge's thresholds
|
|
1845
|
+
*/
|
|
1846
|
+
interface IGaugeThresholdsConfig {
|
|
1847
|
+
/** An array of the gauge's threshold definitions */
|
|
1848
|
+
definitions: GaugeThresholdDefs;
|
|
1849
|
+
/** Set to true to disable the threshold markers */
|
|
1850
|
+
disableMarkers?: boolean;
|
|
1851
|
+
/** The radius of the threshold marker dots */
|
|
1852
|
+
markerRadius?: number;
|
|
1853
|
+
/** Boolean indicating whether the threshold trigger direction should be reversed */
|
|
1854
|
+
reversed?: boolean;
|
|
1855
|
+
}
|
|
1856
|
+
/**
|
|
1857
|
+
* Configuration for a gauge's value labels (currently only used for threshold markers)
|
|
1858
|
+
*/
|
|
1859
|
+
interface IGaugeLabelsConfig {
|
|
1860
|
+
/**
|
|
1861
|
+
* Optional custom formatter for the value labels (currently only threshold labels are supported)
|
|
1862
|
+
*/
|
|
1863
|
+
formatter?: Formatter<any>;
|
|
1864
|
+
/**
|
|
1865
|
+
* Amount of space (in pixels) to reserve on the side of the grid for the labels.
|
|
1866
|
+
* For the donut gauge, the clearance is applied to all sides; for the linear gauge
|
|
1867
|
+
* the clearance is applied only to the side on which the labels appear.
|
|
1868
|
+
*/
|
|
1869
|
+
clearance?: number;
|
|
1870
|
+
/**
|
|
1871
|
+
* Currently only supported on linear gauges. Set this to true to change the side of the gauge
|
|
1872
|
+
* that the labels appear on. When false, the default sides are right for vertical gauge
|
|
1873
|
+
* and bottom for horizontal gauge.
|
|
1874
|
+
*/
|
|
1875
|
+
flipped?: boolean;
|
|
1876
|
+
}
|
|
1877
|
+
/**
|
|
1878
|
+
* Map of threshold IDs to IGaugeThresholdDef objects
|
|
1879
|
+
*/
|
|
1880
|
+
type GaugeThresholdDefs = Record<string, IGaugeThresholdDef>;
|
|
1881
|
+
/**
|
|
1882
|
+
* Configuration definition for a gauge threshold
|
|
1883
|
+
*/
|
|
1884
|
+
interface IGaugeThresholdDef {
|
|
1885
|
+
/** The ID of the threshold */
|
|
1886
|
+
id: string;
|
|
1887
|
+
/** The value of the threshold */
|
|
1888
|
+
value: number;
|
|
1889
|
+
/** Boolean indicating whether the threshold is enabled */
|
|
1890
|
+
enabled: boolean;
|
|
1891
|
+
/** String indicating the display color of the threshold */
|
|
1892
|
+
color: string;
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* Interface for a gauge threshold datum
|
|
1896
|
+
*/
|
|
1897
|
+
interface IGaugeThresholdDatum extends IGaugeThresholdDef {
|
|
1898
|
+
/** Boolean indicating whether the threshold is hit */
|
|
1899
|
+
hit?: boolean;
|
|
1900
|
+
/** Additional metadata as needed */
|
|
1901
|
+
[key: string]: any;
|
|
1902
|
+
}
|
|
1903
|
+
/**
|
|
1904
|
+
* Data used for visualizing thresholds on a gauge
|
|
1905
|
+
*/
|
|
1906
|
+
interface IGaugeThresholdsData {
|
|
1907
|
+
/** A collection of thresholds */
|
|
1908
|
+
thresholds: IGaugeThresholdDatum[];
|
|
1909
|
+
/** The currently active threshold */
|
|
1910
|
+
activeThreshold?: IGaugeThresholdDatum;
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
/**
|
|
1914
|
+
* Interface representing the spark chart assist's
|
|
1915
|
+
* association between one of its charts and a series set
|
|
1916
|
+
*/
|
|
1917
|
+
interface ISpark<TA extends IAccessors> {
|
|
1918
|
+
chartSeriesSet: IChartAssistSeries<TA>[];
|
|
1919
|
+
id?: string;
|
|
1920
|
+
chart?: IChart;
|
|
1921
|
+
}
|
|
1922
|
+
/**
|
|
1923
|
+
* Interface representing an assistant that aids in chart usage
|
|
1924
|
+
*/
|
|
1925
|
+
interface IChartAssist {
|
|
1926
|
+
/**
|
|
1927
|
+
* Updates the series set for the chart assist's associated chart
|
|
1928
|
+
*
|
|
1929
|
+
* @param inputSeriesSet The updated set of series
|
|
1930
|
+
*/
|
|
1931
|
+
update(inputSeriesSet: IChartAssistSeries<IAccessors>[]): void;
|
|
1932
|
+
/**
|
|
1933
|
+
* Gets the current highlighted value for the specified series
|
|
1934
|
+
*
|
|
1935
|
+
* @param {IChartSeries<IAccessors>} chartSeries The chart series to get the highlighted value for
|
|
1936
|
+
* @param {string} scaleKey The key for the datapoint value scale
|
|
1937
|
+
* @param {string} [formatterName] The name of the formatter if a custom formatter name is set on the scale
|
|
1938
|
+
*
|
|
1939
|
+
* @returns {string} The highlighted value
|
|
1940
|
+
*/
|
|
1941
|
+
getHighlightedValue(chartSeries: IChartSeries<IAccessors>, scaleKey: string, formatterName?: string): string | number | undefined;
|
|
1942
|
+
/**
|
|
1943
|
+
* Returns visible series that are represented by a legend
|
|
1944
|
+
*/
|
|
1945
|
+
getVisibleSeriesWithLegend(): IChartAssistSeries<IAccessors>[];
|
|
1946
|
+
}
|
|
1947
|
+
/** Event types that can be emitted from a chart assist */
|
|
1948
|
+
declare enum ChartAssistEventType {
|
|
1949
|
+
ToggleSeries = "ToggleSeries",
|
|
1950
|
+
ResetVisibleSeries = "ResetVisibleSeries",
|
|
1951
|
+
EmphasizeSeries = "EmphasizeSeries"
|
|
1952
|
+
}
|
|
1953
|
+
/** Interface for chart assist events */
|
|
1954
|
+
interface IChartAssistEvent {
|
|
1955
|
+
type: ChartAssistEventType;
|
|
1956
|
+
payload: any;
|
|
1957
|
+
}
|
|
1958
|
+
/**
|
|
1959
|
+
* Legend interaction assist uses this class to present the state that consists of emphasisState+visible as one state
|
|
1960
|
+
*/
|
|
1961
|
+
declare class ChartAssistRenderStateData implements IRenderStateData {
|
|
1962
|
+
seriesId: string;
|
|
1963
|
+
series: IChartAssistSeries<IAccessors>;
|
|
1964
|
+
emphasisState: RenderState;
|
|
1965
|
+
visible: boolean;
|
|
1966
|
+
constructor(seriesId: string, series: IChartAssistSeries<IAccessors>, emphasisState?: RenderState, visible?: boolean);
|
|
1967
|
+
get state(): RenderState;
|
|
1968
|
+
}
|
|
1969
|
+
type IRenderStatesIndex = Record<string, ChartAssistRenderStateData>;
|
|
1970
|
+
|
|
1971
|
+
/**
|
|
1972
|
+
* Helper class that helps to bootstrap a chart with legend, using data pre-processor.
|
|
1973
|
+
* It will use the most common settings.
|
|
1974
|
+
*/
|
|
1975
|
+
declare class ChartAssist<T extends IAccessors = IAccessors> implements IChartAssist {
|
|
1976
|
+
chart: IChart;
|
|
1977
|
+
palette: IChartPalette;
|
|
1978
|
+
markers: IValueProvider<IChartMarker>;
|
|
1979
|
+
/**
|
|
1980
|
+
* Retrieves the display value for a data point on the specified series
|
|
1981
|
+
*
|
|
1982
|
+
* @param chartSeries The series containing the data point to get a label for
|
|
1983
|
+
* @param dataPoint The data point to get a label for
|
|
1984
|
+
* @param scaleKey The key for the scale potentially containing a formatter that can be used to format the label
|
|
1985
|
+
* @param formatterName The name of the formatter to use for formatting the label
|
|
1986
|
+
* @param dataAccessorKey The accessor key to use for accessing the data value if the accessor key differs from the scale key
|
|
1987
|
+
*
|
|
1988
|
+
* @returns The display value for a data point
|
|
1989
|
+
*/
|
|
1990
|
+
static getLabel(chartSeries: IChartSeries<IAccessors>, dataPoint: any, scaleKey: string, formatterName?: string, dataAccessorKey?: string): any;
|
|
1991
|
+
highlightedDataPoints: IDataPointsPayload;
|
|
1992
|
+
isLegendActive: boolean;
|
|
1993
|
+
inputSeriesSet: IChartAssistSeries<IAccessors>[];
|
|
1994
|
+
legendSeriesSet: IChartAssistSeries<IAccessors>[];
|
|
1995
|
+
/**
|
|
1996
|
+
* Subject for subscribing to IChartAssistEvents such as
|
|
1997
|
+
* ToggleSeries, EmphasizeSeries, and ResetVisibleSeries
|
|
1998
|
+
*/
|
|
1999
|
+
chartAssistSubject: Subject<IChartAssistEvent>;
|
|
2000
|
+
private syncHandlerMap;
|
|
2001
|
+
private getVisibleSeriesWithLegendBackup;
|
|
2002
|
+
private syncSubscription;
|
|
2003
|
+
private legendInteractionAssist;
|
|
2004
|
+
onEvent: (event: IChartEvent) => void;
|
|
2005
|
+
constructor(chart: IChart, seriesProcessor?: (series: IChartAssistSeries<T>[]) => IChartAssistSeries<T>[], palette?: IChartPalette, markers?: IValueProvider<IChartMarker>);
|
|
2006
|
+
get renderStatesIndex(): IRenderStatesIndex;
|
|
2007
|
+
/**
|
|
2008
|
+
* Convenience stream of highlight events that can be used to populate legend.
|
|
2009
|
+
* 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),
|
|
2010
|
+
* otherwise it'll return null
|
|
2011
|
+
* @param chartSeries
|
|
2012
|
+
*/
|
|
2013
|
+
legendLabelData$(chartSeries: IChartSeries<IAccessors>): Observable<any>;
|
|
2014
|
+
seriesProcessor(series: IChartAssistSeries<IAccessors>[]): IChartAssistSeries<IAccessors>[];
|
|
2015
|
+
update(inputSeriesSet: IChartAssistSeries<IAccessors>[], updateLegend?: boolean): void;
|
|
2016
|
+
toggleSeries: (seriesId: string, visible: boolean) => void;
|
|
2017
|
+
/**
|
|
2018
|
+
* Resets all visible series to default state
|
|
2019
|
+
*/
|
|
2020
|
+
resetVisibleSeries: () => void;
|
|
2021
|
+
/**
|
|
2022
|
+
* For series that are currently visible, emphasize the given series and deemphasizes all the other ones
|
|
2023
|
+
*
|
|
2024
|
+
* @param seriesId
|
|
2025
|
+
*/
|
|
2026
|
+
emphasizeSeries: (seriesId: string) => void;
|
|
2027
|
+
isSeriesHidden(seriesId: string): boolean;
|
|
2028
|
+
seriesTrackByFn(index: number, item: IChartAssistSeries<IAccessors>): string;
|
|
2029
|
+
/**
|
|
2030
|
+
* Retrieves the display value for the highlighted data point on the specified series
|
|
2031
|
+
*
|
|
2032
|
+
* @param chartSeries The series containing the highlighted data point to get a label for
|
|
2033
|
+
* @param scaleKey The key for the scale potentially containing a formatter that can be used to format the label
|
|
2034
|
+
* @param formatterName The name of the formatter to use for formatting the label
|
|
2035
|
+
* @param dataAccessorKey The accessor key to use for accessing the data value if the accessor key differs from the scale key
|
|
2036
|
+
*
|
|
2037
|
+
* @returns The display value for the highlighted data point
|
|
2038
|
+
*/
|
|
2039
|
+
getHighlightedValue(chartSeries: IChartSeries<IAccessors>, scaleKey: string, formatterName?: string, dataAccessorKey?: string): string | number | undefined;
|
|
2040
|
+
getVisibleSeriesWithLegend: () => IChartAssistSeries<IAccessors<any>>[];
|
|
2041
|
+
/**
|
|
2042
|
+
* Synchronize this chart assist's actions with IChartAssistEvents emitted by the specified
|
|
2043
|
+
* chart assist, and override this chart assist's getVisibleSeriesWithLegend method with the
|
|
2044
|
+
* specified chart assist's getVisibleSeriesWithLegend.
|
|
2045
|
+
*
|
|
2046
|
+
* Note: If the chart instance of the specified chart assist is replaced by a new chart,
|
|
2047
|
+
* this method must be invoked again to resume synchronized behavior.
|
|
2048
|
+
*
|
|
2049
|
+
* @param {ChartAssist} chartAssist The chart assist to synchronize with
|
|
2050
|
+
*/
|
|
2051
|
+
syncWithChartAssist(chartAssist: ChartAssist): void;
|
|
2052
|
+
/**
|
|
2053
|
+
* Unsynchronize this chart assist's actions from those of the chart assist
|
|
2054
|
+
* specified in a previous syncWithChartAssist call, and restore this chart
|
|
2055
|
+
* assist's getVisibleSeriesWithLegend method with the instance used before
|
|
2056
|
+
* syncWithChartAssist was called.
|
|
2057
|
+
*/
|
|
2058
|
+
unsyncChartAssist(): void;
|
|
2059
|
+
private configureChartEventSubscriptions;
|
|
2060
|
+
private publishRenderStates;
|
|
2061
|
+
}
|
|
2062
|
+
declare class LegendInteractionAssist {
|
|
2063
|
+
private chartAssist;
|
|
2064
|
+
private seriesGroups;
|
|
2065
|
+
private seriesIndex;
|
|
2066
|
+
renderStatesIndex: IRenderStatesIndex;
|
|
2067
|
+
constructor(chartAssist: ChartAssist);
|
|
2068
|
+
update(seriesSet: IChartAssistSeries<IAccessors>[]): void;
|
|
2069
|
+
getSeriesStates(): IRenderStateData[];
|
|
2070
|
+
isSeriesHidden(seriesId: string): boolean;
|
|
2071
|
+
private getSeriesGroups;
|
|
2072
|
+
/**
|
|
2073
|
+
* @param groupId id of the parent series
|
|
2074
|
+
* @param renderState
|
|
2075
|
+
*/
|
|
2076
|
+
setGroupState(groupId: string, renderState: RenderState): void;
|
|
2077
|
+
/**
|
|
2078
|
+
* @param groupId id of the parent series
|
|
2079
|
+
* @param visible
|
|
2080
|
+
*/
|
|
2081
|
+
setGroupVisibility(groupId: string, visible: boolean): void;
|
|
2082
|
+
emphasizeSeries(seriesId: string): void;
|
|
2083
|
+
resetSeries(): void;
|
|
2084
|
+
private setRenderState;
|
|
2085
|
+
private setVisibility;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
/**
|
|
2089
|
+
* Configuration for the gauge labels plugins
|
|
2090
|
+
*/
|
|
2091
|
+
interface IGaugeLabelsPluginConfig {
|
|
2092
|
+
/** Set the distance of the labels from the gauge (in pixels). */
|
|
2093
|
+
padding?: number;
|
|
2094
|
+
/** The name of the label formatter */
|
|
2095
|
+
formatterName?: string;
|
|
2096
|
+
/** Set whether labels should be disabled for the thresholds when the gauge is hovered. */
|
|
2097
|
+
disableThresholdLabels?: boolean;
|
|
2098
|
+
/**
|
|
2099
|
+
* Currently only supported on linear gauges. Set this to true to change the side
|
|
2100
|
+
* of the gauge that the labels appear on.
|
|
2101
|
+
*/
|
|
2102
|
+
flippedLabels?: boolean;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
/**
|
|
2106
|
+
* A chart plugin that handles the rendering of labels for a donut gauge
|
|
2107
|
+
*/
|
|
2108
|
+
declare class DonutGaugeLabelsPlugin extends ChartPlugin {
|
|
2109
|
+
config: IGaugeLabelsPluginConfig;
|
|
2110
|
+
static readonly MARGIN_DEFAULT = 25;
|
|
2111
|
+
/** The default plugin configuration */
|
|
2112
|
+
DEFAULT_CONFIG: IGaugeLabelsPluginConfig;
|
|
2113
|
+
private readonly destroy$;
|
|
2114
|
+
private lasagnaLayer;
|
|
2115
|
+
constructor(config?: IGaugeLabelsPluginConfig);
|
|
2116
|
+
initialize(): void;
|
|
2117
|
+
update(): void;
|
|
2118
|
+
updateDimensions(): void;
|
|
2119
|
+
destroy(): void;
|
|
2120
|
+
private drawThresholdLabels;
|
|
2121
|
+
private getTextAnchor;
|
|
2122
|
+
private getAlignmentBaseline;
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
/**
|
|
2126
|
+
* A chart plugin that handles the rendering of labels for a donut gauge
|
|
2127
|
+
*/
|
|
2128
|
+
declare class LinearGaugeLabelsPlugin extends ChartPlugin {
|
|
2129
|
+
config: IGaugeLabelsPluginConfig;
|
|
2130
|
+
/** The default plugin configuration */
|
|
2131
|
+
DEFAULT_CONFIG: IGaugeLabelsPluginConfig;
|
|
2132
|
+
private readonly destroy$;
|
|
2133
|
+
private lasagnaLayer;
|
|
2134
|
+
private isHorizontal;
|
|
2135
|
+
private thresholdsSeries;
|
|
2136
|
+
constructor(config?: IGaugeLabelsPluginConfig);
|
|
2137
|
+
initialize(): void;
|
|
2138
|
+
update(): void;
|
|
2139
|
+
updateDimensions(): void;
|
|
2140
|
+
destroy(): void;
|
|
2141
|
+
private updateData;
|
|
2142
|
+
private drawThresholdLabels;
|
|
2143
|
+
private xTranslate;
|
|
2144
|
+
private yTranslate;
|
|
2145
|
+
private getLabelOffset;
|
|
2146
|
+
private getTextAnchor;
|
|
2147
|
+
private getAlignmentBaseline;
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
/**
|
|
2151
|
+
* @ignore
|
|
2152
|
+
* Attributes needed by a gauge
|
|
2153
|
+
*/
|
|
2154
|
+
interface IGaugeRenderingAttributes {
|
|
2155
|
+
/** Accessors for the gauge quantity segment */
|
|
2156
|
+
quantityAccessors: IAccessors;
|
|
2157
|
+
/** Accessors for the gauge remainder segment */
|
|
2158
|
+
remainderAccessors: IAccessors;
|
|
2159
|
+
/** Scales for the gauge */
|
|
2160
|
+
scales: Scales;
|
|
2161
|
+
/** Renderer for the primary gauge visualization */
|
|
2162
|
+
mainRenderer: Renderer<IAccessors>;
|
|
2163
|
+
/** Renderer for the gauge threshold visualization */
|
|
2164
|
+
thresholdsRenderer: Renderer<IAccessors>;
|
|
2165
|
+
}
|
|
2166
|
+
/**
|
|
2167
|
+
* @ignore
|
|
2168
|
+
* Interface for an object that can be used to create the rendering attributes needed by a gauge
|
|
2169
|
+
*/
|
|
2170
|
+
interface IGaugeRenderingTools {
|
|
2171
|
+
/** Function for creating quantity accessors */
|
|
2172
|
+
quantityAccessorFunction: () => IAccessors;
|
|
2173
|
+
/** Function for creating remainder accessors */
|
|
2174
|
+
remainderAccessorFunction: () => IAccessors;
|
|
2175
|
+
/** Function for creating scales */
|
|
2176
|
+
scaleFunction: () => Scales | IRadialScales;
|
|
2177
|
+
/** Function for creating a main renderer */
|
|
2178
|
+
mainRendererFunction: () => Renderer<IAccessors>;
|
|
2179
|
+
/** Function for creating a thresholds renderer */
|
|
2180
|
+
thresholdsRendererFunction: () => Renderer<IAccessors>;
|
|
2181
|
+
}
|
|
2182
|
+
/**
|
|
2183
|
+
* Convenience utility for simplifying gauge usage
|
|
2184
|
+
*/
|
|
2185
|
+
declare class GaugeUtil {
|
|
2186
|
+
/** Value used for unifying the linear-style gauge visualization into a single bar stack */
|
|
2187
|
+
static readonly DATA_CATEGORY = "gauge";
|
|
2188
|
+
/**
|
|
2189
|
+
* Creates a ChartAssist pre-configured based on the provided IGaugeConfig and GaugeMode
|
|
2190
|
+
*
|
|
2191
|
+
* @param gaugeConfig The gauge configuration
|
|
2192
|
+
* @param mode The gauge mode
|
|
2193
|
+
* @param labelsPlugin Optional labels plugin for direct control of label configuration. If not provided, a plugin will
|
|
2194
|
+
* be generated automatically.
|
|
2195
|
+
*
|
|
2196
|
+
* @returns {ChartAssist} A pre-configured chart assist
|
|
2197
|
+
*/
|
|
2198
|
+
static createChartAssist(gaugeConfig: IGaugeConfig, mode: GaugeMode, labelsPlugin?: DonutGaugeLabelsPlugin | LinearGaugeLabelsPlugin): ChartAssist;
|
|
2199
|
+
/**
|
|
2200
|
+
* Assembles a gauge series set with all of the standard scales, renderers, accessors, etc. needed for creating a gauge visualization
|
|
2201
|
+
*
|
|
2202
|
+
* @param gaugeConfig The configuration for the gauge
|
|
2203
|
+
* @param mode The mode of the gauge (Donut, Horizontal, or Vertical)
|
|
2204
|
+
*
|
|
2205
|
+
* @returns {IChartAssistSeries<IAccessors>[]} The assembled series set
|
|
2206
|
+
*/
|
|
2207
|
+
static assembleSeriesSet(gaugeConfig: IGaugeConfig, mode: GaugeMode): IChartAssistSeries<IAccessors>[];
|
|
2208
|
+
/**
|
|
2209
|
+
* Updates the series set based on the provided configuration
|
|
2210
|
+
*
|
|
2211
|
+
* @param seriesSet The set of series to update
|
|
2212
|
+
* @param gaugeConfig The configuration for the gauge
|
|
2213
|
+
*
|
|
2214
|
+
* @returns {IChartAssistSeries<IAccessors>[]} The updated series set
|
|
2215
|
+
*/
|
|
2216
|
+
static update(seriesSet: IChartAssistSeries<IAccessors>[], gaugeConfig: IGaugeConfig): IChartAssistSeries<IAccessors>[];
|
|
2217
|
+
/**
|
|
2218
|
+
* Convenience function for creating a standard standard set of threshold configs. Includes configurations for warning and error thresholds.
|
|
2219
|
+
*
|
|
2220
|
+
* @param warningVal Value for the warning threshold
|
|
2221
|
+
* @param criticalVal Value for the critical threshold
|
|
2222
|
+
*
|
|
2223
|
+
* @returns {IGaugeThresholdsConfig} The thresholds configuration
|
|
2224
|
+
*/
|
|
2225
|
+
static createStandardThresholdsConfig(warningVal: number, criticalVal: number): IGaugeThresholdsConfig;
|
|
2226
|
+
/**
|
|
2227
|
+
* Gets a new instance of the provided grid margin with updated values (if needed) to accommodate the label clearance specified
|
|
2228
|
+
* in the provided gauge configuration
|
|
2229
|
+
*
|
|
2230
|
+
* @param gaugeConfig The gauge's configuration
|
|
2231
|
+
* @param mode The mode of the gauge
|
|
2232
|
+
* @param margin The margin to update
|
|
2233
|
+
*
|
|
2234
|
+
* @returns {IAllAround<number>} The updated margin
|
|
2235
|
+
*/
|
|
2236
|
+
static getMarginForLabelClearance(gaugeConfig: IGaugeConfig, mode: GaugeMode, margin: IAllAround<number>): IAllAround<number>;
|
|
2237
|
+
/**
|
|
2238
|
+
* Generates a set of chart series used for visualizing the gauge's quantity and remainder data
|
|
2239
|
+
*
|
|
2240
|
+
* @param gaugeConfig The configuration for the gauge
|
|
2241
|
+
* @param renderingAttributes The attributes needed to visualized the thresholds
|
|
2242
|
+
* @param activeThreshold The currently active threshold
|
|
2243
|
+
*
|
|
2244
|
+
* @returns {IChartAssistSeries<IAccessors<any>>[]} A set of chart series representing the quantity and remainder data
|
|
2245
|
+
*/
|
|
2246
|
+
static generateQuantityAndRemainderSeriesSet(gaugeConfig: IGaugeConfig, renderingAttributes: IGaugeRenderingAttributes, activeThreshold?: IGaugeThresholdDatum): IChartAssistSeries<IAccessors<any>>[];
|
|
2247
|
+
/**
|
|
2248
|
+
* Generates a series for visualizing the gauge's thresholds
|
|
2249
|
+
*
|
|
2250
|
+
* @param gaugeConfig The configuration for the gauge
|
|
2251
|
+
* @param renderingAttributes The attributes needed to visualized the thresholds
|
|
2252
|
+
*
|
|
2253
|
+
* @returns {IChartAssistSeries<IAccessors>} The threshold series
|
|
2254
|
+
*/
|
|
2255
|
+
static generateThresholdSeries(gaugeConfig: IGaugeConfig, renderingAttributes: IGaugeRenderingAttributes): IChartAssistSeries<IAccessors>;
|
|
2256
|
+
/**
|
|
2257
|
+
* Generates the attributes required to instantiate a standard gauge in the specified mode
|
|
2258
|
+
*
|
|
2259
|
+
* @param gaugeConfig The configuration for the gauge
|
|
2260
|
+
* @param mode The mode of the gauge (Donut, Horizontal, or Vertical)
|
|
2261
|
+
*
|
|
2262
|
+
* @returns {IGaugeRenderingAttributes} The attributes required to instantiate a gauge
|
|
2263
|
+
*/
|
|
2264
|
+
static generateRenderingAttributes(gaugeConfig: IGaugeConfig, mode: GaugeMode): IGaugeRenderingAttributes;
|
|
2265
|
+
/**
|
|
2266
|
+
* Generates rendering tools for standard gauge attributes
|
|
2267
|
+
*
|
|
2268
|
+
* @param gaugeConfig The configuration for the gauge
|
|
2269
|
+
* @param mode The mode of the gauge (Donut, Horizontal, or Vertical)
|
|
2270
|
+
*
|
|
2271
|
+
* @returns {IGaugeRenderingTools} The rendering tools for standard gauge attributes
|
|
2272
|
+
*/
|
|
2273
|
+
static generateRenderingTools(gaugeConfig: IGaugeConfig, mode: GaugeMode): IGaugeRenderingTools;
|
|
2274
|
+
/**
|
|
2275
|
+
* Generates quantity and remainder data in the format needed by the gauge visualization
|
|
2276
|
+
*
|
|
2277
|
+
* @param gaugeConfig The configuration for the gauge
|
|
2278
|
+
*
|
|
2279
|
+
* @returns {Partial<IDataSeries<IAccessors>>[]} Array of partial IDataSeries objects including the 'id' and 'data' properties of the quantity and remainder
|
|
2280
|
+
* series needed by the gauge visualization
|
|
2281
|
+
*/
|
|
2282
|
+
static generateQuantityAndRemainderData(gaugeConfig: IGaugeConfig): Partial<IDataSeries<IAccessors>>[];
|
|
2283
|
+
/**
|
|
2284
|
+
* Generates threshold data in the form needed by the gauge's thresholds visualization
|
|
2285
|
+
*
|
|
2286
|
+
* @param gaugeConfig The configuration for the gauge
|
|
2287
|
+
*
|
|
2288
|
+
* @returns {Partial<IDataSeries<IAccessors, IGaugeThresholdDatum>>} A partial IDataSeries object including the 'id' and 'data' properties of the thresholds
|
|
2289
|
+
* series used for the the gauge's thresholds visualization
|
|
2290
|
+
*/
|
|
2291
|
+
static generateThresholdsData(gaugeConfig: IGaugeConfig): Partial<IDataSeries<IAccessors, IGaugeThresholdDatum>>;
|
|
2292
|
+
/**
|
|
2293
|
+
* Generates visualization-specific thresholds data based on the gauge's configuration
|
|
2294
|
+
*
|
|
2295
|
+
* @param gaugeConfig The gauge configuration
|
|
2296
|
+
*
|
|
2297
|
+
* @returns {IGaugeThresholdsData} Thresholds data modified for use by the gauge visualization
|
|
2298
|
+
*/
|
|
2299
|
+
static prepareThresholdsData(gaugeConfig: IGaugeConfig): IGaugeThresholdsData;
|
|
2300
|
+
private static clampConfigToRange;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
declare class ChartPalette implements IChartPalette {
|
|
2304
|
+
private _standardColors;
|
|
2305
|
+
private _textColors;
|
|
2306
|
+
private _backgroundColors;
|
|
2307
|
+
constructor(colors: string[] | IValueProvider<string>, options?: {
|
|
2308
|
+
backgroundOpacity: number;
|
|
2309
|
+
});
|
|
2310
|
+
get standardColors(): IValueProvider<string>;
|
|
2311
|
+
get backgroundColors(): IValueProvider<string>;
|
|
2312
|
+
get textColors(): IValueProvider<string>;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
/**
|
|
2316
|
+
* This class matches the provided colors to given series.
|
|
2317
|
+
* It keeps track of already given colors to given entities to avoid conflicts.
|
|
2318
|
+
*/
|
|
2319
|
+
declare class MappedValueProvider<T> implements IValueProvider<T> {
|
|
2320
|
+
private valueMap;
|
|
2321
|
+
private defaultValue?;
|
|
2322
|
+
constructor(valueMap: {
|
|
2323
|
+
[key: string]: T;
|
|
2324
|
+
}, defaultValue?: T | undefined);
|
|
2325
|
+
get: (entityId: string) => T | undefined;
|
|
2326
|
+
reset(): void;
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
/**
|
|
2330
|
+
* This class creates a ChartMarker based on provided portion of svg markup
|
|
2331
|
+
*/
|
|
2332
|
+
declare class SvgMarker implements IChartMarker {
|
|
2333
|
+
protected svg: string;
|
|
2334
|
+
protected styledSvg: string;
|
|
2335
|
+
constructor(svg: string);
|
|
2336
|
+
getSvg(): string;
|
|
2337
|
+
setColor(color: string): void;
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
/** Default single-shade color sequence for charts */
|
|
2341
|
+
declare const CHART_PALETTE_CS1: string[];
|
|
2342
|
+
/** Default two-shade color sequence for charts */
|
|
2343
|
+
declare const CHART_PALETTE_CS2: string[];
|
|
2344
|
+
/** Default three-shade color sequence for charts */
|
|
2345
|
+
declare const CHART_PALETTE_CS3: string[];
|
|
2346
|
+
/** @deprecated
|
|
2347
|
+
* Will be removed in v.12
|
|
2348
|
+
* https://jira.solarwinds.com/browse/NUI-4296?jql=text%20~%20%22v11%22
|
|
2349
|
+
*
|
|
2350
|
+
* Default status color sequence for charts */
|
|
2351
|
+
declare const CHART_PALETTE_CS_S: string[];
|
|
2352
|
+
/** Extended status color sequence for charts
|
|
2353
|
+
* It will substitute the default one above in v.12
|
|
2354
|
+
* https://jira.solarwinds.com/browse/NUI-5367
|
|
2355
|
+
*/
|
|
2356
|
+
declare const CHART_PALETTE_CS_S_EXTENDED: string[];
|
|
2357
|
+
/** Default chart marker set */
|
|
2358
|
+
declare const CHART_MARKERS: SvgMarker[];
|
|
2359
|
+
|
|
2360
|
+
/**
|
|
2361
|
+
* This color provider processes values provided by the source provider using the given function.
|
|
2362
|
+
* Examples would be darken, lighten, reduce opacity, etc.
|
|
2363
|
+
*/
|
|
2364
|
+
declare class ProcessedColorProvider implements IValueProvider<string> {
|
|
2365
|
+
private sourceProvider;
|
|
2366
|
+
private fn;
|
|
2367
|
+
private processedColors;
|
|
2368
|
+
constructor(sourceProvider: IValueProvider<string>, fn: (input: string) => string);
|
|
2369
|
+
get: (entityId: string) => string;
|
|
2370
|
+
reset(): void;
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
/**
|
|
2374
|
+
* This class matches the provided instances of type <T> to given series.
|
|
2375
|
+
* It keeps track of already given instances to given entities to avoid conflicts.
|
|
2376
|
+
*/
|
|
2377
|
+
declare class SequentialValueProvider<T> implements IValueProvider<T> {
|
|
2378
|
+
private values;
|
|
2379
|
+
private providedValues;
|
|
2380
|
+
private lastUsedIndex;
|
|
2381
|
+
constructor(values: T[]);
|
|
2382
|
+
get: (entityId: string) => T;
|
|
2383
|
+
reset(): void;
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
/**
|
|
2387
|
+
* This class matches the provided markers to given series.
|
|
2388
|
+
* It keeps track of already given markers to given entities to avoid conflicts.
|
|
2389
|
+
*/
|
|
2390
|
+
declare class SequentialChartMarkerProvider extends SequentialValueProvider<IChartMarker> {
|
|
2391
|
+
private markers;
|
|
2392
|
+
constructor(markers: IChartMarker[]);
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
/**
|
|
2396
|
+
* This class matches the provided colors to given series.
|
|
2397
|
+
* It keeps track of already given colors to given entities to avoid conflicts.
|
|
2398
|
+
*/
|
|
2399
|
+
declare class SequentialColorProvider extends SequentialValueProvider<string> {
|
|
2400
|
+
private colors;
|
|
2401
|
+
constructor(colors: string[]);
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
/**
|
|
2405
|
+
* This color provider calculates foreground color based on contrast ratio of provided colors
|
|
2406
|
+
*/
|
|
2407
|
+
declare class TextColorProvider extends ProcessedColorProvider {
|
|
2408
|
+
constructor(sourceProvider: IValueProvider<string>, colorDefinitions: {
|
|
2409
|
+
light: string;
|
|
2410
|
+
dark: string;
|
|
2411
|
+
});
|
|
2412
|
+
/**
|
|
2413
|
+
* Calculate contrast ratio of two given colors (https://www.w3.org/TR/WCAG20/#contrast-ratiodef)
|
|
2414
|
+
*
|
|
2415
|
+
* @param {RGBColor} color1
|
|
2416
|
+
* @param {RGBColor} color2
|
|
2417
|
+
* @returns {number} luminance ratio
|
|
2418
|
+
*/
|
|
2419
|
+
private getContrastRatio;
|
|
2420
|
+
/**
|
|
2421
|
+
* Calculates relative luminance of given color (https://www.w3.org/TR/WCAG20/relative-luminance.xml)
|
|
2422
|
+
*
|
|
2423
|
+
* @param {RGBColor} rgbColor
|
|
2424
|
+
* @returns {number}
|
|
2425
|
+
*/
|
|
2426
|
+
private getRelativeLuminance;
|
|
2427
|
+
private adjustGamma;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
/**
|
|
2431
|
+
* This class creates a ChartMarker based on provided data for svg path
|
|
2432
|
+
*/
|
|
2433
|
+
declare class PathMarker implements IChartMarker {
|
|
2434
|
+
/** Resulting <path> HTMLElement */
|
|
2435
|
+
element: HTMLElement;
|
|
2436
|
+
protected svg: string;
|
|
2437
|
+
/**
|
|
2438
|
+
* Creates an instance of PathMarker.
|
|
2439
|
+
* @param {string} d value that has to be assigned to 'd' attribute of 'path' element in svg
|
|
2440
|
+
* @memberof PathMarker
|
|
2441
|
+
*/
|
|
2442
|
+
constructor(d: string);
|
|
2443
|
+
setColor(color: string): void;
|
|
2444
|
+
private setAttributes;
|
|
2445
|
+
getSvg(): string;
|
|
2446
|
+
protected updateSvg(): void;
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
declare function defaultColorProvider(): IValueProvider<string>;
|
|
2450
|
+
declare function defaultPalette(): IChartPalette;
|
|
2451
|
+
declare function defaultMarkerProvider(): IValueProvider<IChartMarker>;
|
|
2452
|
+
|
|
2453
|
+
/**
|
|
2454
|
+
* Returns automatically calculated domain for given scaleKey based on given set of chart series. It considers scales with fixed domains for limiting
|
|
2455
|
+
* considered data set.
|
|
2456
|
+
*
|
|
2457
|
+
* @param {IChartSeries<IAccessors>[]} chartSeriesSet
|
|
2458
|
+
* @param {string} scaleKey
|
|
2459
|
+
* @param scale
|
|
2460
|
+
* @returns {[any, any]} domain
|
|
2461
|
+
*/
|
|
2462
|
+
declare const getAutomaticDomain: DomainCalculator;
|
|
2463
|
+
/**
|
|
2464
|
+
* Works like getAutomaticDomain, but also includes provided interval in the calculated result
|
|
2465
|
+
*
|
|
2466
|
+
* @param {[number , number]} interval
|
|
2467
|
+
* @returns {(chartSeriesSet: IChartSeries<IAccessors>[], scaleId: string) => [number , number]} A domain calculator
|
|
2468
|
+
* that includes the specified interval in its calculation
|
|
2469
|
+
*/
|
|
2470
|
+
declare const getAutomaticDomainWithIncludedInterval: (interval: [number, number]) => DomainCalculator;
|
|
2471
|
+
|
|
2472
|
+
declare const getAutomaticDomainWithTicks: (config: IAxisConfig, axisGenerator: any, domainCalculator: DomainCalculator) => IDomainWithTicksCalculator;
|
|
2473
|
+
|
|
2474
|
+
/**
|
|
2475
|
+
* Domain calculator that adds given series to the domain calculation
|
|
2476
|
+
*
|
|
2477
|
+
* @param additionalSeriesFn this function returns series to be added
|
|
2478
|
+
* @param domainCalculator
|
|
2479
|
+
*/
|
|
2480
|
+
declare const domainWithAuxiliarySeries: (additionalSeriesFn: () => IChartSeries<any>[], domainCalculator: DomainCalculator) => (chartSeriesSet: IChartSeries<any>[], scaleId: string, scale: IScale<any>) => any[];
|
|
2481
|
+
|
|
2482
|
+
/**
|
|
2483
|
+
* Merge given domains
|
|
2484
|
+
*
|
|
2485
|
+
* @param domains collected from dataSeries on the chart
|
|
2486
|
+
* @param scale that owns the domains
|
|
2487
|
+
*/
|
|
2488
|
+
declare function mergeDomains(domains: any[][], scale: IScale<any>): any[];
|
|
2489
|
+
|
|
2490
|
+
declare abstract class Scale<T> implements IScale<T> {
|
|
2491
|
+
readonly id: string;
|
|
2492
|
+
domainCalculator: DomainCalculator;
|
|
2493
|
+
formatters: IFormatters<T>;
|
|
2494
|
+
isDomainFixed: boolean;
|
|
2495
|
+
scaleUnits?: UnitOption;
|
|
2496
|
+
isTimeseriesScale: boolean;
|
|
2497
|
+
__domainCalculatedWithTicks?: boolean;
|
|
2498
|
+
private isReversed;
|
|
2499
|
+
protected _fixDomainValues: T[];
|
|
2500
|
+
protected readonly _d3Scale: any;
|
|
2501
|
+
protected constructor(id?: string);
|
|
2502
|
+
/**
|
|
2503
|
+
* Creates a d3 scale based on the scale's type
|
|
2504
|
+
*
|
|
2505
|
+
* @returns {any} A new d3 scale appropriate to the scale type
|
|
2506
|
+
*/
|
|
2507
|
+
protected abstract createD3Scale(): any;
|
|
2508
|
+
abstract convert(value: T): number;
|
|
2509
|
+
abstract invert(coordinate: number): T | undefined;
|
|
2510
|
+
abstract isContinuous(): boolean;
|
|
2511
|
+
/** See {@link IScale#d3Scale} */
|
|
2512
|
+
get d3Scale(): AxisScale<T>;
|
|
2513
|
+
get fixDomainValues(): T[];
|
|
2514
|
+
/** See {@link IScale#setFixDomainValues} */
|
|
2515
|
+
setFixDomainValues(values: T[]): void;
|
|
2516
|
+
/** See {@link IScale#range} */
|
|
2517
|
+
range(): [number, number];
|
|
2518
|
+
range(range: [number, number]): this;
|
|
2519
|
+
/** See {@link IScale#domain} */
|
|
2520
|
+
domain(): T[];
|
|
2521
|
+
domain(domain: T[]): this;
|
|
2522
|
+
/** See {@link IScale#fixDomain} */
|
|
2523
|
+
fixDomain(domain: T[]): this;
|
|
2524
|
+
/** See {@link IScale#reverse} */
|
|
2525
|
+
isDomainValid(): boolean;
|
|
2526
|
+
reverse(): this;
|
|
2527
|
+
/** See {@link IScale#reversed} */
|
|
2528
|
+
reversed(): boolean;
|
|
2529
|
+
reversed(reversed: boolean): this;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
/**
|
|
2533
|
+
* Nova wrapper around [D3's scaleLinear](https://d3indepth.com/scales/#scalelinear)
|
|
2534
|
+
*/
|
|
2535
|
+
declare class LinearScale extends Scale<number> {
|
|
2536
|
+
constructor(id?: string);
|
|
2537
|
+
protected createD3Scale(): any;
|
|
2538
|
+
convert(value: number): number;
|
|
2539
|
+
invert(coordinate: number): number;
|
|
2540
|
+
isContinuous(): boolean;
|
|
2541
|
+
isDomainValid(): boolean;
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
/**
|
|
2545
|
+
* Nova wrapper around [D3's scaleBand](https://d3indepth.com/scales/#scaleband)
|
|
2546
|
+
* A typical use case for a band scale is a bar chart
|
|
2547
|
+
*/
|
|
2548
|
+
declare class BandScale<T = string> extends Scale<T> implements IBandScale<T>, IHasInnerScale<T> {
|
|
2549
|
+
innerScale: IScale<any>;
|
|
2550
|
+
constructor(id?: string);
|
|
2551
|
+
protected createD3Scale(): any;
|
|
2552
|
+
/**
|
|
2553
|
+
* This returns center of a band. To return the beginning of a band, manually subtract this.bandwidth()/2
|
|
2554
|
+
* This differs from the "bandScale.convert" method in d3
|
|
2555
|
+
*
|
|
2556
|
+
* @param {T} value The value to convert
|
|
2557
|
+
* @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.
|
|
2558
|
+
* @returns {number} Center of a band
|
|
2559
|
+
*/
|
|
2560
|
+
convert(value: T, position?: number): number;
|
|
2561
|
+
/**
|
|
2562
|
+
* Converts the specified coordinate into the value of the closest band data point
|
|
2563
|
+
*
|
|
2564
|
+
* @param {number} coordinate The coordinate to convert
|
|
2565
|
+
* @returns {T} The value of the closest band data point
|
|
2566
|
+
*/
|
|
2567
|
+
invert(coordinate: number): T;
|
|
2568
|
+
/** See {@link IScale#range} */
|
|
2569
|
+
range(): [number, number];
|
|
2570
|
+
range(range: [number, number]): this;
|
|
2571
|
+
/**
|
|
2572
|
+
* Gets the rounded setting for the scale
|
|
2573
|
+
*
|
|
2574
|
+
* @returns {boolean} The value indicating whether the scale is rounded
|
|
2575
|
+
*/
|
|
2576
|
+
round(): boolean;
|
|
2577
|
+
/**
|
|
2578
|
+
* Sets whether the scale should be rounded
|
|
2579
|
+
* Rounding helps to have crisp edges https://github.com/d3/d3-scale#band_round
|
|
2580
|
+
*
|
|
2581
|
+
* @param {boolean} round The specified round setting
|
|
2582
|
+
*/
|
|
2583
|
+
round(round: boolean): this;
|
|
2584
|
+
/**
|
|
2585
|
+
* A convenience method for setting the inner and outer padding.
|
|
2586
|
+
* This differs from D3 implementation. We're setting the outer padding to half of the inner padding.
|
|
2587
|
+
*
|
|
2588
|
+
* @param padding Value in [0, 1] interval.
|
|
2589
|
+
*/
|
|
2590
|
+
padding(padding: number): this;
|
|
2591
|
+
/**
|
|
2592
|
+
* Returns the current alignment which defaults to 0.5.
|
|
2593
|
+
*
|
|
2594
|
+
* @returns {number} The current alignment
|
|
2595
|
+
*/
|
|
2596
|
+
align(): number;
|
|
2597
|
+
/**
|
|
2598
|
+
* Sets the alignment to the specified value which must be in the range [0, 1].
|
|
2599
|
+
*
|
|
2600
|
+
* The default is 0.5.
|
|
2601
|
+
*
|
|
2602
|
+
* The alignment determines how any leftover unused space in the range is distributed.
|
|
2603
|
+
* A value of 0.5 indicates that the leftover space should be equally distributed before the first band and
|
|
2604
|
+
* after the last band, i.e. the bands should be centered within the range. A value of 0 or 1 may be used to
|
|
2605
|
+
* shift the bands to one side, say to position them adjacent to an axis.
|
|
2606
|
+
*
|
|
2607
|
+
* @param {number} align Value for alignment setting in [0, 1] interval.
|
|
2608
|
+
*/
|
|
2609
|
+
align(align: number): this;
|
|
2610
|
+
/**
|
|
2611
|
+
* Returns the width of each band (bar).
|
|
2612
|
+
*/
|
|
2613
|
+
bandwidth(): number;
|
|
2614
|
+
/**
|
|
2615
|
+
* Returns the width of each step with paddings.
|
|
2616
|
+
* Please note the fact that bandScale._d3Scale.step() returns step size without outer paddings!
|
|
2617
|
+
*/
|
|
2618
|
+
step(): number;
|
|
2619
|
+
/**
|
|
2620
|
+
* Creates linear scale with domain and range that are equal to current scale's range
|
|
2621
|
+
*/
|
|
2622
|
+
copyToLinear(): LinearScale;
|
|
2623
|
+
/**
|
|
2624
|
+
* Gets the locations for the band ticks
|
|
2625
|
+
*
|
|
2626
|
+
* @returns {number[]} The band tick locations
|
|
2627
|
+
*/
|
|
2628
|
+
bandTicks(): number[];
|
|
2629
|
+
isContinuous(): boolean;
|
|
2630
|
+
private getRangeMidPoints;
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
/** @ignore */
|
|
2634
|
+
declare class PointScale extends Scale<string> {
|
|
2635
|
+
constructor(id?: string);
|
|
2636
|
+
protected createD3Scale(): any;
|
|
2637
|
+
convert(value: string): number;
|
|
2638
|
+
invert(coordinate: number): string;
|
|
2639
|
+
/**
|
|
2640
|
+
* Gets the rounded setting for the scale
|
|
2641
|
+
*
|
|
2642
|
+
* @returns {boolean} The value indicating whether the scale is rounded
|
|
2643
|
+
*/
|
|
2644
|
+
round(): boolean;
|
|
2645
|
+
/**
|
|
2646
|
+
* Sets whether the scale should be rounded
|
|
2647
|
+
* Rounding helps to have crisp edges https://github.com/d3/d3-scale#band_round
|
|
2648
|
+
*
|
|
2649
|
+
* @param {boolean} round The specified round setting
|
|
2650
|
+
*/
|
|
2651
|
+
round(round: boolean): IScale<string>;
|
|
2652
|
+
/**
|
|
2653
|
+
* A convenience method for setting the inner and outer padding.
|
|
2654
|
+
* This differs from D3 implementation. We're setting the outer padding to half of the inner padding.
|
|
2655
|
+
*
|
|
2656
|
+
* @param padding Value in [0, 1] interval.
|
|
2657
|
+
*/
|
|
2658
|
+
padding(padding: number): IScale<string>;
|
|
2659
|
+
/**
|
|
2660
|
+
* Returns the current alignment which defaults to 0.5.
|
|
2661
|
+
*
|
|
2662
|
+
* @returns {number} The current alignment
|
|
2663
|
+
*/
|
|
2664
|
+
align(): number;
|
|
2665
|
+
/**
|
|
2666
|
+
* Sets the alignment to the specified value which must be in the range [0, 1].
|
|
2667
|
+
*
|
|
2668
|
+
* The default is 0.5.
|
|
2669
|
+
*
|
|
2670
|
+
* The alignment determines how any leftover unused space in the range is distributed.
|
|
2671
|
+
* A value of 0.5 indicates that the leftover space should be equally distributed before the first band and
|
|
2672
|
+
* after the last band, i.e. the bands should be centered within the range. A value of 0 or 1 may be used to
|
|
2673
|
+
* shift the bands to one side, say to position them adjacent to an axis.
|
|
2674
|
+
*
|
|
2675
|
+
* @param {number} align Value for alignment setting in [0, 1] interval.
|
|
2676
|
+
*/
|
|
2677
|
+
align(align: number): this;
|
|
2678
|
+
/**
|
|
2679
|
+
* Returns the width of each band
|
|
2680
|
+
*
|
|
2681
|
+
* @returns {number} The width of each band
|
|
2682
|
+
*/
|
|
2683
|
+
bandwidth(): number;
|
|
2684
|
+
isContinuous(): boolean;
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
/**
|
|
2688
|
+
* Nova wrapper around [D3's scaleTime](https://d3indepth.com/scales/#scaletime)
|
|
2689
|
+
*/
|
|
2690
|
+
declare class TimeScale extends Scale<Date> {
|
|
2691
|
+
constructor(id?: string);
|
|
2692
|
+
protected createD3Scale(): AxisScale<Date>;
|
|
2693
|
+
convert(value: Date): number;
|
|
2694
|
+
invert(coordinate: number): Date | undefined;
|
|
2695
|
+
isContinuous(): boolean;
|
|
2696
|
+
isDomainValid(): boolean;
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2699
|
+
declare function isDaylightSavingTime(d: Date): boolean;
|
|
2700
|
+
/**
|
|
2701
|
+
* Scale designed to support regular interval based data.
|
|
2702
|
+
*/
|
|
2703
|
+
declare class TimeIntervalScale extends TimeScale implements IBandScale<Date> {
|
|
2704
|
+
private _bandScale;
|
|
2705
|
+
private _interval;
|
|
2706
|
+
constructor(interval: Duration, id?: string);
|
|
2707
|
+
interval(): Duration;
|
|
2708
|
+
interval(value: Duration): TimeIntervalScale;
|
|
2709
|
+
domain(domain?: Date[]): any;
|
|
2710
|
+
range(range?: [number, number]): any;
|
|
2711
|
+
getBands(): Date[];
|
|
2712
|
+
convert(value: Date, position?: number): number;
|
|
2713
|
+
/**
|
|
2714
|
+
* Converts the specified coordinate into the value of the closest band data point
|
|
2715
|
+
*
|
|
2716
|
+
* @param {number} coordinate The coordinate to convert
|
|
2717
|
+
* @returns {string} The value of the closest band data point
|
|
2718
|
+
*/
|
|
2719
|
+
invert(coordinate: number): Date | undefined;
|
|
2720
|
+
bandwidth(): number;
|
|
2721
|
+
truncToInterval(datetime: Date | undefined, interval: Duration, isDomainChange?: boolean): Date | undefined;
|
|
2722
|
+
isContinuous(): boolean;
|
|
2723
|
+
defaultTitleFormatter: (inputDate: Date) => string;
|
|
2724
|
+
private getBandsForInterval;
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2727
|
+
/**
|
|
2728
|
+
* Formatter for dates
|
|
2729
|
+
*/
|
|
2730
|
+
declare const datetimeFormatter: Formatter<Date>;
|
|
2731
|
+
|
|
2732
|
+
declare class NoopScale<T = string> implements IScale<T> {
|
|
2733
|
+
readonly id: string;
|
|
2734
|
+
formatters: IFormatters<T>;
|
|
2735
|
+
isDomainFixed: boolean;
|
|
2736
|
+
constructor(id?: string);
|
|
2737
|
+
convert(): number;
|
|
2738
|
+
invert(): T;
|
|
2739
|
+
get d3Scale(): AxisScale<T>;
|
|
2740
|
+
range(): [number, number];
|
|
2741
|
+
range(range: [number, number]): this;
|
|
2742
|
+
domain(): T[];
|
|
2743
|
+
domain(domain: T[]): this;
|
|
2744
|
+
fixDomain(domain: any[]): null;
|
|
2745
|
+
isContinuous(): boolean;
|
|
2746
|
+
isDomainValid(): boolean;
|
|
2747
|
+
reverse(): this;
|
|
2748
|
+
reversed(): boolean;
|
|
2749
|
+
reversed(reversed: boolean): this;
|
|
2750
|
+
}
|
|
2751
|
+
|
|
2752
|
+
/**
|
|
2753
|
+
* Apart from just calling scale.convert, this method can also handle multilevel band scales that return arrays of values
|
|
2754
|
+
*
|
|
2755
|
+
* @param scale
|
|
2756
|
+
* @param value
|
|
2757
|
+
* @param {number} position Number in the range of [0, 1] that will define the point inside of the band. Where 0 stands for start.
|
|
2758
|
+
* @param levels how many levels deep can we go during the conversion
|
|
2759
|
+
*/
|
|
2760
|
+
declare function convert(scale: IScale<any>, value: any, position?: number, levels?: number): number;
|
|
2761
|
+
|
|
2762
|
+
declare function invert(scale: IScale<any>, coordinate: number): number | string | unknown[];
|
|
2763
|
+
|
|
2764
|
+
declare class DataSeries implements IDataSeries<IAccessors> {
|
|
2765
|
+
id: string;
|
|
2766
|
+
accessors: {
|
|
2767
|
+
data?: Record<string, DataAccessor | undefined>;
|
|
2768
|
+
series?: Record<string, SeriesAccessor | undefined>;
|
|
2769
|
+
};
|
|
2770
|
+
data: any[];
|
|
2771
|
+
name: string;
|
|
2772
|
+
constructor(dataSeries: IDataSeries<IAccessors>);
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2775
|
+
/**
|
|
2776
|
+
* @ignore
|
|
2777
|
+
*/
|
|
2778
|
+
declare class MouseInteractiveArea<TTarget extends D3Selection<SVGGElement> = D3Selection<SVGGElement>, TInteractiveArea extends D3Selection<SVGRectElement> = D3Selection<SVGRectElement>> {
|
|
2779
|
+
private target;
|
|
2780
|
+
private interactiveArea;
|
|
2781
|
+
private gridMargin?;
|
|
2782
|
+
static CONTAINER_CLASS: string;
|
|
2783
|
+
readonly active: BehaviorSubject<boolean>;
|
|
2784
|
+
readonly interaction: BehaviorSubject<IInteractionEvent>;
|
|
2785
|
+
private isActive;
|
|
2786
|
+
constructor(target: TTarget, interactiveArea: TInteractiveArea, cursor: string, gridMargin?: IAllAround<number> | undefined);
|
|
2787
|
+
onMouseInteraction: (interactionType: InteractionType) => void;
|
|
2788
|
+
onMouseOver: () => void;
|
|
2789
|
+
onMouseOut: () => void;
|
|
2790
|
+
/** @deprecated - Please use 'onMouseOver' instead */
|
|
2791
|
+
onMouseEnter: () => void;
|
|
2792
|
+
/** @deprecated - Please use 'onMouseOut' instead */
|
|
2793
|
+
onMouseLeave: () => void;
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
declare class UtilityService {
|
|
2797
|
+
private static getValueAccessor;
|
|
2798
|
+
static getClosestIndex<T>(haystack: T[], accessor: (d: T, i: number) => any, needle: any): number | undefined;
|
|
2799
|
+
private static getCloser;
|
|
2800
|
+
/**
|
|
2801
|
+
* Clamps given value to range
|
|
2802
|
+
*
|
|
2803
|
+
* @param {number} value
|
|
2804
|
+
* @param {[number , number]} range
|
|
2805
|
+
* @returns {number}
|
|
2806
|
+
*/
|
|
2807
|
+
static clampToRange(value: number, range: [number, number]): number;
|
|
2808
|
+
static uuid(): string;
|
|
2809
|
+
/**
|
|
2810
|
+
* CSS.escape() replacement
|
|
2811
|
+
* @param value
|
|
2812
|
+
* @returns {string}
|
|
2813
|
+
*/
|
|
2814
|
+
static cssEscape(value: any): string;
|
|
2815
|
+
/**
|
|
2816
|
+
* This method performs a binary search to find an index in the `haystack` that is the closest representation of given `needle`.
|
|
2817
|
+
*
|
|
2818
|
+
* @param haystack
|
|
2819
|
+
* @param needle
|
|
2820
|
+
* @param selector this function is used to process the `haystack` elements
|
|
2821
|
+
*/
|
|
2822
|
+
static findNearestIndex<T>(haystack: T[], needle: any, selector?: (d: T, index: number) => any): number;
|
|
2823
|
+
/**
|
|
2824
|
+
* Gets the 'x' and 'y' scale values based on the specified scales and raw x-y coordinates
|
|
2825
|
+
*
|
|
2826
|
+
* @param xScales
|
|
2827
|
+
* @param yScales
|
|
2828
|
+
* @param xCoordinate
|
|
2829
|
+
* @param yCoordinate
|
|
2830
|
+
*/
|
|
2831
|
+
static getXYValues(xScales: IScale<any>[], yScales: IScale<any>[], xCoordinate: number, yCoordinate: number): IInteractionValues;
|
|
2832
|
+
/**
|
|
2833
|
+
* Gets the scale value based on the specified scales and raw coordinate
|
|
2834
|
+
*
|
|
2835
|
+
* @param scales
|
|
2836
|
+
* @param coordinate
|
|
2837
|
+
*/
|
|
2838
|
+
static getScaleValues(scales: IScale<any>[], coordinate: number): Record<string, any>;
|
|
2839
|
+
/**
|
|
2840
|
+
* get values for interaction
|
|
2841
|
+
* @param valueMap map of values by scaleId
|
|
2842
|
+
* @param scaleId preferred scaleId
|
|
2843
|
+
* @returns value from scaleId or first availabel scale
|
|
2844
|
+
*/
|
|
2845
|
+
static getInteractionValues(valueMap: Record<string, any> | null | undefined, scaleId: string): any;
|
|
2846
|
+
}
|
|
2847
|
+
|
|
2848
|
+
/** See {@link IAxisConfig} */
|
|
2849
|
+
declare class AxisConfig implements IAxisConfig {
|
|
2850
|
+
/** See {@link IAxisConfig#visible} */
|
|
2851
|
+
visible: boolean;
|
|
2852
|
+
/** See {@link IAxisConfig#gridTicks} */
|
|
2853
|
+
gridTicks: boolean;
|
|
2854
|
+
/** See {@link IAxisConfig#tickSize} */
|
|
2855
|
+
tickSize: number;
|
|
2856
|
+
/** See {@link IAxisConfig#tickLabel} */
|
|
2857
|
+
tickLabel: ITickLabelConfig;
|
|
2858
|
+
/** See {@link IAxisConfig#fit} */
|
|
2859
|
+
fit: boolean;
|
|
2860
|
+
private _approximateTicks;
|
|
2861
|
+
/** See {@link IAxisConfig#approximateTicks} */
|
|
2862
|
+
get approximateTicks(): any;
|
|
2863
|
+
/** See {@link IAxisConfig#approximateTicks} */
|
|
2864
|
+
set approximateTicks(ticks: any);
|
|
2865
|
+
padding: number;
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
/** @ignore */
|
|
2869
|
+
declare class BorderConfig implements IBorderConfig {
|
|
2870
|
+
className?: string | undefined;
|
|
2871
|
+
color: string;
|
|
2872
|
+
width: number;
|
|
2873
|
+
visible: boolean;
|
|
2874
|
+
constructor(className?: string | undefined);
|
|
2875
|
+
}
|
|
2876
|
+
|
|
2877
|
+
declare class DimensionConfig implements IDimensionConfig {
|
|
2878
|
+
private _width;
|
|
2879
|
+
private _height;
|
|
2880
|
+
/** See {@link IDimensionConfig#margin} */
|
|
2881
|
+
margin: IAllAround<number>;
|
|
2882
|
+
/** See {@link IDimensionConfig#padding} */
|
|
2883
|
+
padding: IAllAround<number>;
|
|
2884
|
+
/** See {@link IDimensionConfig#marginLocked} */
|
|
2885
|
+
marginLocked: IAllAround<boolean>;
|
|
2886
|
+
/** See {@link IDimensionConfig#autoWidth} */
|
|
2887
|
+
autoWidth: boolean;
|
|
2888
|
+
/** See {@link IDimensionConfig#autoHeight} */
|
|
2889
|
+
autoHeight: boolean;
|
|
2890
|
+
/** See {@link IDimensionConfig#width} */
|
|
2891
|
+
width(): number;
|
|
2892
|
+
/** See {@link IDimensionConfig#width} */
|
|
2893
|
+
width(value: number): IDimensionConfig;
|
|
2894
|
+
/** See {@link IDimensionConfig#height} */
|
|
2895
|
+
height(): number;
|
|
2896
|
+
/** See {@link IDimensionConfig#height} */
|
|
2897
|
+
height(value: number): IDimensionConfig;
|
|
2898
|
+
/** See {@link IDimensionConfig#outerWidth} */
|
|
2899
|
+
outerWidth(): number;
|
|
2900
|
+
/** See {@link IDimensionConfig#outerWidth} */
|
|
2901
|
+
outerWidth(value: number): IDimensionConfig;
|
|
2902
|
+
/** See {@link IDimensionConfig#outerHeight} */
|
|
2903
|
+
outerHeight(): number;
|
|
2904
|
+
/** See {@link IDimensionConfig#outerHeight} */
|
|
2905
|
+
outerHeight(value: number): IDimensionConfig;
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
/** See {@link IGridConfig} */
|
|
2909
|
+
declare class GridConfig implements IGridConfig {
|
|
2910
|
+
/** See {@link IGridConfig#interactive} */
|
|
2911
|
+
interactive: boolean;
|
|
2912
|
+
/** See {@link IGridConfig#dimension} */
|
|
2913
|
+
dimension: IDimensionConfig;
|
|
2914
|
+
/** See {@link IGridConfig#borders} */
|
|
2915
|
+
borders: IAllAround<IBorderConfig>;
|
|
2916
|
+
/** See {@link IGridConfig#cursor} */
|
|
2917
|
+
cursor: string;
|
|
2918
|
+
/** See {@link IGridConfig#disableRenderAreaHeightCorrection} */
|
|
2919
|
+
disableRenderAreaHeightCorrection: boolean;
|
|
2920
|
+
/** See {@link IGridConfig#disableRenderAreaWidthCorrection} */
|
|
2921
|
+
disableRenderAreaWidthCorrection: boolean;
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2924
|
+
declare class XYGridConfig extends GridConfig implements IXYGridConfig {
|
|
2925
|
+
/** The default margin */
|
|
2926
|
+
static readonly DEFAULT_MARGIN: IAllAround<number>;
|
|
2927
|
+
static readonly DEFAULT_PADDING: IAllAround<number>;
|
|
2928
|
+
axis: IAllAround<IAxisConfig>;
|
|
2929
|
+
interactionPlugins: boolean;
|
|
2930
|
+
constructor();
|
|
2931
|
+
}
|
|
2932
|
+
|
|
2933
|
+
/**
|
|
2934
|
+
* Assembles a linear-gauge-specific grid configuration
|
|
2935
|
+
*
|
|
2936
|
+
* @param mode vertical or horizontal
|
|
2937
|
+
* @param thickness The thickness of the gauge
|
|
2938
|
+
*
|
|
2939
|
+
* @returns {XYGridConfig} A linear gauge grid configuration
|
|
2940
|
+
*/
|
|
2941
|
+
declare function linearGaugeGridConfig(mode: GaugeMode.Vertical | GaugeMode.Horizontal, thickness?: StandardLinearGaugeThickness): XYGridConfig;
|
|
2942
|
+
|
|
2943
|
+
/**
|
|
2944
|
+
* Pre-defined XYGridConfig for conforming an area chart to Nova UX standards
|
|
2945
|
+
*/
|
|
2946
|
+
declare class AreaGridConfig extends XYGridConfig {
|
|
2947
|
+
constructor();
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
/**
|
|
2951
|
+
* Pre-defined and conforming Nova UX standards configuration of XYGrid for bar chart
|
|
2952
|
+
*/
|
|
2953
|
+
declare class BarGridConfig extends XYGridConfig {
|
|
2954
|
+
constructor();
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
/**
|
|
2958
|
+
* Pre-defined and conforming Nova UX standards configuration of XYGrid for horizontal bar chart
|
|
2959
|
+
*/
|
|
2960
|
+
declare class BarHorizontalGridConfig extends XYGridConfig {
|
|
2961
|
+
constructor();
|
|
2962
|
+
}
|
|
2963
|
+
|
|
2964
|
+
declare class BarStatusGridConfig extends XYGridConfig {
|
|
2965
|
+
constructor(config?: {
|
|
2966
|
+
showBottomAxis: boolean;
|
|
2967
|
+
});
|
|
2968
|
+
}
|
|
2969
|
+
|
|
2970
|
+
/**
|
|
2971
|
+
* Applies spark chart specific grid configuration
|
|
2972
|
+
*
|
|
2973
|
+
* @param c
|
|
2974
|
+
* @param showBottomAxis
|
|
2975
|
+
* @param showTopBorder
|
|
2976
|
+
*/
|
|
2977
|
+
declare function sparkChartGridConfig(c?: XYGridConfig, showBottomAxis?: boolean, showTopBorder?: boolean): XYGridConfig;
|
|
2978
|
+
|
|
2979
|
+
declare const borderMidpoint = 0.5;
|
|
2980
|
+
/**
|
|
2981
|
+
* @implements {IGrid}
|
|
2982
|
+
* Implementation for the dimensions, scaling, interactive area, and borders of a basic grid
|
|
2983
|
+
*/
|
|
2984
|
+
declare abstract class Grid implements IGrid {
|
|
2985
|
+
/** Class name for the grid */
|
|
2986
|
+
static GRID_CLASS_NAME: string;
|
|
2987
|
+
/** Class name applied to each of the grid's borders by default */
|
|
2988
|
+
static DEFAULT_BORDER_CLASS_NAME: string;
|
|
2989
|
+
/** Prefix applied to the rendering area clip path id */
|
|
2990
|
+
static RENDERING_AREA_CLIP_PATH_PREFIX: string;
|
|
2991
|
+
/** Name for the lasagna layer containing the grid's rendered elements */
|
|
2992
|
+
static GRID_ELEMENTS_LAYER_NAME: string;
|
|
2993
|
+
/** Name for the rendering area lasagna layer */
|
|
2994
|
+
static RENDERING_AREA_LAYER_NAME: string;
|
|
2995
|
+
/** @ignore Height correction needed to prevent interaction gap between vertically stacked charts */
|
|
2996
|
+
static RENDER_AREA_HEIGHT_CORRECTION: number;
|
|
2997
|
+
/** @ignore Width correction needed to prevent interaction gap between right side of grid and the edge of the rendering area */
|
|
2998
|
+
static RENDER_AREA_WIDTH_CORRECTION: number;
|
|
2999
|
+
/** @ignore Width correction needed to sync bottom border length and grid width to tick placement */
|
|
3000
|
+
static TICK_DIMENSION_CORRECTION: number;
|
|
3001
|
+
/** Subject for indicating that the chart's dimensions should be updated */
|
|
3002
|
+
updateChartDimensionsSubject: Subject<void>;
|
|
3003
|
+
/** Event bus provided by the chart */
|
|
3004
|
+
eventBus: EventBus<IChartEvent>;
|
|
3005
|
+
/** d3 container for the grid */
|
|
3006
|
+
protected container: D3Selection<SVGGElement>;
|
|
3007
|
+
/** d3 selection for the grid's rendering area clip path */
|
|
3008
|
+
protected renderingAreaClipPath: D3Selection<SVGRectElement>;
|
|
3009
|
+
/** d3 selection for the grid's rendering area */
|
|
3010
|
+
protected renderingArea: D3Selection<SVGRectElement>;
|
|
3011
|
+
/** d3 selection for the grid's interactive area */
|
|
3012
|
+
protected interactiveArea: D3Selection<SVGRectElement>;
|
|
3013
|
+
/** The grid's layer manager */
|
|
3014
|
+
protected lasagna: Lasagna;
|
|
3015
|
+
/** Lasagna layer for the grid's rendered elements */
|
|
3016
|
+
protected gridElementsLayer: Selection<SVGElement, any, SVGElement, any>;
|
|
3017
|
+
/** Definition of the grid's borders as rendered */
|
|
3018
|
+
protected borders: Partial<IBorders>;
|
|
3019
|
+
/** Property value of the grid's scales */
|
|
3020
|
+
protected _scales: ScalesIndex;
|
|
3021
|
+
/** Property value of the grid's configuration */
|
|
3022
|
+
protected _config: IGridConfig;
|
|
3023
|
+
/** Property value of the grid's target d3 selection */
|
|
3024
|
+
protected _target: D3Selection<SVGSVGElement>;
|
|
3025
|
+
/** See {@link IGrid#getInteractiveArea} */
|
|
3026
|
+
getInteractiveArea(): D3Selection<SVGRectElement>;
|
|
3027
|
+
/** See {@link IGrid#getLasagna} */
|
|
3028
|
+
getLasagna(): Lasagna;
|
|
3029
|
+
/** @ignore */
|
|
3030
|
+
set scales(scales: ScalesIndex);
|
|
3031
|
+
/** @ignore */
|
|
3032
|
+
get scales(): ScalesIndex;
|
|
3033
|
+
/** See {@link IGrid#config} */
|
|
3034
|
+
config(): IGridConfig;
|
|
3035
|
+
/** See {@link IGrid#config} */
|
|
3036
|
+
config(config: IGridConfig): this;
|
|
3037
|
+
/** See {@link IGrid#target} */
|
|
3038
|
+
target(): D3Selection<SVGSVGElement>;
|
|
3039
|
+
/** See {@link IGrid#target} */
|
|
3040
|
+
target(target: D3Selection<SVGSVGElement>): IGrid;
|
|
3041
|
+
/** See {@link IGrid#build} */
|
|
3042
|
+
build(): IGrid;
|
|
3043
|
+
/**
|
|
3044
|
+
* Derived classes override this method to build the grid's plugins
|
|
3045
|
+
*
|
|
3046
|
+
* @param {IChart} chart The chart instance to pass to each plugin
|
|
3047
|
+
*
|
|
3048
|
+
* @returns {IChartPlugin[]} Default implementation returns an empty array
|
|
3049
|
+
*/
|
|
3050
|
+
buildPlugins(chart: IChart): IChartPlugin[];
|
|
3051
|
+
/** See {@link IGrid#update} */
|
|
3052
|
+
update(): IGrid;
|
|
3053
|
+
/** See {@link IGrid#updateDimensions} */
|
|
3054
|
+
updateDimensions(dimensions: Partial<IDimensions>): IGrid;
|
|
3055
|
+
/** See {@link IGrid#updateRanges} */
|
|
3056
|
+
updateRanges(): IGrid;
|
|
3057
|
+
/**
|
|
3058
|
+
* Calculate the width correction needed for accommodating grid elements that may extend beyond the chart's configured width
|
|
3059
|
+
*/
|
|
3060
|
+
protected getOuterWidthDimensionCorrection(): number;
|
|
3061
|
+
/**
|
|
3062
|
+
* Builds the grid borders as SVGElements based on the specified configuration
|
|
3063
|
+
*
|
|
3064
|
+
* @param {D3Selection} container d3 container for the borders
|
|
3065
|
+
*
|
|
3066
|
+
* @returns {Partial<IBorders>} The grid's borders
|
|
3067
|
+
*/
|
|
3068
|
+
protected buildBorders(container: D3Selection): Partial<IBorders> | undefined;
|
|
3069
|
+
/**
|
|
3070
|
+
* Adjusts the grid's rendering area and clip path based on the grid's configured width and height
|
|
3071
|
+
*/
|
|
3072
|
+
protected adjustRenderingArea: () => void;
|
|
3073
|
+
/**
|
|
3074
|
+
* Builds the grid's rendering area as a layer on the lasagna
|
|
3075
|
+
*
|
|
3076
|
+
* @param {string} clipPathId The clip path identifier
|
|
3077
|
+
*
|
|
3078
|
+
* @returns {D3Selection} The grid's rendering area
|
|
3079
|
+
*/
|
|
3080
|
+
private buildRenderingArea;
|
|
3081
|
+
/**
|
|
3082
|
+
* Creates a border with the specified configuration in the provided container
|
|
3083
|
+
*
|
|
3084
|
+
* @param {D3Selection} container The container to append the border to
|
|
3085
|
+
* @param {IBorderConfig} config The configuration to apply to the border
|
|
3086
|
+
*
|
|
3087
|
+
* @returns {SVGElement} The created border
|
|
3088
|
+
*/
|
|
3089
|
+
private createBorder;
|
|
3090
|
+
protected updateBottomBorder(): void;
|
|
3091
|
+
/**
|
|
3092
|
+
* Updates the d3 line positioning and visibility attributes of each of the configured borders
|
|
3093
|
+
*/
|
|
3094
|
+
protected updateBorders(): void;
|
|
3095
|
+
}
|
|
3096
|
+
|
|
3097
|
+
declare class XYGrid extends Grid implements IGrid {
|
|
3098
|
+
static TICK_LABEL_OVERFLOW_DEBOUNCE_INTERVAL: number;
|
|
3099
|
+
protected axisX: IAxis;
|
|
3100
|
+
protected axisYLeft: IAxis;
|
|
3101
|
+
protected axisYRight: IAxis;
|
|
3102
|
+
protected gridY: IAxis;
|
|
3103
|
+
protected gridX: IAxis;
|
|
3104
|
+
private _bottomScaleId?;
|
|
3105
|
+
private _leftScaleId?;
|
|
3106
|
+
private _rightScaleId;
|
|
3107
|
+
private reconcileMarginsDebounce;
|
|
3108
|
+
private handleTickLabelOverflowDebounceIndex;
|
|
3109
|
+
/**
|
|
3110
|
+
* Returns the id of the bottom axis scale
|
|
3111
|
+
*/
|
|
3112
|
+
get bottomScaleId(): string | undefined;
|
|
3113
|
+
/**
|
|
3114
|
+
* Sets the id of the bottom axis scale
|
|
3115
|
+
*/
|
|
3116
|
+
set bottomScaleId(id: string | undefined);
|
|
3117
|
+
/**
|
|
3118
|
+
* Returns the id of the left axis scale
|
|
3119
|
+
*/
|
|
3120
|
+
get leftScaleId(): string | undefined;
|
|
3121
|
+
/**
|
|
3122
|
+
* Sets the id of the left axis scale
|
|
3123
|
+
*/
|
|
3124
|
+
set leftScaleId(id: string | undefined);
|
|
3125
|
+
/**
|
|
3126
|
+
* Returns the id of the right axis scale
|
|
3127
|
+
*/
|
|
3128
|
+
get rightScaleId(): string;
|
|
3129
|
+
/**
|
|
3130
|
+
* Sets the id of the right axis scale
|
|
3131
|
+
*/
|
|
3132
|
+
set rightScaleId(id: string);
|
|
3133
|
+
/** @ignore */
|
|
3134
|
+
set scales(scales: ScalesIndex);
|
|
3135
|
+
/** @ignore */
|
|
3136
|
+
get scales(): ScalesIndex;
|
|
3137
|
+
/** See {@link IGrid#config} */
|
|
3138
|
+
config(): IXYGridConfig;
|
|
3139
|
+
/** See {@link IGrid#config} */
|
|
3140
|
+
config(config: IXYGridConfig): this;
|
|
3141
|
+
constructor(config?: IXYGridConfig);
|
|
3142
|
+
/** See {@link IGrid#build} */
|
|
3143
|
+
build(): IGrid;
|
|
3144
|
+
/**
|
|
3145
|
+
* Handle axis opacity when emphasizing/deemphasizing chart series
|
|
3146
|
+
*
|
|
3147
|
+
* @param e
|
|
3148
|
+
* @private
|
|
3149
|
+
*/
|
|
3150
|
+
handleSeriesStateChange(e: IChartEvent): Record<string, Record<string, any>> | undefined;
|
|
3151
|
+
/**
|
|
3152
|
+
* Return opacity for each axis
|
|
3153
|
+
*
|
|
3154
|
+
* @param e
|
|
3155
|
+
* @param axes
|
|
3156
|
+
* @private
|
|
3157
|
+
*/
|
|
3158
|
+
private calculateAxesStyles;
|
|
3159
|
+
/** See {@link IGrid#buildPlugins} */
|
|
3160
|
+
buildPlugins(chart: IChart): IChartPlugin[];
|
|
3161
|
+
/** See {@link IGrid#update} */
|
|
3162
|
+
update(): IGrid;
|
|
3163
|
+
/** @ignore */
|
|
3164
|
+
drawTicks(config: IAxisConfig, axis: IAxis, scale: IScale<any>, axisGenerator: any): void;
|
|
3165
|
+
/** @ignore */
|
|
3166
|
+
drawGrids(config: IAxisConfig, axis: IAxis, axisGenerator: any, scale: IScale<any>, size: number): void;
|
|
3167
|
+
/** See {@link IGrid#updateRanges} */
|
|
3168
|
+
updateRanges(): IGrid;
|
|
3169
|
+
protected updateXAxis(): void;
|
|
3170
|
+
protected updateYAxes(): void;
|
|
3171
|
+
protected updateAxes(): void;
|
|
3172
|
+
protected adjustAxisTicks(labelGroup: D3Selection<SVGGElement>, scale: IScale<any>): void;
|
|
3173
|
+
protected handleTickLabelOverflow(labelGroup: D3Selection<SVGGElement>, scale: IScale<any>, axisLabels: HTMLElement[]): void;
|
|
3174
|
+
protected selectAllAxisLabels(axisGroup: D3Selection<SVGGElement>): HTMLElement[];
|
|
3175
|
+
protected getOuterWidthDimensionCorrection(): number;
|
|
3176
|
+
private handleMarginUpdate;
|
|
3177
|
+
private hasRightYAxis;
|
|
3178
|
+
private buildAxes;
|
|
3179
|
+
private filterRepeatedElements;
|
|
3180
|
+
private getElementsToHide;
|
|
3181
|
+
private elementsFiltering;
|
|
3182
|
+
private getTextMeasurement;
|
|
3183
|
+
private getMaxTextWidth;
|
|
3184
|
+
private getTickDistance;
|
|
3185
|
+
private recalculateMargins;
|
|
3186
|
+
private fitBottomAxis;
|
|
3187
|
+
/**
|
|
3188
|
+
* This method invokes updateRanges if the margins have changed, but only after a debounce period.
|
|
3189
|
+
* ----
|
|
3190
|
+
* The debounce is necessary because, in the case of a very short axis, repeated attempts to
|
|
3191
|
+
* alternately fit axis labels and recalculate ticks may conflict with each other
|
|
3192
|
+
* causing the old and new margins to never be equal upon comparison. This scenario can cause a d3
|
|
3193
|
+
* call stack overflow, but with a debounce, d3 can keep up with the recalculations until the chart
|
|
3194
|
+
* is resized to consistently accommodate the width of the labels.
|
|
3195
|
+
*/
|
|
3196
|
+
private reconcileMarginsWithDebounce;
|
|
3197
|
+
private isApproximatelyEqual;
|
|
3198
|
+
private areMarginsApproximatelyEqual;
|
|
3199
|
+
}
|
|
3200
|
+
|
|
3201
|
+
/** @ignore */
|
|
3202
|
+
declare class RadialGrid extends Grid implements IGrid {
|
|
3203
|
+
build(): IGrid;
|
|
3204
|
+
updateDimensions(dimensions: IDimensions): IGrid;
|
|
3205
|
+
protected adjustRenderingArea: () => void;
|
|
3206
|
+
private recenter;
|
|
3207
|
+
}
|
|
3208
|
+
|
|
3209
|
+
/**
|
|
3210
|
+
* Default gauge label formatter name
|
|
3211
|
+
*/
|
|
3212
|
+
declare const GAUGE_LABEL_FORMATTER_NAME_DEFAULT = "gauge-label";
|
|
3213
|
+
/**
|
|
3214
|
+
* Gauge labels container class name
|
|
3215
|
+
*/
|
|
3216
|
+
declare const GAUGE_LABELS_CONTAINER_CLASS = "gauge-labels";
|
|
3217
|
+
/**
|
|
3218
|
+
* Gauge threshold label class name
|
|
3219
|
+
*/
|
|
3220
|
+
declare const GAUGE_THRESHOLD_LABEL_CLASS = "threshold-label";
|
|
3221
|
+
|
|
3222
|
+
/**
|
|
3223
|
+
* Highlights the label on x-axis that corresponds to interaction position
|
|
3224
|
+
*
|
|
3225
|
+
* @class InteractionLabelPlugin
|
|
3226
|
+
* @extends {ChartPlugin}
|
|
3227
|
+
*/
|
|
3228
|
+
declare class InteractionLabelPlugin extends ChartPlugin {
|
|
3229
|
+
private formatterName;
|
|
3230
|
+
static LAYER_NAME: string;
|
|
3231
|
+
areLabelUpdatesEnabled: boolean;
|
|
3232
|
+
private isChartInView;
|
|
3233
|
+
private lastInteractionValuesPayload;
|
|
3234
|
+
private interactionLabelLayer;
|
|
3235
|
+
private readonly destroy$;
|
|
3236
|
+
private elBBox;
|
|
3237
|
+
constructor(formatterName?: string);
|
|
3238
|
+
initialize(): void;
|
|
3239
|
+
protected handleLabelUpdate(): void;
|
|
3240
|
+
protected updateLabel(scale: IScale<any>, value: any): void;
|
|
3241
|
+
destroy(): void;
|
|
3242
|
+
private buildInteractionLabel;
|
|
3243
|
+
}
|
|
3244
|
+
|
|
3245
|
+
/**
|
|
3246
|
+
* Draws a vertical line on the x-axis that corresponds to interaction position
|
|
3247
|
+
*
|
|
3248
|
+
* @class InteractionLinePlugin
|
|
3249
|
+
* @extends {ChartPlugin}
|
|
3250
|
+
*/
|
|
3251
|
+
declare class InteractionLinePlugin extends ChartPlugin {
|
|
3252
|
+
static LAYER_NAME: string;
|
|
3253
|
+
private isChartInView;
|
|
3254
|
+
private lastInteractionValuesPayload;
|
|
3255
|
+
private interactionLineLayer;
|
|
3256
|
+
private readonly destroy$;
|
|
3257
|
+
initialize(): void;
|
|
3258
|
+
private handleLineUpdate;
|
|
3259
|
+
private updateLine;
|
|
3260
|
+
destroy(): void;
|
|
3261
|
+
}
|
|
3262
|
+
|
|
3263
|
+
/** @ignore */
|
|
3264
|
+
declare class MouseInteractiveAreaPlugin extends ChartPlugin {
|
|
3265
|
+
private mouseInteractiveArea;
|
|
3266
|
+
private readonly destroy$;
|
|
3267
|
+
private interactionValuesActive;
|
|
3268
|
+
constructor(mouseInteractiveArea: MouseInteractiveArea);
|
|
3269
|
+
initialize(): void;
|
|
3270
|
+
update(): void;
|
|
3271
|
+
updateDimensions(): void;
|
|
3272
|
+
destroy(): void;
|
|
3273
|
+
private highlightReset;
|
|
3274
|
+
}
|
|
3275
|
+
|
|
3276
|
+
/**
|
|
3277
|
+
* Extends ChartPopoverPlugin to handle popover positioning for radial charts.
|
|
3278
|
+
*/
|
|
3279
|
+
declare class RadialPopoverPlugin extends ChartPopoverPlugin {
|
|
3280
|
+
protected getAbsolutePosition(valArr: any[]): IElementPosition;
|
|
3281
|
+
}
|
|
3282
|
+
|
|
3283
|
+
/** @ignore */
|
|
3284
|
+
declare class RenderEnginePlugin extends ChartPlugin {
|
|
3285
|
+
private renderEngine;
|
|
3286
|
+
private isChartInView;
|
|
3287
|
+
private lastInteractionValuesPayload;
|
|
3288
|
+
private readonly destroy$;
|
|
3289
|
+
initialize(): void;
|
|
3290
|
+
update(): void;
|
|
3291
|
+
updateDimensions(): void;
|
|
3292
|
+
destroy(): void;
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3295
|
+
/**
|
|
3296
|
+
* This radial tooltips plugin handles special tooltip positioning requirements for donut / pie charts.
|
|
3297
|
+
*/
|
|
3298
|
+
declare class RadialTooltipsPlugin extends ChartTooltipsPlugin {
|
|
3299
|
+
protected getTooltipPosition(dataPoint: IDataPoint, chartSeries: IChartSeries<IAccessors>): ITooltipPosition;
|
|
3300
|
+
protected getAbsolutePosition(relativePosition: ITooltipPosition, chartPosition: IPosition): ITooltipPosition;
|
|
3301
|
+
/**
|
|
3302
|
+
* Calculate the position for the tooltip overlay based on the angle of the pie slice
|
|
3303
|
+
*
|
|
3304
|
+
* @param {number} angle in radians
|
|
3305
|
+
*/
|
|
3306
|
+
private getOverlayPosition;
|
|
3307
|
+
/**
|
|
3308
|
+
* Calculates what section of the circle does the given angle belong to
|
|
3309
|
+
*
|
|
3310
|
+
* @param {number} angle in radians
|
|
3311
|
+
* @param {number} sections The number of sections the circle is divided into
|
|
3312
|
+
*/
|
|
3313
|
+
private getSectionIndex;
|
|
3314
|
+
private opposite;
|
|
3315
|
+
}
|
|
3316
|
+
|
|
3317
|
+
/**
|
|
3318
|
+
* Configuration for bar charts
|
|
3319
|
+
*
|
|
3320
|
+
* @interface IBarChartConfig
|
|
3321
|
+
*/
|
|
3322
|
+
interface IBarChartConfig {
|
|
3323
|
+
horizontal?: boolean;
|
|
3324
|
+
grouped?: boolean;
|
|
3325
|
+
}
|
|
3326
|
+
interface IStackMetadata {
|
|
3327
|
+
start: number;
|
|
3328
|
+
end: number;
|
|
3329
|
+
}
|
|
3330
|
+
|
|
3331
|
+
declare class BarTooltipsPlugin extends ChartTooltipsPlugin {
|
|
3332
|
+
constructor(config?: IBarChartConfig);
|
|
3333
|
+
}
|
|
3334
|
+
|
|
3335
|
+
interface IZoomPluginConfiguration {
|
|
3336
|
+
enableExternalEvents?: boolean;
|
|
3337
|
+
}
|
|
3338
|
+
declare class ZoomPlugin extends ChartPlugin {
|
|
3339
|
+
config: IZoomPluginConfiguration;
|
|
3340
|
+
static LAYER_NAME: string;
|
|
3341
|
+
static readonly DEFAULT_CONFIG: IZoomPluginConfiguration;
|
|
3342
|
+
private grid;
|
|
3343
|
+
private brush;
|
|
3344
|
+
private zoomBrushLayer;
|
|
3345
|
+
private brushElement;
|
|
3346
|
+
private readonly destroy$;
|
|
3347
|
+
private brushStartX;
|
|
3348
|
+
private interactionHandlerMap;
|
|
3349
|
+
constructor(config?: IZoomPluginConfiguration);
|
|
3350
|
+
initialize(): void;
|
|
3351
|
+
updateDimensions(): void;
|
|
3352
|
+
destroy(): void;
|
|
3353
|
+
private brushStart;
|
|
3354
|
+
private brushMove;
|
|
3355
|
+
private brushEnd;
|
|
3356
|
+
}
|
|
3357
|
+
|
|
3358
|
+
declare class TimeseriesZoomPluginsSyncService {
|
|
3359
|
+
private collections;
|
|
3360
|
+
registerPlugin(collectionId: string, plugin: TimeseriesZoomPlugin): void;
|
|
3361
|
+
getPlugins(collectionId: string): TimeseriesZoomPlugin[];
|
|
3362
|
+
removePlugin(collectionId: string, plugin: TimeseriesZoomPlugin): void;
|
|
3363
|
+
syncPositionInsideCollection(collectionId: string, startDate: moment.Moment, endDate: moment.Moment): void;
|
|
3364
|
+
clearZoomInsideCollection(collectionId: string): void;
|
|
3365
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimeseriesZoomPluginsSyncService, never>;
|
|
3366
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TimeseriesZoomPluginsSyncService>;
|
|
3367
|
+
}
|
|
3368
|
+
|
|
3369
|
+
interface ITimeseriesZoomPluginConfig {
|
|
3370
|
+
collectionId?: string;
|
|
3371
|
+
enableExternalEvents?: boolean;
|
|
3372
|
+
}
|
|
3373
|
+
interface ITimeseriesZoomPluginInspectionFrame {
|
|
3374
|
+
startDate: moment.Moment | undefined;
|
|
3375
|
+
endDate: moment.Moment | undefined;
|
|
3376
|
+
}
|
|
3377
|
+
declare class TimeseriesZoomPlugin extends ChartPlugin {
|
|
3378
|
+
config: ITimeseriesZoomPluginConfig;
|
|
3379
|
+
private syncService?;
|
|
3380
|
+
static LAYER_NAME: string;
|
|
3381
|
+
static readonly DEFAULT_CONFIG: ITimeseriesZoomPluginConfig;
|
|
3382
|
+
private grid;
|
|
3383
|
+
private brush;
|
|
3384
|
+
private zoomBrushLayer;
|
|
3385
|
+
private brushElement;
|
|
3386
|
+
private destroy$;
|
|
3387
|
+
private interactionHandlerMap;
|
|
3388
|
+
private xScale;
|
|
3389
|
+
private brushStartXCoord?;
|
|
3390
|
+
private brushEndXCoord?;
|
|
3391
|
+
private brushStartXDate?;
|
|
3392
|
+
private brushEndXDate?;
|
|
3393
|
+
private isChartHoverd;
|
|
3394
|
+
private isPopoverDisplayed;
|
|
3395
|
+
private zoomLineLayer;
|
|
3396
|
+
private readonly openPopoverSubject;
|
|
3397
|
+
readonly openPopover$: rxjs.Observable<number>;
|
|
3398
|
+
private readonly closePopoverSubject;
|
|
3399
|
+
readonly closePopover$: rxjs.Observable<void>;
|
|
3400
|
+
private readonly zoomCreatedSubject;
|
|
3401
|
+
readonly zoomCreated$: rxjs.Observable<void>;
|
|
3402
|
+
private resizeHandler;
|
|
3403
|
+
constructor(config?: ITimeseriesZoomPluginConfig, syncService?: TimeseriesZoomPluginsSyncService | undefined);
|
|
3404
|
+
initialize(): void;
|
|
3405
|
+
updateDimensions(): void;
|
|
3406
|
+
destroy(): void;
|
|
3407
|
+
showPopover(): void;
|
|
3408
|
+
closePopover(): void;
|
|
3409
|
+
moveBrushByDate(startDate: moment.Moment, endDate: moment.Moment): void;
|
|
3410
|
+
moveBrushByCoord(startX: number | undefined, endX: number | undefined): void;
|
|
3411
|
+
clearBrush(): void;
|
|
3412
|
+
getInspectionFrame(): ITimeseriesZoomPluginInspectionFrame;
|
|
3413
|
+
private getDateFromCoord;
|
|
3414
|
+
private addZoomBoundaryLine;
|
|
3415
|
+
private onBrushStart;
|
|
3416
|
+
private onBrushMove;
|
|
3417
|
+
private onBrushEnd;
|
|
3418
|
+
private createBrushWithoutDrag;
|
|
3419
|
+
private moveBrush;
|
|
3420
|
+
}
|
|
3421
|
+
|
|
3422
|
+
declare class Chart implements IChart {
|
|
3423
|
+
private grid;
|
|
3424
|
+
configuration?: IChartConfiguration | undefined;
|
|
3425
|
+
readonly eventBus: EventBus<IChartEvent<any>>;
|
|
3426
|
+
element: HTMLElement;
|
|
3427
|
+
target?: D3Selection<SVGSVGElement>;
|
|
3428
|
+
filterDefs?: Selection<SVGDefsElement, any, SVGElement, any>;
|
|
3429
|
+
private dataManager;
|
|
3430
|
+
private renderEngine;
|
|
3431
|
+
private updateSubject;
|
|
3432
|
+
private updateDimensionsSubject;
|
|
3433
|
+
private seriesStatesSubject;
|
|
3434
|
+
private plugins;
|
|
3435
|
+
constructor(grid: IGrid, configuration?: IChartConfiguration | undefined);
|
|
3436
|
+
getEventBus(): EventBus<IChartEvent>;
|
|
3437
|
+
getDataManager(): DataManager;
|
|
3438
|
+
getRenderEngine(): RenderEngine;
|
|
3439
|
+
getGrid(): IGrid;
|
|
3440
|
+
addPlugin(plugin: IChartPlugin): void;
|
|
3441
|
+
removePlugin(classRef: typeof ChartPlugin): void;
|
|
3442
|
+
addPlugins(...plugins: IChartPlugin[]): void;
|
|
3443
|
+
removePlugins(...classRefs: (typeof ChartPlugin)[]): void;
|
|
3444
|
+
hasPlugin(classRef: typeof ChartPlugin): boolean;
|
|
3445
|
+
build(element: HTMLElement): void;
|
|
3446
|
+
private configureCssFilters;
|
|
3447
|
+
protected buildDataManager(): DataManager;
|
|
3448
|
+
protected buildGrid(): void;
|
|
3449
|
+
protected buildRenderEngine(lasagna: Lasagna, dataManager: DataManager): RenderEngine;
|
|
3450
|
+
update(seriesSet: IChartSeries<IAccessors>[]): void;
|
|
3451
|
+
updateDimensions(): void;
|
|
3452
|
+
initialize(): void;
|
|
3453
|
+
destroy(): void;
|
|
3454
|
+
setSeriesStates(renderStateData: IRenderStateData[]): void;
|
|
3455
|
+
private onUpdate;
|
|
3456
|
+
private onUpdateDimensions;
|
|
3457
|
+
private updateTargetDimensions;
|
|
3458
|
+
private onSetSeriesStates;
|
|
3459
|
+
}
|
|
3460
|
+
|
|
3461
|
+
/**
|
|
3462
|
+
* Chart assist implementation to be used with spark charts
|
|
3463
|
+
*/
|
|
3464
|
+
declare class SparkChartAssist implements IChartAssist {
|
|
3465
|
+
readonly showBottomAxis: boolean;
|
|
3466
|
+
readonly showTopBorder: boolean;
|
|
3467
|
+
palette: IChartPalette;
|
|
3468
|
+
markers: IValueProvider<IChartMarker>;
|
|
3469
|
+
/** Collection of ISpark objects */
|
|
3470
|
+
sparks: ISpark<IAccessors>[];
|
|
3471
|
+
/** Used for keeping tabs on the legend's active state */
|
|
3472
|
+
isLegendActive: boolean;
|
|
3473
|
+
/** Grid config for all sparks except the last (bottom) one */
|
|
3474
|
+
readonly gridConfig: XYGridConfig;
|
|
3475
|
+
/** Grid config for the last (bottom) spark */
|
|
3476
|
+
readonly lastGridConfig: XYGridConfig;
|
|
3477
|
+
highlightedDataPoints: IDataPointsPayload;
|
|
3478
|
+
constructor(showBottomAxis?: boolean, showTopBorder?: boolean, palette?: IChartPalette, markers?: IValueProvider<IChartMarker>);
|
|
3479
|
+
/**
|
|
3480
|
+
* Use this method to update the set of sparks if they all consist of only one series.
|
|
3481
|
+
* If one or more sparks has multiple series use the updateSparks method instead.
|
|
3482
|
+
*
|
|
3483
|
+
* See {@link IChartAssist#update}
|
|
3484
|
+
*/
|
|
3485
|
+
update(inputSeriesSet: IChartAssistSeries<IAccessors>[]): void;
|
|
3486
|
+
/**
|
|
3487
|
+
* Use this method to update the set of sparks if any of them consist of more than one series.
|
|
3488
|
+
*
|
|
3489
|
+
* @param {ISpark<IAccessors>[]} sparks The collection of sparks to update
|
|
3490
|
+
*/
|
|
3491
|
+
updateSparks(sparks: ISpark<IAccessors>[]): void;
|
|
3492
|
+
/** See {@link IChartAssist#getHighlightedValue} */
|
|
3493
|
+
getHighlightedValue(chartSeries: IChartSeries<IAccessors>, scaleKey: string, formatterName?: string): string | number;
|
|
3494
|
+
/**
|
|
3495
|
+
* To use the for-cycle trackBy, set the id value on each spark
|
|
3496
|
+
* and assign this function to the ngFor trackBy property
|
|
3497
|
+
*/
|
|
3498
|
+
trackByFn(_index: number, spark: ISpark<IAccessors>): string | undefined;
|
|
3499
|
+
setRenderState(_seriesId: string, _state: RenderState): void;
|
|
3500
|
+
getVisibleSeriesWithLegend(): IChartAssistSeries<IAccessors>[];
|
|
3501
|
+
protected createChart(lastSpark: boolean): Chart;
|
|
3502
|
+
private configureEventSubscriptions;
|
|
3503
|
+
private reconfigureChart;
|
|
3504
|
+
}
|
|
3505
|
+
|
|
3506
|
+
/** Common CSS filter IDs */
|
|
3507
|
+
declare enum CssFilterId {
|
|
3508
|
+
Grayscale = "grayscale"
|
|
3509
|
+
}
|
|
3510
|
+
/** CSS grayscale filter rule value */
|
|
3511
|
+
declare const GRAYSCALE_FILTER = "url(\"#grayscale\")";
|
|
3512
|
+
/** Transformation matrix value for applying a 100% grayscale appearance to an svg element */
|
|
3513
|
+
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";
|
|
3514
|
+
|
|
3515
|
+
/** Renderer configuration for the thresholds on a chart */
|
|
3516
|
+
declare const THRESHOLDS_MAIN_CHART_RENDERER_CONFIG: IRendererConfig;
|
|
3517
|
+
/** Renderer configuration for a thresholds summary chart */
|
|
3518
|
+
declare const THRESHOLDS_SUMMARY_RENDERER_CONFIG: IRendererConfig;
|
|
3519
|
+
/** Default configuration for marker interaction */
|
|
3520
|
+
declare const DEFAULT_MARKER_INTERACTION_CONFIG: IMarkerInteractionConfig;
|
|
3521
|
+
/**
|
|
3522
|
+
* Class name for gauge threshold markers
|
|
3523
|
+
*/
|
|
3524
|
+
declare const GAUGE_THRESHOLD_MARKER_CLASS = "gauge-threshold-marker";
|
|
3525
|
+
|
|
3526
|
+
/** Interface for side indicator data accessors */
|
|
3527
|
+
interface ISideIndicatorDataAccessors extends IDataAccessors {
|
|
3528
|
+
/** Accessor indicating whether the side indicator should be active */
|
|
3529
|
+
active: DataAccessor;
|
|
3530
|
+
}
|
|
3531
|
+
/** Interface for side indicator series accessors */
|
|
3532
|
+
interface ISideIndicatorSeriesAccessors extends ISeriesAccessors {
|
|
3533
|
+
/** Indicates the start value of the side indicator */
|
|
3534
|
+
start: SeriesAccessor;
|
|
3535
|
+
/** Indicates the end value of the side indicator */
|
|
3536
|
+
end: SeriesAccessor;
|
|
3537
|
+
/** Indicates the active color of the side indicator */
|
|
3538
|
+
activeColor: SeriesAccessor;
|
|
3539
|
+
/** Optional accessor indicating the inactive color of the side indicator. A grayscale filter is applied to the active color by default */
|
|
3540
|
+
inactiveColor?: SeriesAccessor;
|
|
3541
|
+
}
|
|
3542
|
+
/** Interface for side indicator accessors */
|
|
3543
|
+
interface ISideIndicatorAccessors {
|
|
3544
|
+
/** Accessors for the side indicator data */
|
|
3545
|
+
data: ISideIndicatorDataAccessors;
|
|
3546
|
+
/** Accessors for the side indicator series */
|
|
3547
|
+
series: ISideIndicatorSeriesAccessors;
|
|
3548
|
+
}
|
|
3549
|
+
/** Standard definition for side indicator series and data accessors */
|
|
3550
|
+
declare class SideIndicatorAccessors implements ISideIndicatorAccessors {
|
|
3551
|
+
data: ISideIndicatorDataAccessors;
|
|
3552
|
+
series: ISideIndicatorSeriesAccessors;
|
|
3553
|
+
constructor();
|
|
3554
|
+
}
|
|
3555
|
+
/**
|
|
3556
|
+
* Renderer for drawing threshold side indicators
|
|
3557
|
+
*/
|
|
3558
|
+
declare class SideIndicatorRenderer extends XYRenderer<ISideIndicatorAccessors> {
|
|
3559
|
+
/** @deprecated As of Nova v9, use RenderLayerName.unclippedData enum value instead. Removal: NUI-5753 */
|
|
3560
|
+
static SIDE_INDICATORS_LAYER: string;
|
|
3561
|
+
private DEFAULT_CONFIG;
|
|
3562
|
+
/**
|
|
3563
|
+
* Creates an instance of SideIndicatorRenderer.
|
|
3564
|
+
* @param {IRendererConfig} [config={}] Renderer configuration object
|
|
3565
|
+
*/
|
|
3566
|
+
constructor(config?: IRendererConfig);
|
|
3567
|
+
/** See {@link Renderer#draw} */
|
|
3568
|
+
draw(renderSeries: IRenderSeries<ISideIndicatorAccessors>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3569
|
+
/** See {@link Renderer#getDataPointIndex} */
|
|
3570
|
+
getDataPointIndex(series: IDataSeries<ISideIndicatorAccessors>, values: {
|
|
3571
|
+
[p: string]: any;
|
|
3572
|
+
}, scales: Scales): number;
|
|
3573
|
+
/** See {@link Renderer#getRequiredLayers} */
|
|
3574
|
+
getRequiredLayers(): ILasagnaLayer[];
|
|
3575
|
+
}
|
|
3576
|
+
|
|
3577
|
+
interface INoopAccessors extends IAccessors {
|
|
3578
|
+
data: any;
|
|
3579
|
+
/** Series level accessors - e.g. for colors, markers, etc. */
|
|
3580
|
+
series: any;
|
|
3581
|
+
}
|
|
3582
|
+
declare class NoopAccessors implements INoopAccessors {
|
|
3583
|
+
series: any;
|
|
3584
|
+
data: any;
|
|
3585
|
+
constructor();
|
|
3586
|
+
}
|
|
3587
|
+
|
|
3588
|
+
/**
|
|
3589
|
+
* Renderer that is able to draw line chart
|
|
3590
|
+
*/
|
|
3591
|
+
declare class NoopRenderer extends Renderer<INoopAccessors> {
|
|
3592
|
+
/** See {@link Renderer#draw} */
|
|
3593
|
+
draw(renderSeries: IRenderSeries<INoopAccessors>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3594
|
+
/** See {@link Renderer#highlightDataPoint} */
|
|
3595
|
+
highlightDataPoint(renderSeries: IRenderSeries<INoopAccessors>, dataPointIndex: number, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3596
|
+
/** See {@link Renderer#getRequiredLayers} */
|
|
3597
|
+
getRequiredLayers(): ILasagnaLayer[];
|
|
3598
|
+
/** See {@link Renderer#getDataPointPosition} */
|
|
3599
|
+
getDataPointPosition(dataSeries: IDataSeries<INoopAccessors>, index: number, scales: Scales): IPosition;
|
|
3600
|
+
}
|
|
3601
|
+
|
|
3602
|
+
interface IBarDataAccessors extends IRectangleDataAccessors {
|
|
3603
|
+
category: DataAccessor;
|
|
3604
|
+
start: DataAccessor;
|
|
3605
|
+
end: DataAccessor;
|
|
3606
|
+
thickness?: DataAccessor;
|
|
3607
|
+
value?: DataAccessor;
|
|
3608
|
+
color?: DataAccessor;
|
|
3609
|
+
marker?: DataAccessor;
|
|
3610
|
+
cssClass?: DataAccessor<any, string>;
|
|
3611
|
+
}
|
|
3612
|
+
interface IBarAccessors extends IAccessors {
|
|
3613
|
+
data: IBarDataAccessors;
|
|
3614
|
+
series: IRectangleSeriesAccessors;
|
|
3615
|
+
}
|
|
3616
|
+
declare abstract class BarAccessors extends RectangleAccessors implements IBarAccessors {
|
|
3617
|
+
private colorProvider;
|
|
3618
|
+
private markerProvider;
|
|
3619
|
+
data: IBarDataAccessors;
|
|
3620
|
+
series: IRectangleSeriesAccessors;
|
|
3621
|
+
constructor(colorProvider?: IValueProvider<string>, markerProvider?: IValueProvider<IChartMarker>);
|
|
3622
|
+
private getSingleValue;
|
|
3623
|
+
}
|
|
3624
|
+
|
|
3625
|
+
declare function stackedPreprocessor(chartSeriesSet: IChartSeries<IBarAccessors>[], isVisible: (chartSeries: IChartSeries<IBarAccessors>) => boolean): IChartSeries<IBarAccessors>[];
|
|
3626
|
+
declare function stack(this: ChartAssist, chartSeriesSet: IChartAssistSeries<IBarAccessors>[]): IChartAssistSeries<IBarAccessors>[];
|
|
3627
|
+
|
|
3628
|
+
/**
|
|
3629
|
+
* Creates an {@link XYGrid} with predefined {@link BarGridConfig} or
|
|
3630
|
+
* {@link BarHorizontalGridConfig} using {@link IBarChartConfig#horizontal} horizontal property. Default orientation is **vertical**.
|
|
3631
|
+
*
|
|
3632
|
+
* @param {IBarChartConfig} [config] bar chart configuration for orientation definition.
|
|
3633
|
+
* @returns {XYGrid}
|
|
3634
|
+
*/
|
|
3635
|
+
declare function barGrid(config?: IBarChartConfig): XYGrid;
|
|
3636
|
+
|
|
3637
|
+
/**
|
|
3638
|
+
* Generates scales definition to be used with category+value based bar charts
|
|
3639
|
+
*
|
|
3640
|
+
* @param config
|
|
3641
|
+
* @param valueScale
|
|
3642
|
+
*/
|
|
3643
|
+
declare function barScales(config?: IBarChartConfig, valueScale?: LinearScale): IXYScales;
|
|
3644
|
+
|
|
3645
|
+
/**
|
|
3646
|
+
* Creates {@link VerticalBarAccessors} or {@link VerticalBarAccessors}
|
|
3647
|
+
* using {@link IBarChartConfig#horizontal} horizontal property. Default orientation is **vertical**.
|
|
3648
|
+
*
|
|
3649
|
+
* @param {IBarChartConfig} [config]
|
|
3650
|
+
* @param {IValueProvider<string>} [colorProvider]
|
|
3651
|
+
* @param {IValueProvider<IChartMarker>} [markerProvider]
|
|
3652
|
+
* @returns {IBarAccessors}
|
|
3653
|
+
*/
|
|
3654
|
+
declare function barAccessors(config?: IBarChartConfig, colorProvider?: IValueProvider<string>, markerProvider?: IValueProvider<IChartMarker>): IBarAccessors;
|
|
3655
|
+
|
|
3656
|
+
declare class HorizontalBarAccessors extends BarAccessors {
|
|
3657
|
+
data: IBarDataAccessors;
|
|
3658
|
+
series: IRectangleSeriesAccessors;
|
|
3659
|
+
constructor(colorProvider?: IValueProvider<string>, markerProvider?: IValueProvider<IChartMarker>);
|
|
3660
|
+
}
|
|
3661
|
+
|
|
3662
|
+
declare class VerticalBarAccessors extends BarAccessors {
|
|
3663
|
+
data: IBarDataAccessors;
|
|
3664
|
+
series: IRectangleSeriesAccessors;
|
|
3665
|
+
constructor(colorProvider?: IValueProvider<string>, markerProvider?: IValueProvider<IChartMarker>);
|
|
3666
|
+
}
|
|
3667
|
+
|
|
3668
|
+
interface IStatusDataAccessors extends IBarDataAccessors {
|
|
3669
|
+
status: DataAccessor;
|
|
3670
|
+
}
|
|
3671
|
+
interface IStatusAccessors extends IBarAccessors {
|
|
3672
|
+
data: IStatusDataAccessors;
|
|
3673
|
+
}
|
|
3674
|
+
declare class StatusAccessors implements IStatusAccessors {
|
|
3675
|
+
private barAccessors;
|
|
3676
|
+
static STATUS_CATEGORY: string;
|
|
3677
|
+
static STATUS_DOMAIN: string[];
|
|
3678
|
+
get data(): IStatusDataAccessors;
|
|
3679
|
+
get series(): IRectangleSeriesAccessors;
|
|
3680
|
+
constructor(barAccessors: IBarAccessors);
|
|
3681
|
+
}
|
|
3682
|
+
|
|
3683
|
+
declare function statusAccessors(colorProvider: IValueProvider<string>, markerProvider?: IValueProvider<IChartMarker>): StatusAccessors;
|
|
3684
|
+
|
|
3685
|
+
type SelectedDatPointIdxFn = (seriesId: string) => number;
|
|
3686
|
+
declare class BarHighlightStrategy implements IHighlightStrategy<IRectangleAccessors, BarRenderer> {
|
|
3687
|
+
protected scaleKey: keyof IXYScales;
|
|
3688
|
+
protected levels: number;
|
|
3689
|
+
protected selectedDataPointIdxFn?: SelectedDatPointIdxFn | undefined;
|
|
3690
|
+
/**
|
|
3691
|
+
* @param scaleKey scale that will be used for searching for the data point that will be highlighted
|
|
3692
|
+
* @param levels for band scales, how many levels deep do we go to compare values
|
|
3693
|
+
*/
|
|
3694
|
+
constructor(scaleKey: keyof IXYScales, levels?: number, selectedDataPointIdxFn?: SelectedDatPointIdxFn | undefined);
|
|
3695
|
+
getDataPointIndex(renderer: BarRenderer, series: IDataSeries<IRectangleAccessors>, values: {
|
|
3696
|
+
[p: string]: any;
|
|
3697
|
+
}, scales: Scales): number;
|
|
3698
|
+
findDataPointByValue(series: IDataSeries<IRectangleAccessors>, value: any, scaleKey: keyof IXYScales, scales?: Scales): number;
|
|
3699
|
+
highlightDataPoint(renderer: BarRenderer, renderSeries: IRenderSeries<IRectangleAccessors>, dataPointIndex: number, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3700
|
+
draw(renderer: BarRenderer, renderSeries: IRenderSeries<IRectangleAccessors>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3701
|
+
}
|
|
3702
|
+
|
|
3703
|
+
declare class BarHighlightStrategyOutline extends BarHighlightStrategy {
|
|
3704
|
+
private outlineAdd;
|
|
3705
|
+
private outlineElsMap;
|
|
3706
|
+
/**
|
|
3707
|
+
* @param scaleKey scale that will be used for searching for the data point that will be highlighted
|
|
3708
|
+
* @param levels for band scales, how many levels deep do we go to compare values
|
|
3709
|
+
*/
|
|
3710
|
+
constructor(scaleKey: keyof IXYScales, levels?: number, selectedDataPointIdxFn?: SelectedDatPointIdxFn);
|
|
3711
|
+
highlightDataPoint(renderer: BarRenderer, renderSeries: IRenderSeries<IRectangleAccessors>, dataPointIndex: number): void;
|
|
3712
|
+
}
|
|
3713
|
+
|
|
3714
|
+
declare class BarSeriesHighlightStrategy implements IHighlightStrategy<IRectangleAccessors, BarRenderer> {
|
|
3715
|
+
private scaleKey;
|
|
3716
|
+
private levels;
|
|
3717
|
+
/**
|
|
3718
|
+
* @param scaleKey scale that will be used for searching for the datapoint that will be highlighted
|
|
3719
|
+
* @param levels for band scales, how many levels deep do we go to compare values
|
|
3720
|
+
*/
|
|
3721
|
+
constructor(scaleKey: keyof IXYScales, levels?: number);
|
|
3722
|
+
getDataPointIndex(renderer: BarRenderer, series: IDataSeries<IRectangleAccessors>, values: {
|
|
3723
|
+
[p: string]: any;
|
|
3724
|
+
}, scales: Scales): number;
|
|
3725
|
+
findDataPointByValue(series: IDataSeries<IRectangleAccessors>, value: any, scaleKey: keyof IXYScales): number;
|
|
3726
|
+
highlightDataPoint(renderer: BarRenderer, renderSeries: IRenderSeries<IRectangleAccessors>, dataPointIndex: number, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3727
|
+
draw(renderer: BarRenderer, renderSeries: IRenderSeries<IRectangleAccessors>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3728
|
+
}
|
|
3729
|
+
|
|
3730
|
+
/**
|
|
3731
|
+
* Default configuration for Linear Gauge Thresholds Renderer
|
|
3732
|
+
*/
|
|
3733
|
+
declare const DEFAULT_LINEAR_GAUGE_THRESHOLDS_RENDERER_CONFIG: ILinearGaugeThresholdsRendererConfig;
|
|
3734
|
+
/**
|
|
3735
|
+
* Renderer for drawing threshold level indicators for gauges
|
|
3736
|
+
*/
|
|
3737
|
+
declare class LinearGaugeThresholdsRenderer extends BarRenderer {
|
|
3738
|
+
config: ILinearGaugeThresholdsRendererConfig;
|
|
3739
|
+
/**
|
|
3740
|
+
* Creates an instance of LinearGaugeThresholdsRenderer.
|
|
3741
|
+
* @param {ILinearGaugeThresholdsRendererConfig} [config]
|
|
3742
|
+
* Renderer configuration object. Defaults to `DEFAULT_LINEAR_GAUGE_THRESHOLDS_RENDERER_CONFIG` constant value.
|
|
3743
|
+
*/
|
|
3744
|
+
constructor(config?: ILinearGaugeThresholdsRendererConfig);
|
|
3745
|
+
/** See {@link Renderer#draw} */
|
|
3746
|
+
draw(renderSeries: IRenderSeries<IRectangleAccessors>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3747
|
+
/** See {@link Renderer#getRequiredLayers} */
|
|
3748
|
+
getRequiredLayers(): ILasagnaLayer[];
|
|
3749
|
+
}
|
|
3750
|
+
|
|
3751
|
+
interface IRadialDataAccessors {
|
|
3752
|
+
value: DataAccessor;
|
|
3753
|
+
color?: DataAccessor;
|
|
3754
|
+
/** Additional custom keys to match the base interface */
|
|
3755
|
+
[key: string]: DataAccessor | undefined;
|
|
3756
|
+
}
|
|
3757
|
+
interface IRadialSeriesAccessors {
|
|
3758
|
+
color?: SeriesAccessor;
|
|
3759
|
+
/** Additional custom keys to match the base interface */
|
|
3760
|
+
[key: string]: SeriesAccessor | undefined;
|
|
3761
|
+
}
|
|
3762
|
+
interface IRadialAccessors extends IAccessors {
|
|
3763
|
+
data: IRadialDataAccessors;
|
|
3764
|
+
series: IRadialSeriesAccessors;
|
|
3765
|
+
}
|
|
3766
|
+
declare class RadialAccessors implements IRadialAccessors {
|
|
3767
|
+
private colorProvider;
|
|
3768
|
+
data: IRadialDataAccessors;
|
|
3769
|
+
series: IRadialSeriesAccessors;
|
|
3770
|
+
constructor(colorProvider?: IValueProvider<string>);
|
|
3771
|
+
}
|
|
3772
|
+
|
|
3773
|
+
/**
|
|
3774
|
+
* Pre-processing function for Pie and Donut chart renderers.
|
|
3775
|
+
*
|
|
3776
|
+
* @param {IChartSeries<IAccessors>[]} seriesSet incoming data series set
|
|
3777
|
+
* @param {(series: IChartSeries<IAccessors>) => boolean} isVisible visibility accessor function
|
|
3778
|
+
* @returns {IChartSeries<IAccessors>[]}
|
|
3779
|
+
*/
|
|
3780
|
+
declare function radialPreprocessor(seriesSet: IChartSeries<IRadialAccessors>[], isVisible: (series: IChartSeries<IRadialAccessors>) => boolean): IChartSeries<IRadialAccessors>[];
|
|
3781
|
+
declare function radial(this: ChartAssist, chartSeriesSet: IChartAssistSeries<IRadialAccessors>[]): IChartSeries<IRadialAccessors>[];
|
|
3782
|
+
|
|
3783
|
+
/**
|
|
3784
|
+
* Default configuration for Radial Renderer
|
|
3785
|
+
*/
|
|
3786
|
+
declare const DEFAULT_RADIAL_RENDERER_CONFIG: IRadialRendererConfig;
|
|
3787
|
+
/**
|
|
3788
|
+
* Radial renderer is a generic renderer that is able to draw pie and donut charts
|
|
3789
|
+
*/
|
|
3790
|
+
declare class RadialRenderer extends Renderer<IRadialAccessors> {
|
|
3791
|
+
config: IRadialRendererConfig;
|
|
3792
|
+
protected segmentWidth?: number;
|
|
3793
|
+
/**
|
|
3794
|
+
* Creates an instance of RadialRenderer.
|
|
3795
|
+
* @param {IRadialRendererConfig} [config]
|
|
3796
|
+
* Renderer configuration object. Defaults to `DEFAULT_RADIAL_RENDERER_CONFIG` constant value.
|
|
3797
|
+
*/
|
|
3798
|
+
constructor(config?: IRadialRendererConfig);
|
|
3799
|
+
/** See {@link Renderer#draw} */
|
|
3800
|
+
draw(renderSeries: IRenderSeries<IRadialAccessors>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3801
|
+
/** See {@link Renderer#getDataPointPosition} */
|
|
3802
|
+
getDataPointPosition(dataSeries: IDataSeries<IRadialAccessors>, index: number, scales: Scales): IPosition | undefined;
|
|
3803
|
+
getInnerRadius(range: number[], index: number): number;
|
|
3804
|
+
getOuterRadius(range: [number, number], index: number): number;
|
|
3805
|
+
protected getArc(range: [number, number], generatedArc: Arc<any, DefaultArcObject>, index: number): Arc<any, DefaultArcObject>;
|
|
3806
|
+
protected getSegmentWidth(renderSeries: IRenderSeries<IRadialAccessors>): number | undefined;
|
|
3807
|
+
private emitDataPointHighlight;
|
|
3808
|
+
}
|
|
3809
|
+
|
|
3810
|
+
/**
|
|
3811
|
+
* Default configuration for DonutGaugeThresholdsRenderer
|
|
3812
|
+
*/
|
|
3813
|
+
declare const DEFAULT_DONUT_GAUGE_THRESHOLDS_RENDERER_CONFIG: IDonutGaugeThresholdsRendererConfig;
|
|
3814
|
+
/**
|
|
3815
|
+
* Renderer for drawing threshold level markers for donut gauges
|
|
3816
|
+
*/
|
|
3817
|
+
declare class DonutGaugeThresholdsRenderer extends RadialRenderer {
|
|
3818
|
+
config: IDonutGaugeThresholdsRendererConfig;
|
|
3819
|
+
/**
|
|
3820
|
+
* Creates an instance of RadialGaugeThresholdsRenderer.
|
|
3821
|
+
* @param {IDonutGaugeThresholdsRendererConfig} [config]
|
|
3822
|
+
* Renderer configuration object. Defaults to `DEFAULT_DONUT_GAUGE_THRESHOLDS_RENDERER_CONFIG` constant value.
|
|
3823
|
+
*/
|
|
3824
|
+
constructor(config?: IDonutGaugeThresholdsRendererConfig);
|
|
3825
|
+
/** See {@link Renderer#draw} */
|
|
3826
|
+
draw(renderSeries: IRenderSeries<IRadialAccessors>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3827
|
+
getInnerRadius(range: number[], index: number): number;
|
|
3828
|
+
}
|
|
3829
|
+
|
|
3830
|
+
/**
|
|
3831
|
+
* Convenience function for generating a standard renderer configuration for a donut gauge
|
|
3832
|
+
*
|
|
3833
|
+
* @returns {IRadialRendererConfig} Standard renderer configuration for a gauge
|
|
3834
|
+
*/
|
|
3835
|
+
declare function donutGaugeRendererConfig(): IRadialRendererConfig;
|
|
3836
|
+
|
|
3837
|
+
declare class DonutGaugeRenderingUtil {
|
|
3838
|
+
static generateThresholdArcData(data: IGaugeThresholdDatum[]): DefaultArcObject$1[];
|
|
3839
|
+
private static generateArcValues;
|
|
3840
|
+
}
|
|
3841
|
+
|
|
3842
|
+
/**
|
|
3843
|
+
* Renderer that is able to draw pie chart
|
|
3844
|
+
*/
|
|
3845
|
+
declare class PieRenderer extends RadialRenderer {
|
|
3846
|
+
protected getArc(range: [number, number], arc: Arc<any, DefaultArcObject>, index: number): Arc<any, DefaultArcObject>;
|
|
3847
|
+
}
|
|
3848
|
+
|
|
3849
|
+
declare function radialGrid(): RadialGrid;
|
|
3850
|
+
|
|
3851
|
+
/**
|
|
3852
|
+
* Generates scales definition to be used with radial charts
|
|
3853
|
+
*/
|
|
3854
|
+
declare function radialScales(): IRadialScales;
|
|
3855
|
+
|
|
3856
|
+
/**
|
|
3857
|
+
* This function adds data points indicating that there is an interruption in the data.
|
|
3858
|
+
*
|
|
3859
|
+
* @param dataSeries
|
|
3860
|
+
* @param accessorKey
|
|
3861
|
+
* @param interval
|
|
3862
|
+
*/
|
|
3863
|
+
declare function calculateMissingData(dataSeries: IDataSeries<IAccessors>, accessorKey: string, interval: Duration): any[];
|
|
3864
|
+
|
|
3865
|
+
declare class LineSelectSeriesInteractionStrategy implements IHighlightStrategy<ILineAccessors, LineRenderer> {
|
|
3866
|
+
readonly INTERACTION_MARGIN = 8;
|
|
3867
|
+
draw(renderer: LineRenderer, renderSeries: IRenderSeries<ILineAccessors>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3868
|
+
getDataPointIndex(renderer: LineRenderer, series: IDataSeries<ILineAccessors>, values: {
|
|
3869
|
+
[p: string]: any;
|
|
3870
|
+
}, scales: Scales): number;
|
|
3871
|
+
highlightDataPoint(renderer: LineRenderer, renderSeries: IRenderSeries<ILineAccessors>, dataPointIndex: number, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3872
|
+
private emitEvent;
|
|
3873
|
+
}
|
|
3874
|
+
|
|
3875
|
+
/** Standard line renderer config for visualizing missing data */
|
|
3876
|
+
declare class MissingDataLineRendererConfig implements ILineRendererConfig {
|
|
3877
|
+
strokeWidth: number;
|
|
3878
|
+
interactive: boolean;
|
|
3879
|
+
strokeStyle: string;
|
|
3880
|
+
useEnhancedLineCaps: boolean;
|
|
3881
|
+
}
|
|
3882
|
+
|
|
3883
|
+
/**
|
|
3884
|
+
* Creates an {@link XYGrid} with predefined {@link AreaGridConfig}
|
|
3885
|
+
*
|
|
3886
|
+
* @returns {XYGrid}
|
|
3887
|
+
*/
|
|
3888
|
+
declare function areaGrid(): XYGrid;
|
|
3889
|
+
|
|
3890
|
+
interface IAreaDataAccessors extends IDataAccessors {
|
|
3891
|
+
x: DataAccessor;
|
|
3892
|
+
x0: DataAccessor;
|
|
3893
|
+
x1: DataAccessor;
|
|
3894
|
+
absoluteX0: DataAccessor;
|
|
3895
|
+
absoluteX1: DataAccessor;
|
|
3896
|
+
y: DataAccessor;
|
|
3897
|
+
y0: DataAccessor;
|
|
3898
|
+
y1: DataAccessor;
|
|
3899
|
+
absoluteY0: DataAccessor;
|
|
3900
|
+
absoluteY1: DataAccessor;
|
|
3901
|
+
}
|
|
3902
|
+
interface IAreaSeriesAccessors extends ISeriesAccessors {
|
|
3903
|
+
color?: SeriesAccessor;
|
|
3904
|
+
marker?: SeriesAccessor;
|
|
3905
|
+
}
|
|
3906
|
+
interface IAreaAccessors extends IAccessors {
|
|
3907
|
+
data: IAreaDataAccessors;
|
|
3908
|
+
series: IAreaSeriesAccessors;
|
|
3909
|
+
}
|
|
3910
|
+
declare class AreaAccessors implements IAreaAccessors {
|
|
3911
|
+
private colorProvider;
|
|
3912
|
+
private markerProvider;
|
|
3913
|
+
data: IAreaDataAccessors;
|
|
3914
|
+
series: IAreaSeriesAccessors;
|
|
3915
|
+
constructor(colorProvider?: IValueProvider<string>, markerProvider?: IValueProvider<IChartMarker>);
|
|
3916
|
+
}
|
|
3917
|
+
|
|
3918
|
+
/**
|
|
3919
|
+
* Renderer that is able to draw line chart
|
|
3920
|
+
*/
|
|
3921
|
+
declare class AreaRenderer extends XYRenderer<IAreaAccessors> {
|
|
3922
|
+
config: IAreaRendererConfig;
|
|
3923
|
+
private DEFAULT_CONFIG;
|
|
3924
|
+
/**
|
|
3925
|
+
* Creates an instance of AreaRenderer.
|
|
3926
|
+
* @param {IAreaRendererConfig} [config={}] Renderer configuration object
|
|
3927
|
+
*/
|
|
3928
|
+
constructor(config?: IAreaRendererConfig);
|
|
3929
|
+
/** See {@link Renderer#draw} */
|
|
3930
|
+
draw(renderSeries: IRenderSeries<IAreaAccessors>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3931
|
+
/**
|
|
3932
|
+
* Renders the line in prepared <path> element
|
|
3933
|
+
*
|
|
3934
|
+
* @param {IRenderSeries<IAreaAccessors>} renderSeries
|
|
3935
|
+
* @param {D3Selection} path D3 Selection with <path> element pre-created and pre-styled
|
|
3936
|
+
*/
|
|
3937
|
+
drawArea(renderSeries: IRenderSeries<IAreaAccessors>, path: D3Selection<SVGPathElement>): void;
|
|
3938
|
+
getDomain(data: any[], dataSeries: IDataSeries<IAreaAccessors>, scaleName: string, scale: IScale<any>): any[];
|
|
3939
|
+
/** See {@link Renderer#getRequiredLayers} */
|
|
3940
|
+
getRequiredLayers(): ILasagnaLayer[];
|
|
3941
|
+
/**
|
|
3942
|
+
* Filters given dataset by domain of provided scale
|
|
3943
|
+
*
|
|
3944
|
+
* @param data
|
|
3945
|
+
* @param dataSeries
|
|
3946
|
+
* @param scaleName
|
|
3947
|
+
* @param domain
|
|
3948
|
+
*/
|
|
3949
|
+
filterDataByDomain(data: any[], dataSeries: IDataSeries<IAreaAccessors>, scaleName: string, domain: any[]): any[];
|
|
3950
|
+
highlightDataPoint(renderSeries: IRenderSeries<IAreaAccessors>, dataPointIndex: number, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
3951
|
+
safetyCheck(value: number | undefined): number;
|
|
3952
|
+
}
|
|
3953
|
+
|
|
3954
|
+
declare function stackedAreaPreprocessor(chartSeriesSet: IChartAssistSeries<IAreaAccessors>[], isVisible: (chartSeries: IChartSeries<IAreaAccessors>) => boolean): IChartSeries<IAreaAccessors>[];
|
|
3955
|
+
declare function stackedArea(this: ChartAssist, chartSeriesSet: IChartAssistSeries<IAreaAccessors>[]): IChartAssistSeries<IAreaAccessors>[];
|
|
3956
|
+
|
|
3957
|
+
declare function stackedPercentageAreaPreprocessor(chartSeriesSet: IChartSeries<IAreaAccessors>[], isVisible: (chartSeries: IChartSeries<IAreaAccessors>) => boolean): IChartSeries<IAreaAccessors>[];
|
|
3958
|
+
declare function stackedPercentageArea(this: ChartAssist, chartSeriesSet: IChartAssistSeries<IAreaAccessors>[]): IChartAssistSeries<IAreaAccessors>[];
|
|
3959
|
+
declare function calculateDomainValueCombinedTotals(baseAccessorKey: string, valueAccessorKey: string, chartSeries: IChartSeries<IAreaAccessors>, isVisible: any, domainValueCombinedTotals: Record<any, number>): void;
|
|
3960
|
+
declare function applyStackMetadata(baseAccessorKey: string, valueAccessorKey: string, chartSeries: IChartSeries<IAreaAccessors>, isVisible: any, domainValueStacks: Record<any, number>, domainValueCombinedTotals: Record<any, number>): void;
|
|
3961
|
+
|
|
3962
|
+
declare function stackedAreaAccessors(colorProvider?: IValueProvider<string>, markerProvider?: IValueProvider<IChartMarker>): IAreaAccessors;
|
|
3963
|
+
|
|
3964
|
+
/**
|
|
3965
|
+
* Used for simplified threshold zone definition. It is expected the <code>start</code> to be <code>< end</code>.
|
|
3966
|
+
*/
|
|
3967
|
+
interface ISimpleThresholdZone {
|
|
3968
|
+
status: string;
|
|
3969
|
+
start?: number;
|
|
3970
|
+
end?: number;
|
|
3971
|
+
}
|
|
3972
|
+
interface ZoneCross {
|
|
3973
|
+
status: string;
|
|
3974
|
+
start?: Numeric;
|
|
3975
|
+
end?: Numeric;
|
|
3976
|
+
}
|
|
3977
|
+
/**
|
|
3978
|
+
* Used for specifying the start or end boundary of a zone
|
|
3979
|
+
*/
|
|
3980
|
+
declare enum ZoneBoundary {
|
|
3981
|
+
Start = "start",
|
|
3982
|
+
End = "end"
|
|
3983
|
+
}
|
|
3984
|
+
|
|
3985
|
+
/**
|
|
3986
|
+
* This service provides functionality that facilitates the creation of thresholds related visual element on charts.
|
|
3987
|
+
*/
|
|
3988
|
+
declare class ThresholdsService {
|
|
3989
|
+
private loggerService;
|
|
3990
|
+
static SERIES_ID_SUFFIX: string;
|
|
3991
|
+
constructor(loggerService: LoggerService);
|
|
3992
|
+
/**
|
|
3993
|
+
* 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
|
|
3994
|
+
* the threshold "statuses" assigned to each data point enables us to access the threshold information not only in other methods for threshold
|
|
3995
|
+
* calculation, but also in other places, like legend or tooltips.
|
|
3996
|
+
*
|
|
3997
|
+
* @param dataSeries source data series that will be enhanced with threshold metadata
|
|
3998
|
+
* @param zones zones defined as data series with IAreaAccessors
|
|
3999
|
+
*/
|
|
4000
|
+
injectThresholdsData(dataSeries: IDataSeries<ILineAccessors>, zones: IDataSeries<IAreaAccessors>[]): void;
|
|
4001
|
+
/**
|
|
4002
|
+
* This method creates a background series for TimeInterval or continuous (currently only works with time) scale.
|
|
4003
|
+
* If the series is continuous it detects intersection of source line data with given threshold zones and generates start / end for status periods.
|
|
4004
|
+
* Otherwise it will use the start and the end of the band.
|
|
4005
|
+
*
|
|
4006
|
+
* The default value of the rendererConfig parameter is {@link THRESHOLDS_MAIN_CHART_RENDERER_CONFIG}. For a summary chart, usually a smaller status
|
|
4007
|
+
* chart positioned below a main chart, use {@link THRESHOLDS_SUMMARY_RENDERER_CONFIG}.
|
|
4008
|
+
*
|
|
4009
|
+
* @param sourceSeries The data series from which to derive a background visualization
|
|
4010
|
+
* @param zones Zones defined as data series with IAreaAccessors
|
|
4011
|
+
* @param scales The scales to be used for the background visualization
|
|
4012
|
+
* @param colorProvider A value provider for the colors to be used for each status
|
|
4013
|
+
* @param thicknessMap Map of status to number specifying a custom height per status for the background visualization.
|
|
4014
|
+
* If a status is not specified in the map, the default thickness is the full height of the rendering area.
|
|
4015
|
+
* @param rendererConfig The renderer's configuration
|
|
4016
|
+
*/
|
|
4017
|
+
getBackgrounds(sourceSeries: IDataSeries<ILineAccessors>, zones: IDataSeries<IAreaAccessors>[], scales: Scales, colorProvider: IValueProvider<string>, thicknessMap?: Record<string, number>, rendererConfig?: IRendererConfig): IChartAssistSeries<IStatusAccessors>;
|
|
4018
|
+
/**
|
|
4019
|
+
* Calculates background data for continuous scale based on intersections between the source data and zone definitions.
|
|
4020
|
+
*
|
|
4021
|
+
* @param sourceSeries source data series from which to derive background data
|
|
4022
|
+
* @param zones zones defined as data series with IAreaAccessors
|
|
4023
|
+
*/
|
|
4024
|
+
private getBackgroundsDataForContinuousScale;
|
|
4025
|
+
/**
|
|
4026
|
+
* Calculate all "interesting" points along the data series that will be important to calculate the threshold status changes
|
|
4027
|
+
*
|
|
4028
|
+
* @param sourceSeries source data series from which to derive the break points
|
|
4029
|
+
* @param zones zones defined as data series with IAreaAccessors
|
|
4030
|
+
*/
|
|
4031
|
+
private getBreakPoints;
|
|
4032
|
+
/**
|
|
4033
|
+
* Generates threshold zone series from simplified zone definition. Simplified definition provides only two numbers to define the zone interval.
|
|
4034
|
+
* Creating these series manually is also possible for dynamic threshold limits.
|
|
4035
|
+
*
|
|
4036
|
+
* @param sourceSeries source data series from which to derive the zones
|
|
4037
|
+
* @param simpleZones a collection of zones that are each defined by a start value and/or an end value. (A missing
|
|
4038
|
+
start or end value indicates an infinite zone.)
|
|
4039
|
+
* @param colorProvider A value provider for the colors to be used for each status
|
|
4040
|
+
*/
|
|
4041
|
+
getThresholdZones(sourceSeries: IDataSeries<ILineAccessors>, simpleZones: ISimpleThresholdZone[], colorProvider: IValueProvider<string>): IDataSeries<IAreaAccessors>[];
|
|
4042
|
+
/**
|
|
4043
|
+
* Creates data series representing threshold lines on the chart. Solves collision between zones, where multiple zones are using the same limit value.
|
|
4044
|
+
*
|
|
4045
|
+
* @param zones Zones defined as data series with IAreaAccessors
|
|
4046
|
+
*/
|
|
4047
|
+
getThresholdLines(zones: IDataSeries<IAreaAccessors>[]): IChartAssistSeries<ILineAccessors>[];
|
|
4048
|
+
/**
|
|
4049
|
+
* Creates a IChartAssistSeries that represents a threshold zone limit defined by given valueAccessor
|
|
4050
|
+
*
|
|
4051
|
+
* @param zone A zone defined as a data series with IAreaAccessors
|
|
4052
|
+
* @param valueAccessor Accessor for the threshold limit
|
|
4053
|
+
* @param zoneBoundary The zone boundary represented by the line. Default is ZoneBoundary.Start.
|
|
4054
|
+
*/
|
|
4055
|
+
getThresholdLine(zone: IDataSeries<IAreaAccessors>, valueAccessor: DataAccessor, zoneBoundary?: ZoneBoundary): IChartAssistSeries<ILineAccessors>;
|
|
4056
|
+
/**
|
|
4057
|
+
* Calculates the point where the data series line will cross a threshold line using the two closest points for each
|
|
4058
|
+
*
|
|
4059
|
+
* @param {IPosition} dataFrom Data starting point
|
|
4060
|
+
* @param {IPosition} dataTo Data ending point
|
|
4061
|
+
* @param {IPosition} thresholdFrom Threshold starting point
|
|
4062
|
+
* @param {IPosition} thresholdTo Threshold ending point
|
|
4063
|
+
* @returns {IPosition} the position of the cross point or `null` if lines don't cross
|
|
4064
|
+
*/
|
|
4065
|
+
getCrossPoint(dataFrom: IPosition, dataTo: IPosition, thresholdFrom: IPosition, thresholdTo: IPosition): IPosition | undefined;
|
|
4066
|
+
/**
|
|
4067
|
+
* Find the zone that is relevant for current input data point defined by x, y coordinates.
|
|
4068
|
+
* Keep increasing the index while the next x value of threshold zone is still less than input x
|
|
4069
|
+
*
|
|
4070
|
+
* @param zones Zones defined as data series with IAreaAccessors
|
|
4071
|
+
* @param zoneIndexes provided indexes keep the last used value for searching for the given x coordinate, so it is expected that provided data points
|
|
4072
|
+
* are ordered by x in ascending order.
|
|
4073
|
+
* @param x The x value of the zone
|
|
4074
|
+
* @param y The y value of the zone
|
|
4075
|
+
*/
|
|
4076
|
+
private getZoneByXY;
|
|
4077
|
+
private moveZoneIndex;
|
|
4078
|
+
getCrossPointWithY(dataFrom: IPosition, dataTo: IPosition, y: number): IPosition | undefined;
|
|
4079
|
+
/**
|
|
4080
|
+
* Creates side indicator data series for given threshold zones
|
|
4081
|
+
*
|
|
4082
|
+
* @param zones Zones defined as data series with IAreaAccessors
|
|
4083
|
+
* @param scales The scales to be used for the side indicators
|
|
4084
|
+
* @param rendererConfig Configuration for the renderer. Default is the exported constant 'THRESHOLDS_MAIN_CHART_RENDERER_CONFIG'
|
|
4085
|
+
*/
|
|
4086
|
+
getSideIndicators(zones: IDataSeries<IAreaAccessors>[], scales: Scales, rendererConfig?: IRendererConfig): IChartAssistSeries<ISideIndicatorAccessors>[];
|
|
4087
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThresholdsService, never>;
|
|
4088
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ThresholdsService>;
|
|
4089
|
+
}
|
|
4090
|
+
|
|
4091
|
+
/**
|
|
4092
|
+
* Applies grid configuration for summary thresholds section
|
|
4093
|
+
*
|
|
4094
|
+
* @param c
|
|
4095
|
+
*/
|
|
4096
|
+
declare function thresholdsSummaryGridConfig(c?: XYGridConfig): XYGridConfig;
|
|
4097
|
+
|
|
4098
|
+
/**
|
|
4099
|
+
* Applies grid configuration that is used for main chart (with a threshold summary section below it)
|
|
4100
|
+
*
|
|
4101
|
+
* @param c
|
|
4102
|
+
*/
|
|
4103
|
+
declare function thresholdsTopGridConfig(c?: XYGridConfig): XYGridConfig;
|
|
4104
|
+
|
|
4105
|
+
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 };
|
|
4106
|
+
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 };
|