@nova-ui/charts 19.0.2 → 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 +49 -49
- 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/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 -11
- 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,53 +0,0 @@
|
|
|
1
|
-
import { IInteractionValues } from "../plugins/types";
|
|
2
|
-
import { IScale } from "./scales/types";
|
|
3
|
-
export declare class UtilityService {
|
|
4
|
-
private static getValueAccessor;
|
|
5
|
-
static getClosestIndex<T>(haystack: T[], accessor: (d: T, i: number) => any, needle: any): number | undefined;
|
|
6
|
-
private static getCloser;
|
|
7
|
-
/**
|
|
8
|
-
* Clamps given value to range
|
|
9
|
-
*
|
|
10
|
-
* @param {number} value
|
|
11
|
-
* @param {[number , number]} range
|
|
12
|
-
* @returns {number}
|
|
13
|
-
*/
|
|
14
|
-
static clampToRange(value: number, range: [number, number]): number;
|
|
15
|
-
static uuid(): string;
|
|
16
|
-
/**
|
|
17
|
-
* CSS.escape() replacement
|
|
18
|
-
* @param value
|
|
19
|
-
* @returns {string}
|
|
20
|
-
*/
|
|
21
|
-
static cssEscape(value: any): string;
|
|
22
|
-
/**
|
|
23
|
-
* This method performs a binary search to find an index in the `haystack` that is the closest representation of given `needle`.
|
|
24
|
-
*
|
|
25
|
-
* @param haystack
|
|
26
|
-
* @param needle
|
|
27
|
-
* @param selector this function is used to process the `haystack` elements
|
|
28
|
-
*/
|
|
29
|
-
static findNearestIndex<T>(haystack: T[], needle: any, selector?: (d: T, index: number) => any): number;
|
|
30
|
-
/**
|
|
31
|
-
* Gets the 'x' and 'y' scale values based on the specified scales and raw x-y coordinates
|
|
32
|
-
*
|
|
33
|
-
* @param xScales
|
|
34
|
-
* @param yScales
|
|
35
|
-
* @param xCoordinate
|
|
36
|
-
* @param yCoordinate
|
|
37
|
-
*/
|
|
38
|
-
static getXYValues(xScales: IScale<any>[], yScales: IScale<any>[], xCoordinate: number, yCoordinate: number): IInteractionValues;
|
|
39
|
-
/**
|
|
40
|
-
* Gets the scale value based on the specified scales and raw coordinate
|
|
41
|
-
*
|
|
42
|
-
* @param scales
|
|
43
|
-
* @param coordinate
|
|
44
|
-
*/
|
|
45
|
-
static getScaleValues(scales: IScale<any>[], coordinate: number): Record<string, any>;
|
|
46
|
-
/**
|
|
47
|
-
* get values for interaction
|
|
48
|
-
* @param valueMap map of values by scaleId
|
|
49
|
-
* @param scaleId preferred scaleId
|
|
50
|
-
* @returns value from scaleId or first availabel scale
|
|
51
|
-
*/
|
|
52
|
-
static getInteractionValues(valueMap: Record<string, any> | null | undefined, scaleId: string): any;
|
|
53
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IAxisConfig, ITickLabelConfig } from "../types";
|
|
2
|
-
/** See {@link IAxisConfig} */
|
|
3
|
-
export declare class AxisConfig implements IAxisConfig {
|
|
4
|
-
/** See {@link IAxisConfig#visible} */
|
|
5
|
-
visible: boolean;
|
|
6
|
-
/** See {@link IAxisConfig#gridTicks} */
|
|
7
|
-
gridTicks: boolean;
|
|
8
|
-
/** See {@link IAxisConfig#tickSize} */
|
|
9
|
-
tickSize: number;
|
|
10
|
-
/** See {@link IAxisConfig#tickLabel} */
|
|
11
|
-
tickLabel: ITickLabelConfig;
|
|
12
|
-
/** See {@link IAxisConfig#fit} */
|
|
13
|
-
fit: boolean;
|
|
14
|
-
private _approximateTicks;
|
|
15
|
-
/** See {@link IAxisConfig#approximateTicks} */
|
|
16
|
-
get approximateTicks(): any;
|
|
17
|
-
/** See {@link IAxisConfig#approximateTicks} */
|
|
18
|
-
set approximateTicks(ticks: any);
|
|
19
|
-
padding: number;
|
|
20
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { IAllAround, IDimensionConfig } from "../types";
|
|
2
|
-
export declare class DimensionConfig implements IDimensionConfig {
|
|
3
|
-
private _width;
|
|
4
|
-
private _height;
|
|
5
|
-
/** See {@link IDimensionConfig#margin} */
|
|
6
|
-
margin: IAllAround<number>;
|
|
7
|
-
/** See {@link IDimensionConfig#padding} */
|
|
8
|
-
padding: IAllAround<number>;
|
|
9
|
-
/** See {@link IDimensionConfig#marginLocked} */
|
|
10
|
-
marginLocked: IAllAround<boolean>;
|
|
11
|
-
/** See {@link IDimensionConfig#autoWidth} */
|
|
12
|
-
autoWidth: boolean;
|
|
13
|
-
/** See {@link IDimensionConfig#autoHeight} */
|
|
14
|
-
autoHeight: boolean;
|
|
15
|
-
/** See {@link IDimensionConfig#width} */
|
|
16
|
-
width(): number;
|
|
17
|
-
/** See {@link IDimensionConfig#width} */
|
|
18
|
-
width(value: number): IDimensionConfig;
|
|
19
|
-
/** See {@link IDimensionConfig#height} */
|
|
20
|
-
height(): number;
|
|
21
|
-
/** See {@link IDimensionConfig#height} */
|
|
22
|
-
height(value: number): IDimensionConfig;
|
|
23
|
-
/** See {@link IDimensionConfig#outerWidth} */
|
|
24
|
-
outerWidth(): number;
|
|
25
|
-
/** See {@link IDimensionConfig#outerWidth} */
|
|
26
|
-
outerWidth(value: number): IDimensionConfig;
|
|
27
|
-
/** See {@link IDimensionConfig#outerHeight} */
|
|
28
|
-
outerHeight(): number;
|
|
29
|
-
/** See {@link IDimensionConfig#outerHeight} */
|
|
30
|
-
outerHeight(value: number): IDimensionConfig;
|
|
31
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IAllAround, IBorderConfig, IDimensionConfig, IGridConfig } from "../types";
|
|
2
|
-
/** See {@link IGridConfig} */
|
|
3
|
-
export declare class GridConfig implements IGridConfig {
|
|
4
|
-
/** See {@link IGridConfig#interactive} */
|
|
5
|
-
interactive: boolean;
|
|
6
|
-
/** See {@link IGridConfig#dimension} */
|
|
7
|
-
dimension: IDimensionConfig;
|
|
8
|
-
/** See {@link IGridConfig#borders} */
|
|
9
|
-
borders: IAllAround<IBorderConfig>;
|
|
10
|
-
/** See {@link IGridConfig#cursor} */
|
|
11
|
-
cursor: string;
|
|
12
|
-
/** See {@link IGridConfig#disableRenderAreaHeightCorrection} */
|
|
13
|
-
disableRenderAreaHeightCorrection: boolean;
|
|
14
|
-
/** See {@link IGridConfig#disableRenderAreaWidthCorrection} */
|
|
15
|
-
disableRenderAreaWidthCorrection: boolean;
|
|
16
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { XYGridConfig } from "./xy-grid-config";
|
|
2
|
-
import { GaugeMode, StandardLinearGaugeThickness } from "../../../gauge/constants";
|
|
3
|
-
/**
|
|
4
|
-
* Assembles a linear-gauge-specific grid configuration
|
|
5
|
-
*
|
|
6
|
-
* @param mode vertical or horizontal
|
|
7
|
-
* @param thickness The thickness of the gauge
|
|
8
|
-
*
|
|
9
|
-
* @returns {XYGridConfig} A linear gauge grid configuration
|
|
10
|
-
*/
|
|
11
|
-
export declare function linearGaugeGridConfig(mode: GaugeMode.Vertical | GaugeMode.Horizontal, thickness?: StandardLinearGaugeThickness): XYGridConfig;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from "./axis-config";
|
|
2
|
-
export * from "./border-config";
|
|
3
|
-
export * from "./dimension-config";
|
|
4
|
-
export * from "./linear-gauge-grid-config-fn";
|
|
5
|
-
export * from "./grid-config";
|
|
6
|
-
export * from "./area-grid-config";
|
|
7
|
-
export * from "./bar-grid-config";
|
|
8
|
-
export * from "./bar-horizontal-grid-config";
|
|
9
|
-
export * from "./bar-status-grid-config";
|
|
10
|
-
export * from "./spark-chart-grid-config";
|
|
11
|
-
export * from "./xy-grid-config";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { XYGridConfig } from "./xy-grid-config";
|
|
2
|
-
/**
|
|
3
|
-
* Applies spark chart specific grid configuration
|
|
4
|
-
*
|
|
5
|
-
* @param c
|
|
6
|
-
* @param showBottomAxis
|
|
7
|
-
* @param showTopBorder
|
|
8
|
-
*/
|
|
9
|
-
export declare function sparkChartGridConfig(c?: XYGridConfig, showBottomAxis?: boolean, showTopBorder?: boolean): XYGridConfig;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IAllAround, IAxisConfig, IXYGridConfig } from "../types";
|
|
2
|
-
import { GridConfig } from "./grid-config";
|
|
3
|
-
export declare class XYGridConfig extends GridConfig implements IXYGridConfig {
|
|
4
|
-
/** The default margin */
|
|
5
|
-
static readonly DEFAULT_MARGIN: IAllAround<number>;
|
|
6
|
-
static readonly DEFAULT_PADDING: IAllAround<number>;
|
|
7
|
-
axis: IAllAround<IAxisConfig>;
|
|
8
|
-
interactionPlugins: boolean;
|
|
9
|
-
constructor();
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BaseType } from "d3";
|
|
2
|
-
import { Selection } from "d3-selection";
|
|
3
|
-
import { ITextOverflowArgs } from "./types";
|
|
4
|
-
/**
|
|
5
|
-
* Default handler for text overflow
|
|
6
|
-
*
|
|
7
|
-
* @param textSelection
|
|
8
|
-
* @param args
|
|
9
|
-
*/
|
|
10
|
-
export declare function defaultTextOverflowHandler(textSelection: Selection<BaseType, unknown, null, undefined>, args: ITextOverflowArgs): void;
|
package/core/grid/grid.d.ts
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { Selection } from "d3-selection";
|
|
2
|
-
import { Subject } from "rxjs";
|
|
3
|
-
import { EventBus } from "../common/event-bus";
|
|
4
|
-
import { Lasagna } from "../common/lasagna";
|
|
5
|
-
import { ScalesIndex } from "../common/scales/types";
|
|
6
|
-
import { IChart, IChartEvent, IChartPlugin } from "../common/types";
|
|
7
|
-
import { D3Selection } from "../common/types";
|
|
8
|
-
import { IBorders, IDimensions, IGrid, IGridConfig } from "./types";
|
|
9
|
-
export declare const borderMidpoint = 0.5;
|
|
10
|
-
/**
|
|
11
|
-
* @implements {IGrid}
|
|
12
|
-
* Implementation for the dimensions, scaling, interactive area, and borders of a basic grid
|
|
13
|
-
*/
|
|
14
|
-
export declare abstract class Grid implements IGrid {
|
|
15
|
-
/** Class name for the grid */
|
|
16
|
-
static GRID_CLASS_NAME: string;
|
|
17
|
-
/** Class name applied to each of the grid's borders by default */
|
|
18
|
-
static DEFAULT_BORDER_CLASS_NAME: string;
|
|
19
|
-
/** Prefix applied to the rendering area clip path id */
|
|
20
|
-
static RENDERING_AREA_CLIP_PATH_PREFIX: string;
|
|
21
|
-
/** Name for the lasagna layer containing the grid's rendered elements */
|
|
22
|
-
static GRID_ELEMENTS_LAYER_NAME: string;
|
|
23
|
-
/** Name for the rendering area lasagna layer */
|
|
24
|
-
static RENDERING_AREA_LAYER_NAME: string;
|
|
25
|
-
/** @ignore Height correction needed to prevent interaction gap between vertically stacked charts */
|
|
26
|
-
static RENDER_AREA_HEIGHT_CORRECTION: number;
|
|
27
|
-
/** @ignore Width correction needed to prevent interaction gap between right side of grid and the edge of the rendering area */
|
|
28
|
-
static RENDER_AREA_WIDTH_CORRECTION: number;
|
|
29
|
-
/** @ignore Width correction needed to sync bottom border length and grid width to tick placement */
|
|
30
|
-
static TICK_DIMENSION_CORRECTION: number;
|
|
31
|
-
/** Subject for indicating that the chart's dimensions should be updated */
|
|
32
|
-
updateChartDimensionsSubject: Subject<void>;
|
|
33
|
-
/** Event bus provided by the chart */
|
|
34
|
-
eventBus: EventBus<IChartEvent>;
|
|
35
|
-
/** d3 container for the grid */
|
|
36
|
-
protected container: D3Selection<SVGGElement>;
|
|
37
|
-
/** d3 selection for the grid's rendering area clip path */
|
|
38
|
-
protected renderingAreaClipPath: D3Selection<SVGRectElement>;
|
|
39
|
-
/** d3 selection for the grid's rendering area */
|
|
40
|
-
protected renderingArea: D3Selection<SVGRectElement>;
|
|
41
|
-
/** d3 selection for the grid's interactive area */
|
|
42
|
-
protected interactiveArea: D3Selection<SVGRectElement>;
|
|
43
|
-
/** The grid's layer manager */
|
|
44
|
-
protected lasagna: Lasagna;
|
|
45
|
-
/** Lasagna layer for the grid's rendered elements */
|
|
46
|
-
protected gridElementsLayer: Selection<SVGElement, any, SVGElement, any>;
|
|
47
|
-
/** Definition of the grid's borders as rendered */
|
|
48
|
-
protected borders: Partial<IBorders>;
|
|
49
|
-
/** Property value of the grid's scales */
|
|
50
|
-
protected _scales: ScalesIndex;
|
|
51
|
-
/** Property value of the grid's configuration */
|
|
52
|
-
protected _config: IGridConfig;
|
|
53
|
-
/** Property value of the grid's target d3 selection */
|
|
54
|
-
protected _target: D3Selection<SVGSVGElement>;
|
|
55
|
-
/** See {@link IGrid#getInteractiveArea} */
|
|
56
|
-
getInteractiveArea(): D3Selection<SVGRectElement>;
|
|
57
|
-
/** See {@link IGrid#getLasagna} */
|
|
58
|
-
getLasagna(): Lasagna;
|
|
59
|
-
/** @ignore */
|
|
60
|
-
set scales(scales: ScalesIndex);
|
|
61
|
-
/** @ignore */
|
|
62
|
-
get scales(): ScalesIndex;
|
|
63
|
-
/** See {@link IGrid#config} */
|
|
64
|
-
config(): IGridConfig;
|
|
65
|
-
/** See {@link IGrid#config} */
|
|
66
|
-
config(config: IGridConfig): this;
|
|
67
|
-
/** See {@link IGrid#target} */
|
|
68
|
-
target(): D3Selection<SVGSVGElement>;
|
|
69
|
-
/** See {@link IGrid#target} */
|
|
70
|
-
target(target: D3Selection<SVGSVGElement>): IGrid;
|
|
71
|
-
/** See {@link IGrid#build} */
|
|
72
|
-
build(): IGrid;
|
|
73
|
-
/**
|
|
74
|
-
* Derived classes override this method to build the grid's plugins
|
|
75
|
-
*
|
|
76
|
-
* @param {IChart} chart The chart instance to pass to each plugin
|
|
77
|
-
*
|
|
78
|
-
* @returns {IChartPlugin[]} Default implementation returns an empty array
|
|
79
|
-
*/
|
|
80
|
-
buildPlugins(chart: IChart): IChartPlugin[];
|
|
81
|
-
/** See {@link IGrid#update} */
|
|
82
|
-
update(): IGrid;
|
|
83
|
-
/** See {@link IGrid#updateDimensions} */
|
|
84
|
-
updateDimensions(dimensions: Partial<IDimensions>): IGrid;
|
|
85
|
-
/** See {@link IGrid#updateRanges} */
|
|
86
|
-
updateRanges(): IGrid;
|
|
87
|
-
/**
|
|
88
|
-
* Calculate the width correction needed for accommodating grid elements that may extend beyond the chart's configured width
|
|
89
|
-
*/
|
|
90
|
-
protected getOuterWidthDimensionCorrection(): number;
|
|
91
|
-
/**
|
|
92
|
-
* Builds the grid borders as SVGElements based on the specified configuration
|
|
93
|
-
*
|
|
94
|
-
* @param {D3Selection} container d3 container for the borders
|
|
95
|
-
*
|
|
96
|
-
* @returns {Partial<IBorders>} The grid's borders
|
|
97
|
-
*/
|
|
98
|
-
protected buildBorders(container: D3Selection): Partial<IBorders> | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* Adjusts the grid's rendering area and clip path based on the grid's configured width and height
|
|
101
|
-
*/
|
|
102
|
-
protected adjustRenderingArea: () => void;
|
|
103
|
-
/**
|
|
104
|
-
* Builds the grid's rendering area as a layer on the lasagna
|
|
105
|
-
*
|
|
106
|
-
* @param {string} clipPathId The clip path identifier
|
|
107
|
-
*
|
|
108
|
-
* @returns {D3Selection} The grid's rendering area
|
|
109
|
-
*/
|
|
110
|
-
private buildRenderingArea;
|
|
111
|
-
/**
|
|
112
|
-
* Creates a border with the specified configuration in the provided container
|
|
113
|
-
*
|
|
114
|
-
* @param {D3Selection} container The container to append the border to
|
|
115
|
-
* @param {IBorderConfig} config The configuration to apply to the border
|
|
116
|
-
*
|
|
117
|
-
* @returns {SVGElement} The created border
|
|
118
|
-
*/
|
|
119
|
-
private createBorder;
|
|
120
|
-
protected updateBottomBorder(): void;
|
|
121
|
-
/**
|
|
122
|
-
* Updates the d3 line positioning and visibility attributes of each of the configured borders
|
|
123
|
-
*/
|
|
124
|
-
protected updateBorders(): void;
|
|
125
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Grid } from "./grid";
|
|
2
|
-
import { IDimensions, IGrid } from "./types";
|
|
3
|
-
/** @ignore */
|
|
4
|
-
export declare class RadialGrid extends Grid implements IGrid {
|
|
5
|
-
build(): IGrid;
|
|
6
|
-
updateDimensions(dimensions: IDimensions): IGrid;
|
|
7
|
-
protected adjustRenderingArea: () => void;
|
|
8
|
-
private recenter;
|
|
9
|
-
}
|
package/core/grid/types.d.ts
DELETED
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
import { BaseType } from "d3";
|
|
2
|
-
import { Axis } from "d3-axis";
|
|
3
|
-
import { Selection } from "d3-selection";
|
|
4
|
-
import { Subject } from "rxjs";
|
|
5
|
-
import { EventBus } from "../common/event-bus";
|
|
6
|
-
import { Lasagna } from "../common/lasagna";
|
|
7
|
-
import { ScalesIndex } from "../common/scales/types";
|
|
8
|
-
import { D3Selection, IChart, IChartEvent, IChartPlugin } from "../common/types";
|
|
9
|
-
/**
|
|
10
|
-
* Interface for defining aspects of the top, right, bottom, and left sides of a grid
|
|
11
|
-
*/
|
|
12
|
-
export interface IAllAround<T> {
|
|
13
|
-
/** Object defining aspects of the top of an entity */
|
|
14
|
-
top: T;
|
|
15
|
-
/** Object defining aspects of the right side of an entity */
|
|
16
|
-
right: T;
|
|
17
|
-
/** Object defining aspects of the bottom of an entity */
|
|
18
|
-
bottom: T;
|
|
19
|
-
/** Object defining aspects of the left side of an entity */
|
|
20
|
-
left: T;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* The width and height of an grid
|
|
24
|
-
*/
|
|
25
|
-
export interface IDimensions {
|
|
26
|
-
width: number;
|
|
27
|
-
height: number;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Configuration of grid dimensions
|
|
31
|
-
*/
|
|
32
|
-
export interface IDimensionConfig {
|
|
33
|
-
/** The top, right, bottom, and left margin sizes in pixels */
|
|
34
|
-
margin: IAllAround<number>;
|
|
35
|
-
/** The top, right, bottom, and left padding sizes in pixels */
|
|
36
|
-
padding: IAllAround<number>;
|
|
37
|
-
/** Sets whether the grid uses the chart's container to determine its width */
|
|
38
|
-
autoWidth: boolean;
|
|
39
|
-
/** Sets whether the grid uses the chart's container to determine its height */
|
|
40
|
-
autoHeight: boolean;
|
|
41
|
-
/** Set of booleans indicating whether a specific margin will be recalculated on chart dimension updates */
|
|
42
|
-
marginLocked?: IAllAround<boolean>;
|
|
43
|
-
/**
|
|
44
|
-
* Sets the grid's width. Note: 'autoWidth' must be set to false for this setting to have an effect.
|
|
45
|
-
*
|
|
46
|
-
* @param {number} value The new grid width
|
|
47
|
-
* @returns {IDimensionConfig} The resulting dimension config
|
|
48
|
-
*/
|
|
49
|
-
width(value: number): IDimensionConfig;
|
|
50
|
-
/**
|
|
51
|
-
* Gets the grid's width -- excluding margins.
|
|
52
|
-
*
|
|
53
|
-
* @returns {number} The grid's width
|
|
54
|
-
*/
|
|
55
|
-
width(): number;
|
|
56
|
-
/**
|
|
57
|
-
* Sets the grid's height. Note: 'autoHeight' must be set to false for this setting to have an effect.
|
|
58
|
-
*
|
|
59
|
-
* @param {number} value The new grid height
|
|
60
|
-
* @returns {IDimensionConfig} The resulting dimension config
|
|
61
|
-
*/
|
|
62
|
-
height(value: number): IDimensionConfig;
|
|
63
|
-
/**
|
|
64
|
-
* Gets the grid's height -- excluding margins.
|
|
65
|
-
*
|
|
66
|
-
* @returns {number} The grid's height
|
|
67
|
-
*/
|
|
68
|
-
height(): number;
|
|
69
|
-
/**
|
|
70
|
-
* Sets the grid's width by subtracting the grid's horizontal margins from the specified value.
|
|
71
|
-
* Note: 'autoWidth' must be set to false for this setting to have an effect.
|
|
72
|
-
*
|
|
73
|
-
* @param {number} value The new width plus the grid's horizontal margins
|
|
74
|
-
* @returns {IDimensionConfig} The resulting dimension config
|
|
75
|
-
*/
|
|
76
|
-
outerWidth(value: number): IDimensionConfig;
|
|
77
|
-
/**
|
|
78
|
-
* Gets the grid's width -- including horizontal margins.
|
|
79
|
-
*
|
|
80
|
-
* @returns {number} The grid's width plus horizontal margins
|
|
81
|
-
*/
|
|
82
|
-
outerWidth(): number;
|
|
83
|
-
/**
|
|
84
|
-
* Sets the grid's height by subtracting the grid's vertical margins from the specified value.
|
|
85
|
-
* Note: 'autoWidth' must be set to false for this setting to have an effect.
|
|
86
|
-
*
|
|
87
|
-
* @param {number} value The new height plus the grid's vertical margins *
|
|
88
|
-
* @returns {IDimensionConfig} The resulting dimension config
|
|
89
|
-
*/
|
|
90
|
-
outerHeight(value: number): IDimensionConfig;
|
|
91
|
-
/**
|
|
92
|
-
* Gets the grid's height -- including vertical margins.
|
|
93
|
-
*
|
|
94
|
-
* @returns {number} The grid's height plus vertical margins
|
|
95
|
-
*/
|
|
96
|
-
outerHeight(): number;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Interface for defining the SVGElements forming the top, right, bottom, and left borders of an entity
|
|
100
|
-
*/
|
|
101
|
-
export type IBorders = IAllAround<SVGElement>;
|
|
102
|
-
/**
|
|
103
|
-
* Configuration of grid borders
|
|
104
|
-
*/
|
|
105
|
-
export interface IBorderConfig {
|
|
106
|
-
/** The stroke color */
|
|
107
|
-
color?: string;
|
|
108
|
-
/** The thickness of the border */
|
|
109
|
-
width?: number;
|
|
110
|
-
/** The class name */
|
|
111
|
-
className?: string;
|
|
112
|
-
/** Boolean indicating whether the border should be visible */
|
|
113
|
-
visible?: boolean;
|
|
114
|
-
}
|
|
115
|
-
export interface ITextOverflowArgs {
|
|
116
|
-
widthLimit: number;
|
|
117
|
-
horizontalPadding: number;
|
|
118
|
-
ellipsisWidth: number;
|
|
119
|
-
}
|
|
120
|
-
/** Type for tick overflow handler */
|
|
121
|
-
export type TextOverflowHandler = (textSelection: Selection<BaseType, unknown, null, undefined>, args: ITextOverflowArgs) => void;
|
|
122
|
-
/** Interface representing the configuration for tick labels */
|
|
123
|
-
export interface ITickLabelConfig {
|
|
124
|
-
/**
|
|
125
|
-
* Padding for left and right sides of label used for calculating text overflow limits
|
|
126
|
-
* (number represents the padding on each side)
|
|
127
|
-
*/
|
|
128
|
-
horizontalPadding: number;
|
|
129
|
-
/** Handler for text overflow. Set to 'undefined' to disable overflow handling */
|
|
130
|
-
overflowHandler?: TextOverflowHandler;
|
|
131
|
-
/**
|
|
132
|
-
* Setting this insures the label's width is smaller or equal to the provided number
|
|
133
|
-
*/
|
|
134
|
-
maxWidth?: number;
|
|
135
|
-
}
|
|
136
|
-
/** Configuration of a grid axis */
|
|
137
|
-
export interface IAxisConfig {
|
|
138
|
-
/** Boolean indicating whether the axis should be visible */
|
|
139
|
-
visible: boolean;
|
|
140
|
-
/** The approximate number of ticks to display */
|
|
141
|
-
approximateTicks: number;
|
|
142
|
-
/** Boolean indicating whether grid ticks should be displayed */
|
|
143
|
-
gridTicks: boolean;
|
|
144
|
-
/** The length of the ticks in pixels */
|
|
145
|
-
tickSize: number;
|
|
146
|
-
/** Configuration for the tick labels */
|
|
147
|
-
tickLabel: ITickLabelConfig;
|
|
148
|
-
/** Sets whether to fit the grid margins to the axis labels */
|
|
149
|
-
fit: boolean;
|
|
150
|
-
/** Sets the axis padding */
|
|
151
|
-
padding: number;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Basic grid configuration
|
|
155
|
-
*/
|
|
156
|
-
export interface IGridConfig {
|
|
157
|
-
/** Boolean indicating whether the grid will respond to mouse events */
|
|
158
|
-
interactive: boolean;
|
|
159
|
-
/** Configuration for the grid's dimensions */
|
|
160
|
-
dimension: IDimensionConfig;
|
|
161
|
-
/** Configuration for the grid's borders */
|
|
162
|
-
borders: IAllAround<IBorderConfig>;
|
|
163
|
-
/** String indicating the desired cursor style */
|
|
164
|
-
cursor: string;
|
|
165
|
-
/** Set to true to disable the render area height correction */
|
|
166
|
-
disableRenderAreaHeightCorrection?: boolean;
|
|
167
|
-
/** Set to true to disable the render area width correction */
|
|
168
|
-
disableRenderAreaWidthCorrection?: boolean;
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Configuration for an XYGrid
|
|
172
|
-
*/
|
|
173
|
-
export interface IXYGridConfig extends IGridConfig {
|
|
174
|
-
/** The IAllAround value for the grid's axis configurations */
|
|
175
|
-
axis: IAllAround<IAxisConfig>;
|
|
176
|
-
/**
|
|
177
|
-
* Add interaction line and label plugins automatically
|
|
178
|
-
* Note: This was added to prevent a breaking change. We should avoid this kind of option in future
|
|
179
|
-
* versions of IXYGridConfig because ideally all plugins should be added manually (NUI-3304).
|
|
180
|
-
*/
|
|
181
|
-
interactionPlugins: boolean;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* The basic interface for a grid's dimensions, scaling, interaction, and borders
|
|
185
|
-
*
|
|
186
|
-
* @interface
|
|
187
|
-
*/
|
|
188
|
-
export interface IGrid {
|
|
189
|
-
/** The grid scales
|
|
190
|
-
*
|
|
191
|
-
* @type {ScalesIndex}
|
|
192
|
-
*/
|
|
193
|
-
scales: ScalesIndex;
|
|
194
|
-
/**
|
|
195
|
-
* Subject for indicating that the chart's dimensions should be updated
|
|
196
|
-
*/
|
|
197
|
-
updateChartDimensionsSubject?: Subject<void>;
|
|
198
|
-
/**
|
|
199
|
-
* Chart event bus
|
|
200
|
-
*/
|
|
201
|
-
eventBus: EventBus<IChartEvent>;
|
|
202
|
-
/**
|
|
203
|
-
* Provides access to the grid's layering mechanism
|
|
204
|
-
*
|
|
205
|
-
* @returns {Lasagna} The grid's layering mechanism
|
|
206
|
-
*/
|
|
207
|
-
getLasagna(): Lasagna;
|
|
208
|
-
/**
|
|
209
|
-
* Provides access to the grid's interactive area
|
|
210
|
-
*
|
|
211
|
-
* @returns {D3Selection} The grid's interactive area
|
|
212
|
-
*/
|
|
213
|
-
getInteractiveArea(): D3Selection<SVGRectElement>;
|
|
214
|
-
/**
|
|
215
|
-
* getter for the grid's target d3 selection
|
|
216
|
-
*
|
|
217
|
-
* @returns {D3Selection} The grid's target d3 selection
|
|
218
|
-
*/
|
|
219
|
-
target(): D3Selection<SVGSVGElement>;
|
|
220
|
-
/**
|
|
221
|
-
* setter for the grid's target d3 selection
|
|
222
|
-
*
|
|
223
|
-
* @param {D3Selection} [target] The grid's new target d3 selection
|
|
224
|
-
* @returns {IGrid} The grid instance
|
|
225
|
-
*/
|
|
226
|
-
target(target: D3Selection<SVGSVGElement>): IGrid;
|
|
227
|
-
target(target: D3Selection<SVGSVGElement>): D3Selection<SVGSVGElement> | IGrid;
|
|
228
|
-
/**
|
|
229
|
-
* getter for the grid configuration
|
|
230
|
-
*
|
|
231
|
-
* @returns {IGridConfig} The grid configuration
|
|
232
|
-
*/
|
|
233
|
-
config(): IGridConfig;
|
|
234
|
-
/**
|
|
235
|
-
* setter for the grid configuration
|
|
236
|
-
*
|
|
237
|
-
* @param {IGridConfig} config The new grid configuration
|
|
238
|
-
* @returns {this} The grid instance
|
|
239
|
-
*/
|
|
240
|
-
config(config: IGridConfig): this;
|
|
241
|
-
/**
|
|
242
|
-
* Builds the grid's rendered elements
|
|
243
|
-
*
|
|
244
|
-
* @returns {IGrid} The grid instance
|
|
245
|
-
*/
|
|
246
|
-
build(): IGrid;
|
|
247
|
-
/**
|
|
248
|
-
* Updates the grid's rendered elements based on the current scales and configuration
|
|
249
|
-
*
|
|
250
|
-
* @returns {IGrid} The grid instance
|
|
251
|
-
*/
|
|
252
|
-
update(): IGrid;
|
|
253
|
-
/**
|
|
254
|
-
* Updates the grid's dimensions as specified
|
|
255
|
-
*
|
|
256
|
-
* @param {Partial<IDimensions>} dimensions The new grid dimensions
|
|
257
|
-
* @returns {IGrid} The grid instance
|
|
258
|
-
*/
|
|
259
|
-
updateDimensions(dimensions: Partial<IDimensions>): IGrid;
|
|
260
|
-
/**
|
|
261
|
-
* Updates the ranges on the grid's scales based on the grid's configured dimensions
|
|
262
|
-
*
|
|
263
|
-
* @returns {IGrid} The grid instance
|
|
264
|
-
*/
|
|
265
|
-
updateRanges(): IGrid;
|
|
266
|
-
/**
|
|
267
|
-
* Builds the grid's plugins
|
|
268
|
-
*
|
|
269
|
-
* @returns {IChartPlugin[]} The set of generated plugins
|
|
270
|
-
*/
|
|
271
|
-
buildPlugins(chart: IChart): IChartPlugin[];
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* Interface for a d3 axis entity
|
|
275
|
-
*/
|
|
276
|
-
export interface IAxis {
|
|
277
|
-
/** The d3 group element for the axis label */
|
|
278
|
-
labelGroup: D3Selection<SVGGElement>;
|
|
279
|
-
/** The d3 group element for the axis ticks */
|
|
280
|
-
tickGroup: D3Selection<SVGGElement>;
|
|
281
|
-
/** The d3 group element for the axis */
|
|
282
|
-
group: D3Selection<SVGGElement>;
|
|
283
|
-
/** The d3 axis */
|
|
284
|
-
axis: Axis<any>;
|
|
285
|
-
}
|