@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
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { IScale, ScalesIndex } from "./scales/types";
|
|
2
|
-
import { IAccessors, IChart, IChartSeries } from "./types";
|
|
3
|
-
/**
|
|
4
|
-
* @ignore
|
|
5
|
-
*
|
|
6
|
-
* Manages data and their domains
|
|
7
|
-
*/
|
|
8
|
-
export declare class DataManager {
|
|
9
|
-
private chart?;
|
|
10
|
-
private _chartSeriesSet;
|
|
11
|
-
private dataIndex;
|
|
12
|
-
private _scalesIndexByKey;
|
|
13
|
-
private _scalesIndexById;
|
|
14
|
-
get chartSeriesSet(): IChartSeries<IAccessors>[];
|
|
15
|
-
get scalesIndexByKey(): ScalesIndex;
|
|
16
|
-
get scalesIndexById(): {
|
|
17
|
-
[scaleId: string]: IScale<any>;
|
|
18
|
-
};
|
|
19
|
-
constructor(chart?: IChart | undefined);
|
|
20
|
-
update(seriesSet: IChartSeries<IAccessors>[]): void;
|
|
21
|
-
getChartSeries(seriesId: string): IChartSeries<IAccessors>;
|
|
22
|
-
private updateScaleDomain;
|
|
23
|
-
private buildScalesIndex;
|
|
24
|
-
updateScaleDomains(): void;
|
|
25
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DataAccessor, IAccessors, IDataSeries, SeriesAccessor } from "./types";
|
|
2
|
-
export declare class DataSeries implements IDataSeries<IAccessors> {
|
|
3
|
-
id: string;
|
|
4
|
-
accessors: {
|
|
5
|
-
data?: Record<string, DataAccessor | undefined>;
|
|
6
|
-
series?: Record<string, SeriesAccessor | undefined>;
|
|
7
|
-
};
|
|
8
|
-
data: any[];
|
|
9
|
-
name: string;
|
|
10
|
-
constructor(dataSeries: IDataSeries<IAccessors>);
|
|
11
|
-
}
|
package/core/common/lasagna.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { D3Selection, ILasagnaLayer } from "./types";
|
|
2
|
-
/** @ignore */
|
|
3
|
-
export declare class Lasagna {
|
|
4
|
-
private readonly clipPath;
|
|
5
|
-
static CONTAINER_CLASS: string;
|
|
6
|
-
static LAYER_CLASS: string;
|
|
7
|
-
layers: ILasagnaLayer[];
|
|
8
|
-
private readonly container;
|
|
9
|
-
constructor(target: D3Selection<SVGSVGElement>, clipPath: string);
|
|
10
|
-
addLayer(layer: ILasagnaLayer): D3Selection;
|
|
11
|
-
removeLayer(layerName: string): void;
|
|
12
|
-
getLayerContainer(name: string): D3Selection;
|
|
13
|
-
getContainer(): D3Selection<SVGGElement>;
|
|
14
|
-
private update;
|
|
15
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BehaviorSubject } from "rxjs";
|
|
2
|
-
import { D3Selection, IInteractionEvent, InteractionType } from "./types";
|
|
3
|
-
import { IAllAround } from "../grid/types";
|
|
4
|
-
/**
|
|
5
|
-
* @ignore
|
|
6
|
-
*/
|
|
7
|
-
export declare class MouseInteractiveArea<TTarget extends D3Selection<SVGGElement> = D3Selection<SVGGElement>, TInteractiveArea extends D3Selection<SVGRectElement> = D3Selection<SVGRectElement>> {
|
|
8
|
-
private target;
|
|
9
|
-
private interactiveArea;
|
|
10
|
-
private gridMargin?;
|
|
11
|
-
static CONTAINER_CLASS: string;
|
|
12
|
-
readonly active: BehaviorSubject<boolean>;
|
|
13
|
-
readonly interaction: BehaviorSubject<IInteractionEvent>;
|
|
14
|
-
private isActive;
|
|
15
|
-
constructor(target: TTarget, interactiveArea: TInteractiveArea, cursor: string, gridMargin?: IAllAround<number> | undefined);
|
|
16
|
-
onMouseInteraction: (interactionType: InteractionType) => void;
|
|
17
|
-
onMouseOver: () => void;
|
|
18
|
-
onMouseOut: () => void;
|
|
19
|
-
/** @deprecated - Please use 'onMouseOver' instead */
|
|
20
|
-
onMouseEnter: () => void;
|
|
21
|
-
/** @deprecated - Please use 'onMouseOut' instead */
|
|
22
|
-
onMouseLeave: () => void;
|
|
23
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IChartPalette, IValueProvider } from "../types";
|
|
2
|
-
export declare class ChartPalette implements IChartPalette {
|
|
3
|
-
private _standardColors;
|
|
4
|
-
private _textColors;
|
|
5
|
-
private _backgroundColors;
|
|
6
|
-
constructor(colors: string[] | IValueProvider<string>, options?: {
|
|
7
|
-
backgroundOpacity: number;
|
|
8
|
-
});
|
|
9
|
-
get standardColors(): IValueProvider<string>;
|
|
10
|
-
get backgroundColors(): IValueProvider<string>;
|
|
11
|
-
get textColors(): IValueProvider<string>;
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getColorValueByName(colorVariable: string): string;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { IChartMarker, IChartPalette, IValueProvider } from "../types";
|
|
2
|
-
export declare function defaultColorProvider(): IValueProvider<string>;
|
|
3
|
-
export declare function defaultPalette(): IChartPalette;
|
|
4
|
-
export declare function defaultMarkerProvider(): IValueProvider<IChartMarker>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IValueProvider } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* This class matches the provided colors to given series.
|
|
4
|
-
* It keeps track of already given colors to given entities to avoid conflicts.
|
|
5
|
-
*/
|
|
6
|
-
export declare class MappedValueProvider<T> implements IValueProvider<T> {
|
|
7
|
-
private valueMap;
|
|
8
|
-
private defaultValue?;
|
|
9
|
-
constructor(valueMap: {
|
|
10
|
-
[key: string]: T;
|
|
11
|
-
}, defaultValue?: T | undefined);
|
|
12
|
-
get: (entityId: string) => T | undefined;
|
|
13
|
-
reset(): void;
|
|
14
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { IChartMarker } from "../../types";
|
|
2
|
-
/**
|
|
3
|
-
* This class creates a ChartMarker based on provided data for svg path
|
|
4
|
-
*/
|
|
5
|
-
export declare class PathMarker implements IChartMarker {
|
|
6
|
-
/** Resulting <path> HTMLElement */
|
|
7
|
-
element: HTMLElement;
|
|
8
|
-
protected svg: string;
|
|
9
|
-
/**
|
|
10
|
-
* Creates an instance of PathMarker.
|
|
11
|
-
* @param {string} d value that has to be assigned to 'd' attribute of 'path' element in svg
|
|
12
|
-
* @memberof PathMarker
|
|
13
|
-
*/
|
|
14
|
-
constructor(d: string);
|
|
15
|
-
setColor(color: string): void;
|
|
16
|
-
private setAttributes;
|
|
17
|
-
getSvg(): string;
|
|
18
|
-
protected updateSvg(): void;
|
|
19
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IChartMarker } from "../../types";
|
|
2
|
-
/**
|
|
3
|
-
* This class creates a ChartMarker based on provided portion of svg markup
|
|
4
|
-
*/
|
|
5
|
-
export declare class SvgMarker implements IChartMarker {
|
|
6
|
-
protected svg: string;
|
|
7
|
-
protected styledSvg: string;
|
|
8
|
-
constructor(svg: string);
|
|
9
|
-
getSvg(): string;
|
|
10
|
-
setColor(color: string): void;
|
|
11
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SvgMarker } from "./markers/svg-marker";
|
|
2
|
-
/** Default single-shade color sequence for charts */
|
|
3
|
-
export declare const CHART_PALETTE_CS1: string[];
|
|
4
|
-
/** Default two-shade color sequence for charts */
|
|
5
|
-
export declare const CHART_PALETTE_CS2: string[];
|
|
6
|
-
/** Default three-shade color sequence for charts */
|
|
7
|
-
export declare const CHART_PALETTE_CS3: string[];
|
|
8
|
-
/** @deprecated
|
|
9
|
-
* Will be removed in v.12
|
|
10
|
-
* https://jira.solarwinds.com/browse/NUI-4296?jql=text%20~%20%22v11%22
|
|
11
|
-
*
|
|
12
|
-
* Default status color sequence for charts */
|
|
13
|
-
export declare const CHART_PALETTE_CS_S: string[];
|
|
14
|
-
/** Extended status color sequence for charts
|
|
15
|
-
* It will substitute the default one above in v.12
|
|
16
|
-
* https://jira.solarwinds.com/browse/NUI-5367
|
|
17
|
-
*/
|
|
18
|
-
export declare const CHART_PALETTE_CS_S_EXTENDED: string[];
|
|
19
|
-
/** Default chart marker set */
|
|
20
|
-
export declare const CHART_MARKERS: SvgMarker[];
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IValueProvider } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* This color provider processes values provided by the source provider using the given function.
|
|
4
|
-
* Examples would be darken, lighten, reduce opacity, etc.
|
|
5
|
-
*/
|
|
6
|
-
export declare class ProcessedColorProvider implements IValueProvider<string> {
|
|
7
|
-
private sourceProvider;
|
|
8
|
-
private fn;
|
|
9
|
-
private processedColors;
|
|
10
|
-
constructor(sourceProvider: IValueProvider<string>, fn: (input: string) => string);
|
|
11
|
-
get: (entityId: string) => string;
|
|
12
|
-
reset(): void;
|
|
13
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from "./chart-palette";
|
|
2
|
-
export * from "./mapped-value-provider";
|
|
3
|
-
export * from "./palettes";
|
|
4
|
-
export * from "./processed-color-provider";
|
|
5
|
-
export * from "./sequential-chart-marker-provider";
|
|
6
|
-
export * from "./sequential-color-provider";
|
|
7
|
-
export * from "./sequential-value-provider";
|
|
8
|
-
export * from "./text-color-provider";
|
|
9
|
-
export * from "./markers/path-marker";
|
|
10
|
-
export * from "./markers/svg-marker";
|
|
11
|
-
export * from "./default-providers";
|
|
12
|
-
export * from "./color.helper";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IChartMarker } from "../types";
|
|
2
|
-
import { SequentialValueProvider } from "./sequential-value-provider";
|
|
3
|
-
/**
|
|
4
|
-
* This class matches the provided markers to given series.
|
|
5
|
-
* It keeps track of already given markers to given entities to avoid conflicts.
|
|
6
|
-
*/
|
|
7
|
-
export declare class SequentialChartMarkerProvider extends SequentialValueProvider<IChartMarker> {
|
|
8
|
-
private markers;
|
|
9
|
-
constructor(markers: IChartMarker[]);
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SequentialValueProvider } from "./sequential-value-provider";
|
|
2
|
-
/**
|
|
3
|
-
* This class matches the provided colors to given series.
|
|
4
|
-
* It keeps track of already given colors to given entities to avoid conflicts.
|
|
5
|
-
*/
|
|
6
|
-
export declare class SequentialColorProvider extends SequentialValueProvider<string> {
|
|
7
|
-
private colors;
|
|
8
|
-
constructor(colors: string[]);
|
|
9
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IValueProvider } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* This class matches the provided instances of type <T> to given series.
|
|
4
|
-
* It keeps track of already given instances to given entities to avoid conflicts.
|
|
5
|
-
*/
|
|
6
|
-
export declare class SequentialValueProvider<T> implements IValueProvider<T> {
|
|
7
|
-
private values;
|
|
8
|
-
private providedValues;
|
|
9
|
-
private lastUsedIndex;
|
|
10
|
-
constructor(values: T[]);
|
|
11
|
-
get: (entityId: string) => T;
|
|
12
|
-
reset(): void;
|
|
13
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { IValueProvider } from "../types";
|
|
2
|
-
import { ProcessedColorProvider } from "./processed-color-provider";
|
|
3
|
-
/**
|
|
4
|
-
* This color provider calculates foreground color based on contrast ratio of provided colors
|
|
5
|
-
*/
|
|
6
|
-
export declare class TextColorProvider extends ProcessedColorProvider {
|
|
7
|
-
constructor(sourceProvider: IValueProvider<string>, colorDefinitions: {
|
|
8
|
-
light: string;
|
|
9
|
-
dark: string;
|
|
10
|
-
});
|
|
11
|
-
/**
|
|
12
|
-
* Calculate contrast ratio of two given colors (https://www.w3.org/TR/WCAG20/#contrast-ratiodef)
|
|
13
|
-
*
|
|
14
|
-
* @param {RGBColor} color1
|
|
15
|
-
* @param {RGBColor} color2
|
|
16
|
-
* @returns {number} luminance ratio
|
|
17
|
-
*/
|
|
18
|
-
private getContrastRatio;
|
|
19
|
-
/**
|
|
20
|
-
* Calculates relative luminance of given color (https://www.w3.org/TR/WCAG20/relative-luminance.xml)
|
|
21
|
-
*
|
|
22
|
-
* @param {RGBColor} rgbColor
|
|
23
|
-
* @returns {number}
|
|
24
|
-
*/
|
|
25
|
-
private getRelativeLuminance;
|
|
26
|
-
private adjustGamma;
|
|
27
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from "./palette/public-api";
|
|
2
|
-
export * from "./scales/public-api";
|
|
3
|
-
export * from "./chart-plugin";
|
|
4
|
-
export * from "./data-manager";
|
|
5
|
-
export * from "./data-series";
|
|
6
|
-
export * from "./event-bus";
|
|
7
|
-
export * from "./types";
|
|
8
|
-
export * from "./lasagna";
|
|
9
|
-
export * from "./mouse-interactive-area";
|
|
10
|
-
export * from "./render-engine";
|
|
11
|
-
export * from "./renderer";
|
|
12
|
-
export * from "./utility.service";
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Subject } from "rxjs";
|
|
2
|
-
import { DataManager } from "./data-manager";
|
|
3
|
-
import { Lasagna } from "./lasagna";
|
|
4
|
-
import { IInteractionDataPointsEvent, IRendererEventPayload, IRenderStateData } from "./types";
|
|
5
|
-
import { IInteractionValuesPayload } from "../plugins/types";
|
|
6
|
-
/**
|
|
7
|
-
* @ignore
|
|
8
|
-
*
|
|
9
|
-
* Manages and executes drawing and data point highlighting for each data series renderer and handles the setting of series display states
|
|
10
|
-
*/
|
|
11
|
-
export declare class RenderEngine {
|
|
12
|
-
private lasagna;
|
|
13
|
-
private dataManager;
|
|
14
|
-
/** Subject for emitting events to the outside world about data points closest to an interaction on the chart */
|
|
15
|
-
interactionDataPointsSubject: Subject<IInteractionDataPointsEvent>;
|
|
16
|
-
/** Subject passed to the renderer for triggering events regarding a data point */
|
|
17
|
-
rendererSubject: Subject<IRendererEventPayload<any>>;
|
|
18
|
-
private highlightDataPointSubscription;
|
|
19
|
-
private highlightedDataPoints;
|
|
20
|
-
private renderLayers;
|
|
21
|
-
private layerIndex;
|
|
22
|
-
constructor(lasagna: Lasagna, dataManager: DataManager);
|
|
23
|
-
/**
|
|
24
|
-
* Invokes the draw method on each of the series renderers
|
|
25
|
-
*/
|
|
26
|
-
update(): void;
|
|
27
|
-
/**
|
|
28
|
-
* Updates the lasagna layers and series containers based on the current series set
|
|
29
|
-
*/
|
|
30
|
-
updateSeriesContainers(): void;
|
|
31
|
-
/**
|
|
32
|
-
* Emits the HIGHLIGHT_DATA_POINT_EVENT if the highlighted index changes for a particular series.
|
|
33
|
-
* Emits an event with information about all of the highlighted data points if the highlighted index changes for any series.
|
|
34
|
-
*
|
|
35
|
-
* @param {IHighlightXYPayload} highlightedValues The highlighted values for each scale
|
|
36
|
-
*/
|
|
37
|
-
emitInteractionDataPoints(payload: IInteractionValuesPayload): void;
|
|
38
|
-
/**
|
|
39
|
-
* Invokes the renderer highlightDataPoint method for the specified series
|
|
40
|
-
*
|
|
41
|
-
* @param {string} seriesId The series on which to highlight a data point
|
|
42
|
-
* @param {number} index The data point index to highlight
|
|
43
|
-
*/
|
|
44
|
-
highlightDataPoint(seriesId: string, index: number): void;
|
|
45
|
-
/**
|
|
46
|
-
* Sets attributes specified in each state data object to the appropriate the series containers.
|
|
47
|
-
* Invokes a renderer's setSeriesState method when the state of its series container has been updated.
|
|
48
|
-
*
|
|
49
|
-
* @param {IRenderStateData[]} stateDataSet A collection of series states
|
|
50
|
-
*/
|
|
51
|
-
setSeriesStates(stateDataSet: IRenderStateData[]): void;
|
|
52
|
-
destroy(): void;
|
|
53
|
-
private buildLayerIndex;
|
|
54
|
-
private removeUnusedLayers;
|
|
55
|
-
private addNeededLayers;
|
|
56
|
-
private updateLayerContents;
|
|
57
|
-
private getSeriesChildContainers;
|
|
58
|
-
private getChildContainerId;
|
|
59
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { Selection } from "d3-selection";
|
|
2
|
-
import { ValueMap } from "d3-selection-multi";
|
|
3
|
-
import { Subject } from "rxjs";
|
|
4
|
-
import { IScale, Scales } from "./scales/types";
|
|
5
|
-
import { D3Selection, IAccessors, IDataPoint, IDataSeries, ILasagnaLayer, IPosition, IRenderContainers, IRendererConfig, IRendererEventPayload } from "./types";
|
|
6
|
-
import { IRenderSeries, RenderState } from "../../renderers/types";
|
|
7
|
-
/**
|
|
8
|
-
* The abstract base class for chart renderers with some limited default functionality
|
|
9
|
-
*/
|
|
10
|
-
export declare abstract class Renderer<TA extends IAccessors> {
|
|
11
|
-
config: IRendererConfig;
|
|
12
|
-
static readonly DEFAULT_CONFIG: IRendererConfig;
|
|
13
|
-
constructor(config?: IRendererConfig);
|
|
14
|
-
interaction: Record<string, any>;
|
|
15
|
-
/**
|
|
16
|
-
* Draw the visual representation of the provided data series
|
|
17
|
-
*
|
|
18
|
-
* @param {IRenderSeries} renderSeries The series to render
|
|
19
|
-
* @param {Subject<IRendererEventPayload>} rendererSubject A subject to optionally invoke for emitting events regarding a data point
|
|
20
|
-
*/
|
|
21
|
-
abstract draw(renderSeries: IRenderSeries<TA>, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
22
|
-
/**
|
|
23
|
-
* Return position of a specified datapoint
|
|
24
|
-
*
|
|
25
|
-
* @param {IDataSeries} dataSeries
|
|
26
|
-
* @param {number} index
|
|
27
|
-
* @param {Scales} scales
|
|
28
|
-
* @returns {IPosition}
|
|
29
|
-
*/
|
|
30
|
-
abstract getDataPointPosition(dataSeries: IDataSeries<TA>, index: number, scales: Scales): IPosition | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* Based on provided values, return the nearest data point that the given coordinates represent. This is used for mouse hover behavior
|
|
33
|
-
*
|
|
34
|
-
* @param {IDataSeries} series series from which to determine the index corresponding to the specified values
|
|
35
|
-
* @param {{ [axis: string]: any }} values the values from which a data point index can be determined
|
|
36
|
-
* @param {Scales} scales the scales to be used in the index calculation
|
|
37
|
-
*
|
|
38
|
-
* @returns {number} negative value means that index is not found
|
|
39
|
-
*/
|
|
40
|
-
getDataPointIndex(series: IDataSeries<TA>, values: {
|
|
41
|
-
[axis: string]: any;
|
|
42
|
-
}, scales: Scales): number;
|
|
43
|
-
/**
|
|
44
|
-
* Highlight the data point corresponding to the specified data point index
|
|
45
|
-
*
|
|
46
|
-
* @param {IRenderSeries} renderSeries The series on which to render the data point highlight
|
|
47
|
-
* @param {number} dataPointIndex index of the highlighted point within the data series (pass -1 to remove the highlight marker)
|
|
48
|
-
* @param {Subject<IRendererEventPayload>} rendererSubject A subject to optionally invoke for emitting events regarding a data point
|
|
49
|
-
*/
|
|
50
|
-
highlightDataPoint(renderSeries: IRenderSeries<TA>, dataPointIndex: number, rendererSubject: Subject<IRendererEventPayload>): void;
|
|
51
|
-
/**
|
|
52
|
-
* Get the style attributes for the specified state that we need to apply to a series container
|
|
53
|
-
*
|
|
54
|
-
* @param {RenderState} state the state for which to retrieve container styles
|
|
55
|
-
*
|
|
56
|
-
* @returns {ValueMap<any, any>} the container styles for the specified state
|
|
57
|
-
*/
|
|
58
|
-
getContainerStateStyles: (state: RenderState) => ValueMap<any, any>;
|
|
59
|
-
/**
|
|
60
|
-
* Set the RenderState of the target data series
|
|
61
|
-
*
|
|
62
|
-
* @param {IRenderContainers} renderContainers the render containers of the series
|
|
63
|
-
* @param {RenderState} state The new state for the target series
|
|
64
|
-
*/
|
|
65
|
-
setSeriesState(renderContainers: IRenderContainers, state: RenderState): void;
|
|
66
|
-
/**
|
|
67
|
-
* Set the RenderState of the target data point
|
|
68
|
-
*
|
|
69
|
-
* @param {D3Selection} target the target data point
|
|
70
|
-
* @param {RenderState} state The new state for the target data point
|
|
71
|
-
*/
|
|
72
|
-
setDataPointState(target: D3Selection, state: RenderState): void;
|
|
73
|
-
/**
|
|
74
|
-
* Calculate domain for data filtered by given filterScales
|
|
75
|
-
*
|
|
76
|
-
* @param dataSeries
|
|
77
|
-
* @param filterScales
|
|
78
|
-
* @param scaleKey
|
|
79
|
-
* @param scale
|
|
80
|
-
* @returns array of datapoints from <code>dataSeries</code> filtered by domains of given <code>filterScale</code>s
|
|
81
|
-
*/
|
|
82
|
-
getDomainOfFilteredData(dataSeries: IDataSeries<TA>, filterScales: Record<string, IScale<any>>, scaleKey: string, scale: IScale<any>): any[];
|
|
83
|
-
/**
|
|
84
|
-
* Calculate the domain using the data of a series
|
|
85
|
-
*
|
|
86
|
-
* @param {any[]} data source data, can be filtered
|
|
87
|
-
* @param dataSeries related data series
|
|
88
|
-
* @param {string} scaleName name of the scale for which domain calculation is needed
|
|
89
|
-
* @param scale
|
|
90
|
-
*
|
|
91
|
-
* @returns {[any, any]} min and max values as an array
|
|
92
|
-
*/
|
|
93
|
-
getDomain(data: any[], dataSeries: IDataSeries<TA>, scaleName: string, scale: IScale<any>): any[];
|
|
94
|
-
/**
|
|
95
|
-
* Filters given dataset by domain of provided scale
|
|
96
|
-
*
|
|
97
|
-
* @param data
|
|
98
|
-
* @param dataSeries
|
|
99
|
-
* @param scaleName
|
|
100
|
-
* @param domain
|
|
101
|
-
*/
|
|
102
|
-
filterDataByDomain(data: any[], dataSeries: IDataSeries<TA>, scaleName: string, domain: any[]): any[];
|
|
103
|
-
/**
|
|
104
|
-
* Get the definitions of lasagna layers required for visualizing data
|
|
105
|
-
*
|
|
106
|
-
* @returns {ILasagnaLayer[]} lasagna layer definitions
|
|
107
|
-
*/
|
|
108
|
-
getRequiredLayers(): ILasagnaLayer[];
|
|
109
|
-
protected setupInteraction(path: string[], nativeEvent: string, target: Selection<any, any, any, any>, dataPointSubject: Subject<IRendererEventPayload>, dataPoint: Partial<IDataPoint>): void;
|
|
110
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { LinearScale } from "./linear-scale";
|
|
2
|
-
import { Scale } from "./scale";
|
|
3
|
-
import { IBandScale, IHasInnerScale, IScale } from "./types";
|
|
4
|
-
/**
|
|
5
|
-
* Nova wrapper around [D3's scaleBand](https://d3indepth.com/scales/#scaleband)
|
|
6
|
-
* A typical use case for a band scale is a bar chart
|
|
7
|
-
*/
|
|
8
|
-
export declare class BandScale<T = string> extends Scale<T> implements IBandScale<T>, IHasInnerScale<T> {
|
|
9
|
-
innerScale: IScale<any>;
|
|
10
|
-
constructor(id?: string);
|
|
11
|
-
protected createD3Scale(): any;
|
|
12
|
-
/**
|
|
13
|
-
* This returns center of a band. To return the beginning of a band, manually subtract this.bandwidth()/2
|
|
14
|
-
* This differs from the "bandScale.convert" method in d3
|
|
15
|
-
*
|
|
16
|
-
* @param {T} value The value to convert
|
|
17
|
-
* @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.
|
|
18
|
-
* @returns {number} Center of a band
|
|
19
|
-
*/
|
|
20
|
-
convert(value: T, position?: number): number;
|
|
21
|
-
/**
|
|
22
|
-
* Converts the specified coordinate into the value of the closest band data point
|
|
23
|
-
*
|
|
24
|
-
* @param {number} coordinate The coordinate to convert
|
|
25
|
-
* @returns {T} The value of the closest band data point
|
|
26
|
-
*/
|
|
27
|
-
invert(coordinate: number): T;
|
|
28
|
-
/** See {@link IScale#range} */
|
|
29
|
-
range(): [number, number];
|
|
30
|
-
range(range: [number, number]): this;
|
|
31
|
-
/**
|
|
32
|
-
* Gets the rounded setting for the scale
|
|
33
|
-
*
|
|
34
|
-
* @returns {boolean} The value indicating whether the scale is rounded
|
|
35
|
-
*/
|
|
36
|
-
round(): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Sets whether the scale should be rounded
|
|
39
|
-
* Rounding helps to have crisp edges https://github.com/d3/d3-scale#band_round
|
|
40
|
-
*
|
|
41
|
-
* @param {boolean} round The specified round setting
|
|
42
|
-
*/
|
|
43
|
-
round(round: boolean): this;
|
|
44
|
-
/**
|
|
45
|
-
* A convenience method for setting the inner and outer padding.
|
|
46
|
-
* This differs from D3 implementation. We're setting the outer padding to half of the inner padding.
|
|
47
|
-
*
|
|
48
|
-
* @param padding Value in [0, 1] interval.
|
|
49
|
-
*/
|
|
50
|
-
padding(padding: number): this;
|
|
51
|
-
/**
|
|
52
|
-
* Returns the current alignment which defaults to 0.5.
|
|
53
|
-
*
|
|
54
|
-
* @returns {number} The current alignment
|
|
55
|
-
*/
|
|
56
|
-
align(): number;
|
|
57
|
-
/**
|
|
58
|
-
* Sets the alignment to the specified value which must be in the range [0, 1].
|
|
59
|
-
*
|
|
60
|
-
* The default is 0.5.
|
|
61
|
-
*
|
|
62
|
-
* The alignment determines how any leftover unused space in the range is distributed.
|
|
63
|
-
* A value of 0.5 indicates that the leftover space should be equally distributed before the first band and
|
|
64
|
-
* after the last band, i.e. the bands should be centered within the range. A value of 0 or 1 may be used to
|
|
65
|
-
* shift the bands to one side, say to position them adjacent to an axis.
|
|
66
|
-
*
|
|
67
|
-
* @param {number} align Value for alignment setting in [0, 1] interval.
|
|
68
|
-
*/
|
|
69
|
-
align(align: number): this;
|
|
70
|
-
/**
|
|
71
|
-
* Returns the width of each band (bar).
|
|
72
|
-
*/
|
|
73
|
-
bandwidth(): number;
|
|
74
|
-
/**
|
|
75
|
-
* Returns the width of each step with paddings.
|
|
76
|
-
* Please note the fact that bandScale._d3Scale.step() returns step size without outer paddings!
|
|
77
|
-
*/
|
|
78
|
-
step(): number;
|
|
79
|
-
/**
|
|
80
|
-
* Creates linear scale with domain and range that are equal to current scale's range
|
|
81
|
-
*/
|
|
82
|
-
copyToLinear(): LinearScale;
|
|
83
|
-
/**
|
|
84
|
-
* Gets the locations for the band ticks
|
|
85
|
-
*
|
|
86
|
-
* @returns {number[]} The band tick locations
|
|
87
|
-
*/
|
|
88
|
-
bandTicks(): number[];
|
|
89
|
-
isContinuous(): boolean;
|
|
90
|
-
private getRangeMidPoints;
|
|
91
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { DomainCalculator } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* Returns automatically calculated domain for given scaleKey based on given set of chart series. It considers scales with fixed domains for limiting
|
|
4
|
-
* considered data set.
|
|
5
|
-
*
|
|
6
|
-
* @param {IChartSeries<IAccessors>[]} chartSeriesSet
|
|
7
|
-
* @param {string} scaleKey
|
|
8
|
-
* @param scale
|
|
9
|
-
* @returns {[any, any]} domain
|
|
10
|
-
*/
|
|
11
|
-
export declare const getAutomaticDomain: DomainCalculator;
|
|
12
|
-
/**
|
|
13
|
-
* Works like getAutomaticDomain, but also includes provided interval in the calculated result
|
|
14
|
-
*
|
|
15
|
-
* @param {[number , number]} interval
|
|
16
|
-
* @returns {(chartSeriesSet: IChartSeries<IAccessors>[], scaleId: string) => [number , number]} A domain calculator
|
|
17
|
-
* that includes the specified interval in its calculation
|
|
18
|
-
*/
|
|
19
|
-
export declare const getAutomaticDomainWithIncludedInterval: (interval: [number, number]) => DomainCalculator;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IChartSeries } from "../../types";
|
|
2
|
-
import { DomainCalculator, IScale } from "../types";
|
|
3
|
-
/**
|
|
4
|
-
* Domain calculator that adds given series to the domain calculation
|
|
5
|
-
*
|
|
6
|
-
* @param additionalSeriesFn this function returns series to be added
|
|
7
|
-
* @param domainCalculator
|
|
8
|
-
*/
|
|
9
|
-
export declare const domainWithAuxiliarySeries: (additionalSeriesFn: () => IChartSeries<any>[], domainCalculator: DomainCalculator) => (chartSeriesSet: IChartSeries<any>[], scaleId: string, scale: IScale<any>) => any[];
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { IAxisConfig } from "../../../grid/types";
|
|
2
|
-
import { DomainCalculator, IDomainWithTicksCalculator } from "../types";
|
|
3
|
-
export declare const getAutomaticDomainWithTicks: (config: IAxisConfig, axisGenerator: any, domainCalculator: DomainCalculator) => IDomainWithTicksCalculator;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./datetime-formatter";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IScale } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* Apart from just calling scale.convert, this method can also handle multilevel band scales that return arrays of values
|
|
4
|
-
*
|
|
5
|
-
* @param scale
|
|
6
|
-
* @param value
|
|
7
|
-
* @param {number} position Number in the range of [0, 1] that will define the point inside of the band. Where 0 stands for start.
|
|
8
|
-
* @param levels how many levels deep can we go during the conversion
|
|
9
|
-
*/
|
|
10
|
-
export declare function convert(scale: IScale<any>, value: any, position?: number, levels?: number): number;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IScale } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* Simple utility function that checks if given 'px' value is within the interval of the range of given scale
|
|
4
|
-
*
|
|
5
|
-
* @param scale
|
|
6
|
-
* @param px
|
|
7
|
-
*/
|
|
8
|
-
export declare function isInRange(scale: IScale<any>, px: number): boolean;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Scale } from "./scale";
|
|
2
|
-
/**
|
|
3
|
-
* Nova wrapper around [D3's scaleLinear](https://d3indepth.com/scales/#scalelinear)
|
|
4
|
-
*/
|
|
5
|
-
export declare class LinearScale extends Scale<number> {
|
|
6
|
-
constructor(id?: string);
|
|
7
|
-
protected createD3Scale(): any;
|
|
8
|
-
convert(value: number): number;
|
|
9
|
-
invert(coordinate: number): number;
|
|
10
|
-
isContinuous(): boolean;
|
|
11
|
-
isDomainValid(): boolean;
|
|
12
|
-
}
|