mdt-charts 1.29.0 → 1.29.1
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/lib/config/config.d.ts +167 -177
- package/lib/designer/designerConfig.d.ts +59 -62
- package/lib/engine/block/block.d.ts +16 -22
- package/lib/engine/block/block.js +51 -51
- package/lib/engine/block/blockHelper.d.ts +6 -6
- package/lib/engine/block/blockHelper.js +16 -16
- package/lib/engine/block/blockHtml.d.ts +8 -8
- package/lib/engine/block/blockHtml.js +15 -15
- package/lib/engine/block/blockSvg.d.ts +20 -20
- package/lib/engine/block/blockSvg.js +66 -65
- package/lib/engine/block/defs/LinearGradientDef.d.ts +2 -2
- package/lib/engine/block/defs/LinearGradientDef.js +27 -27
- package/lib/engine/block/defs/hatchPattern.d.ts +4 -4
- package/lib/engine/block/defs/hatchPattern.js +9 -9
- package/lib/engine/colorReader/colorReader.d.ts +5 -5
- package/lib/engine/colorReader/colorReader.js +18 -18
- package/lib/engine/contentManager/contentManager.d.ts +7 -6
- package/lib/engine/contentManager/contentManager.js +15 -15
- package/lib/engine/contentManager/contentManagerFactory.d.ts +7 -7
- package/lib/engine/contentManager/contentManagerFactory.js +12 -12
- package/lib/engine/elementHighlighter/elementHighlighter.d.ts +22 -70
- package/lib/engine/elementHighlighter/elementHighlighter.js +181 -230
- package/lib/engine/elementHighlighter/selectHighlighter.d.ts +4 -29
- package/lib/engine/elementHighlighter/selectHighlighter.js +87 -189
- package/lib/engine/engine.d.ts +17 -17
- package/lib/engine/engine.js +62 -87
- package/lib/engine/features/aggregator/aggregator.d.ts +17 -24
- package/lib/engine/features/aggregator/aggregator.js +102 -113
- package/lib/engine/features/axis/axis.d.ts +9 -22
- package/lib/engine/features/axis/axis.js +150 -159
- package/lib/engine/features/axis/axisDomHelper.d.ts +2 -7
- package/lib/engine/features/axis/axisDomHelper.js +20 -19
- package/lib/engine/features/axis/axisHelper.d.ts +5 -9
- package/lib/engine/features/axis/axisHelper.js +33 -28
- package/lib/engine/features/axis/axisLabelDomHelper.d.ts +11 -26
- package/lib/engine/features/axis/axisLabelDomHelper.js +152 -156
- package/lib/engine/features/axis/axisLabelsEventManager.d.ts +2 -2
- package/lib/engine/features/axis/axisLabelsEventManager.js +32 -32
- package/lib/engine/features/embeddedLabels/embeddedLabels.d.ts +16 -51
- package/lib/engine/features/embeddedLabels/embeddedLabels.js +134 -234
- package/lib/engine/features/embeddedLabels/embeddedLabelsDomHelper.d.ts +2 -13
- package/lib/engine/features/embeddedLabels/embeddedLabelsDomHelper.js +23 -20
- package/lib/engine/features/embeddedLabels/embeddedLabelsHelper.d.ts +15 -32
- package/lib/engine/features/embeddedLabels/embeddedLabelsHelper.js +63 -56
- package/lib/engine/features/gridLine/gidLineHelper.d.ts +7 -13
- package/lib/engine/features/gridLine/gidLineHelper.js +49 -42
- package/lib/engine/features/gridLine/gridLine.d.ts +5 -19
- package/lib/engine/features/gridLine/gridLine.js +36 -35
- package/lib/engine/features/legend/legend.d.ts +28 -38
- package/lib/engine/features/legend/legend.js +92 -118
- package/lib/engine/features/legend/legendDomHelper.d.ts +6 -13
- package/lib/engine/features/legend/legendDomHelper.js +62 -63
- package/lib/engine/features/legend/legendEventsManager.d.ts +8 -13
- package/lib/engine/features/legend/legendEventsManager.js +47 -48
- package/lib/engine/features/legend/legendHelper.d.ts +14 -39
- package/lib/engine/features/legend/legendHelper.js +92 -98
- package/lib/engine/features/legend/legendHelperService.d.ts +6 -13
- package/lib/engine/features/legend/legendHelperService.js +25 -24
- package/lib/engine/features/legend/legendMarkerCreator.d.ts +9 -18
- package/lib/engine/features/legend/legendMarkerCreator.js +76 -79
- package/lib/engine/features/legend/legendWidthCalculator.d.ts +7 -7
- package/lib/engine/features/legend/legendWidthCalculator.js +122 -126
- package/lib/engine/features/markDots/markDot.d.ts +15 -42
- package/lib/engine/features/markDots/markDot.js +70 -101
- package/lib/engine/features/markDots/markDotsHelper.d.ts +1 -8
- package/lib/engine/features/markDots/markDotsHelper.js +12 -13
- package/lib/engine/features/recordOverflowAlert/recordOverflowAlertCore.d.ts +5 -23
- package/lib/engine/features/recordOverflowAlert/recordOverflowAlertCore.js +34 -42
- package/lib/engine/features/scale/scale.d.ts +12 -17
- package/lib/engine/features/scale/scale.js +69 -76
- package/lib/engine/features/tipBox/tipBox.d.ts +5 -9
- package/lib/engine/features/tipBox/tipBox.js +24 -24
- package/lib/engine/features/tipBox/tipBoxHelper.d.ts +9 -16
- package/lib/engine/features/tipBox/tipBoxHelper.js +45 -60
- package/lib/engine/features/title/title.d.ts +6 -6
- package/lib/engine/features/title/title.js +35 -34
- package/lib/engine/features/tolltip/newTooltip/newTooltip.d.ts +11 -15
- package/lib/engine/features/tolltip/newTooltip/newTooltip.js +21 -21
- package/lib/engine/features/tolltip/newTooltip/newTooltipService.d.ts +8 -13
- package/lib/engine/features/tolltip/newTooltip/newTooltipService.js +23 -26
- package/lib/engine/features/tolltip/tooltip.d.ts +11 -17
- package/lib/engine/features/tolltip/tooltip.js +142 -296
- package/lib/engine/features/tolltip/tooltipComponentsManager.d.ts +10 -21
- package/lib/engine/features/tolltip/tooltipComponentsManager.js +114 -113
- package/lib/engine/features/tolltip/tooltipDomHelper.d.ts +21 -43
- package/lib/engine/features/tolltip/tooltipDomHelper.js +120 -144
- package/lib/engine/features/tolltip/tooltipHelper.d.ts +9 -39
- package/lib/engine/features/tolltip/tooltipHelper.js +91 -114
- package/lib/engine/features/valueLabels/valueLabels.d.ts +38 -58
- package/lib/engine/features/valueLabels/valueLabels.js +169 -205
- package/lib/engine/features/valueLabels/valueLabelsHelper.d.ts +1 -7
- package/lib/engine/features/valueLabels/valueLabelsHelper.js +18 -23
- package/lib/engine/features/valueLabelsCollision/valueLabelsCollision.d.ts +15 -18
- package/lib/engine/features/valueLabelsCollision/valueLabelsCollision.js +47 -46
- package/lib/engine/features/valueLabelsCollision/valueLabelsCollisionHelper.d.ts +3 -6
- package/lib/engine/features/valueLabelsCollision/valueLabelsCollisionHelper.js +45 -49
- package/lib/engine/filterManager/filterEventManager.d.ts +30 -37
- package/lib/engine/filterManager/filterEventManager.js +131 -174
- package/lib/engine/helpers/domHelper.d.ts +20 -45
- package/lib/engine/helpers/domHelper.js +61 -62
- package/lib/engine/helpers/fontResizer/fontResizer.d.ts +10 -10
- package/lib/engine/helpers/fontResizer/fontResizer.js +16 -21
- package/lib/engine/helpers/fontResizer/fontResizerService.d.ts +1 -1
- package/lib/engine/helpers/fontResizer/fontResizerService.js +10 -9
- package/lib/engine/helpers/helper.d.ts +27 -27
- package/lib/engine/helpers/helper.js +92 -91
- package/lib/engine/helpers/namesHelper.d.ts +3 -3
- package/lib/engine/helpers/namesHelper.js +6 -6
- package/lib/engine/helpers/pipeline/Pipeline.d.ts +5 -5
- package/lib/engine/helpers/pipeline/Pipeline.js +33 -33
- package/lib/engine/polarNotation/donut/DonutHelper.d.ts +11 -25
- package/lib/engine/polarNotation/donut/DonutHelper.js +70 -71
- package/lib/engine/polarNotation/donut/donut.d.ts +23 -38
- package/lib/engine/polarNotation/donut/donut.js +99 -109
- package/lib/engine/polarNotation/polarManager.d.ts +6 -6
- package/lib/engine/polarNotation/polarManager.js +47 -67
- package/lib/engine/transitionManager.d.ts +14 -13
- package/lib/engine/transitionManager.js +49 -48
- package/lib/engine/twoDimensionalNotation/area/area.d.ts +28 -44
- package/lib/engine/twoDimensionalNotation/area/area.js +238 -272
- package/lib/engine/twoDimensionalNotation/area/areaGenerator.d.ts +5 -13
- package/lib/engine/twoDimensionalNotation/area/areaGenerator.js +13 -13
- package/lib/engine/twoDimensionalNotation/area/areaHelper.d.ts +4 -4
- package/lib/engine/twoDimensionalNotation/area/areaHelper.js +41 -57
- package/lib/engine/twoDimensionalNotation/bar/bar.d.ts +29 -54
- package/lib/engine/twoDimensionalNotation/bar/bar.js +224 -362
- package/lib/engine/twoDimensionalNotation/bar/barHelper.d.ts +32 -71
- package/lib/engine/twoDimensionalNotation/bar/barHelper.js +126 -162
- package/lib/engine/twoDimensionalNotation/bar/stackedData/dataStacker.d.ts +6 -6
- package/lib/engine/twoDimensionalNotation/bar/stackedData/dataStacker.js +24 -24
- package/lib/engine/twoDimensionalNotation/bar/stackedData/dataStackerService.d.ts +2 -2
- package/lib/engine/twoDimensionalNotation/bar/stackedData/dataStackerService.js +17 -16
- package/lib/engine/twoDimensionalNotation/dot/dotChart.d.ts +23 -23
- package/lib/engine/twoDimensionalNotation/dot/dotChart.js +114 -135
- package/lib/engine/twoDimensionalNotation/line/line.d.ts +16 -37
- package/lib/engine/twoDimensionalNotation/line/line.js +132 -162
- package/lib/engine/twoDimensionalNotation/line/lineBuilder.d.ts +11 -14
- package/lib/engine/twoDimensionalNotation/line/lineBuilder.js +48 -47
- package/lib/engine/twoDimensionalNotation/line/lineGenerator.d.ts +4 -4
- package/lib/engine/twoDimensionalNotation/line/lineGenerator.js +8 -8
- package/lib/engine/twoDimensionalNotation/line/lineHelper.d.ts +6 -12
- package/lib/engine/twoDimensionalNotation/line/lineHelper.js +60 -76
- package/lib/engine/twoDimensionalNotation/lineLike/generatorFactory/lineLikeGeneratorFactory.d.ts +6 -6
- package/lib/engine/twoDimensionalNotation/lineLike/generatorMiddleware/lineLikeGeneratorCurveMiddleware.d.ts +5 -5
- package/lib/engine/twoDimensionalNotation/lineLike/generatorMiddleware/lineLikeGeneratorCurveMiddleware.js +17 -16
- package/lib/engine/twoDimensionalNotation/lineLike/generatorMiddleware/lineLikeGeneratorDefineMiddleware.d.ts +10 -11
- package/lib/engine/twoDimensionalNotation/lineLike/generatorMiddleware/lineLikeGeneratorDefineMiddleware.js +7 -9
- package/lib/engine/twoDimensionalNotation/lineLike/generatorMiddleware/lineLikeGeneratorMiddleware.d.ts +1 -3
- package/lib/engine/twoDimensionalNotation/twoDimensionalManager.d.ts +10 -10
- package/lib/engine/twoDimensionalNotation/twoDimensionalManager.js +138 -253
- package/lib/engine/valueFormatter.d.ts +3 -3
- package/lib/engine/valueFormatter.js +6 -6
- package/lib/main.d.ts +79 -82
- package/lib/main.js +84 -79
- package/lib/model/EventEmitter.d.ts +8 -8
- package/lib/model/EventEmitter.js +24 -24
- package/lib/model/chartStyleModel/chartStyleModel.d.ts +5 -5
- package/lib/model/chartStyleModel/chartStyleModel.js +25 -27
- package/lib/model/chartStyleModel/colorRange.d.ts +3 -3
- package/lib/model/chartStyleModel/colorRange.js +24 -19
- package/lib/model/chartStyleModel/twoDimensionalChartStyleModel.d.ts +12 -22
- package/lib/model/chartStyleModel/twoDimensionalChartStyleModel.js +60 -69
- package/lib/model/configsValidator/configValidator.d.ts +1 -1
- package/lib/model/configsValidator/configValidator.js +4 -4
- package/lib/model/dataManagerModel/dataManagerModel.d.ts +26 -36
- package/lib/model/dataManagerModel/dataManagerModel.js +128 -179
- package/lib/model/dataManagerModel/dataManagerModelService.d.ts +2 -2
- package/lib/model/dataManagerModel/dataManagerModelService.js +26 -25
- package/lib/model/featuresModel/axisModel.d.ts +18 -69
- package/lib/model/featuresModel/axisModel.js +169 -224
- package/lib/model/featuresModel/axisModelService.d.ts +6 -10
- package/lib/model/featuresModel/axisModelService.js +27 -27
- package/lib/model/featuresModel/legendModel/legendCanvasModel.d.ts +11 -16
- package/lib/model/featuresModel/legendModel/legendCanvasModel.js +59 -55
- package/lib/model/featuresModel/legendModel/legendModel.d.ts +3 -7
- package/lib/model/featuresModel/legendModel/legendModel.js +41 -59
- package/lib/model/featuresModel/legendModel/polarMarginCalculator.d.ts +3 -8
- package/lib/model/featuresModel/legendModel/polarMarginCalculator.js +20 -18
- package/lib/model/featuresModel/legendModel/twoDimLegendModel.d.ts +4 -8
- package/lib/model/featuresModel/legendModel/twoDimLegendModel.js +27 -40
- package/lib/model/featuresModel/otherComponents.d.ts +4 -7
- package/lib/model/featuresModel/otherComponents.js +9 -9
- package/lib/model/featuresModel/recordOverflowModel/recordOverflowModel.d.ts +4 -0
- package/lib/model/featuresModel/recordOverflowModel/recordOverflowModel.js +33 -0
- package/lib/model/featuresModel/scaleModel/scaleAxisRecalcer.d.ts +6 -6
- package/lib/model/featuresModel/scaleModel/scaleAxisRecalcer.js +23 -27
- package/lib/model/featuresModel/scaleModel/scaleDomainService.d.ts +5 -19
- package/lib/model/featuresModel/scaleModel/scaleDomainService.js +55 -44
- package/lib/model/featuresModel/scaleModel/scaleModel.d.ts +10 -10
- package/lib/model/featuresModel/scaleModel/scaleModel.js +50 -61
- package/lib/model/featuresModel/scaleModel/scaleModelServices.js +22 -15
- package/lib/model/featuresModel/titleModel.d.ts +1 -1
- package/lib/model/featuresModel/titleModel.js +14 -14
- package/lib/model/featuresModel/tooltipModel.d.ts +1 -1
- package/lib/model/featuresModel/tooltipModel.js +5 -5
- package/lib/model/featuresModel/valueLabelsModel/valueLabelsModel.d.ts +11 -23
- package/lib/model/featuresModel/valueLabelsModel/valueLabelsModel.js +51 -53
- package/lib/model/helpers/modelHelper.d.ts +7 -7
- package/lib/model/helpers/modelHelper.js +42 -38
- package/lib/model/helpers/twoDimensionalModelHelper.d.ts +9 -37
- package/lib/model/helpers/twoDimensionalModelHelper.js +125 -147
- package/lib/model/helpers/unitsFromConfigReader.js +4 -4
- package/lib/model/helpers/unitsReader.d.ts +2 -2
- package/lib/model/helpers/unitsReader.js +13 -11
- package/lib/model/margin/marginModel.d.ts +7 -7
- package/lib/model/margin/marginModel.js +20 -23
- package/lib/model/margin/twoDim/twoDimMarginModel.d.ts +13 -13
- package/lib/model/margin/twoDim/twoDimMarginModel.js +113 -184
- package/lib/model/model.d.ts +284 -315
- package/lib/model/model.js +4 -4
- package/lib/model/modelBuilder.d.ts +18 -27
- package/lib/model/modelBuilder.js +79 -85
- package/lib/model/modelInstance/canvasModel/canvasModel.d.ts +17 -17
- package/lib/model/modelInstance/canvasModel/canvasModel.js +43 -42
- package/lib/model/modelInstance/canvasModel/canvasSizesModel/canvasMarginModel.d.ts +7 -7
- package/lib/model/modelInstance/canvasModel/canvasSizesModel/canvasSizeModel.d.ts +2 -2
- package/lib/model/modelInstance/canvasModel/canvasSizesModel/marginModelService.d.ts +6 -6
- package/lib/model/modelInstance/canvasModel/canvasSizesModel/marginModelService.js +24 -24
- package/lib/model/modelInstance/canvasModel/legendCanvasModel.d.ts +4 -4
- package/lib/model/modelInstance/canvasModel/legendCanvasModel.js +11 -11
- package/lib/model/modelInstance/canvasModel/titleCanvas.d.ts +4 -4
- package/lib/model/modelInstance/canvasModel/titleCanvas.js +9 -9
- package/lib/model/modelInstance/chartBlockVersion/chartBlockVersion.d.ts +3 -3
- package/lib/model/modelInstance/chartBlockVersion/chartBlockVersion.js +6 -6
- package/lib/model/modelInstance/configReader.d.ts +23 -32
- package/lib/model/modelInstance/configReader.js +94 -125
- package/lib/model/modelInstance/dataModel/dataModel.d.ts +10 -10
- package/lib/model/modelInstance/dataModel/dataModel.js +25 -25
- package/lib/model/modelInstance/dataModel/dataRepository.d.ts +14 -14
- package/lib/model/modelInstance/dataModel/dataRepository.js +42 -42
- package/lib/model/modelInstance/modelInstance.d.ts +6 -11
- package/lib/model/modelInstance/modelInstance.js +16 -16
- package/lib/model/modelInstance/titleConfigReader.d.ts +8 -8
- package/lib/model/modelInstance/titleConfigReader.js +30 -37
- package/lib/model/notations/polar/donut/donutAggregatorService.d.ts +6 -9
- package/lib/model/notations/polar/donut/donutAggregatorService.js +37 -40
- package/lib/model/notations/polar/donut/donutModel.d.ts +5 -9
- package/lib/model/notations/polar/donut/donutModel.js +28 -28
- package/lib/model/notations/polar/donut/donutThicknessService.d.ts +3 -3
- package/lib/model/notations/polar/donut/donutThicknessService.js +15 -13
- package/lib/model/notations/polar/polarModel.d.ts +7 -18
- package/lib/model/notations/polar/polarModel.js +72 -79
- package/lib/model/notations/twoDimensional/styles.d.ts +7 -44
- package/lib/model/notations/twoDimensional/styles.js +125 -234
- package/lib/model/notations/twoDimensionalModel.d.ts +13 -23
- package/lib/model/notations/twoDimensionalModel.js +170 -330
- package/lib/optionsServices/publicOptionsService.d.ts +1 -1
- package/lib/optionsServices/publicOptionsService.js +4 -4
- package/lib/optionsServices/validators/sizeValidator.d.ts +2 -2
- package/lib/optionsServices/validators/sizeValidator.js +11 -10
- package/lib/style/charts-main.css +151 -150
- package/lib/style/charts-main.less +151 -150
- package/package.json +1 -1
- package/lib/engine/polarNotation/extenders/polarRecordOverflowAlert.d.ts +0 -15
- package/lib/engine/polarNotation/extenders/polarRecordOverflowAlert.js +0 -40
- package/lib/engine/twoDimensionalNotation/extenders/twoDimRecordOverflowAlert.d.ts +0 -15
- package/lib/engine/twoDimensionalNotation/extenders/twoDimRecordOverflowAlert.js +0 -32
|
@@ -6,43 +6,13 @@ import { Size } from "../../../config/config";
|
|
|
6
6
|
import { TooltipCoordinate } from "./newTooltip/newTooltip";
|
|
7
7
|
import { TooltipPreCoordinate } from "./newTooltip/newTooltipService";
|
|
8
8
|
export declare class TooltipHelper {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
static getCoordinateByPointer(pointer: [number, number]): TooltipCoordinate;
|
|
19
|
-
static getTooltipFixedCoordinate(
|
|
20
|
-
scaleKey: AxisScale<any>,
|
|
21
|
-
margin: BlockMargin,
|
|
22
|
-
keyValue: string,
|
|
23
|
-
blockBoundingRect: DOMRect,
|
|
24
|
-
tooltipBoundingRect: DOMRect,
|
|
25
|
-
keyAxisOrient: Orient,
|
|
26
|
-
winWidth: number,
|
|
27
|
-
winHeight: number
|
|
28
|
-
): TooltipCoordinate;
|
|
29
|
-
static getTooltipCursorCoordinate(
|
|
30
|
-
pointer: [number, number],
|
|
31
|
-
blockBoundingRect: DOMRect,
|
|
32
|
-
tooltipBoundingRect: DOMRect
|
|
33
|
-
): TooltipCoordinate;
|
|
34
|
-
static getTooltipLineAttributes(
|
|
35
|
-
scaleKey: AxisScale<any>,
|
|
36
|
-
margin: BlockMargin,
|
|
37
|
-
key: string,
|
|
38
|
-
chartOrientation: ChartOrientation,
|
|
39
|
-
blockSize: Size
|
|
40
|
-
): TooltipLineAttributes;
|
|
41
|
-
static recalcToolTipCoordinateByViewPort(
|
|
42
|
-
blockBounding: DOMRect,
|
|
43
|
-
tooltipBounding: DOMRect,
|
|
44
|
-
preCoordinate: TooltipPreCoordinate,
|
|
45
|
-
winWidth: number,
|
|
46
|
-
winHeight: number
|
|
47
|
-
): TooltipCoordinate;
|
|
9
|
+
private static convexsize;
|
|
10
|
+
static getHorizontalPad(coordinateX: number, tooltipBlockWidth: number, blockSize: Size, translateX: number): number;
|
|
11
|
+
static getVerticalPad(coordinateY: number, tooltipBlockHeight: number, translateY: number): number;
|
|
12
|
+
static getTooltipArrowPadding(tooltipBlockWidth: number, horizontalPad: number): number;
|
|
13
|
+
static getCoordinateByPointer(pointer: [number, number]): TooltipCoordinate;
|
|
14
|
+
static getTooltipFixedCoordinate(scaleKey: AxisScale<any>, margin: BlockMargin, keyValue: string, blockBoundingRect: DOMRect, tooltipBoundingRect: DOMRect, keyAxisOrient: Orient, winWidth: number, winHeight: number): TooltipCoordinate;
|
|
15
|
+
static getTooltipCursorCoordinate(pointer: [number, number], blockBoundingRect: DOMRect, tooltipBoundingRect: DOMRect): TooltipCoordinate;
|
|
16
|
+
static getTooltipLineAttributes(scaleKey: AxisScale<any>, margin: BlockMargin, key: string, chartOrientation: ChartOrientation, blockSize: Size): TooltipLineAttributes;
|
|
17
|
+
static recalcToolTipCoordinateByViewPort(blockBounding: DOMRect, tooltipBounding: DOMRect, preCoordinate: TooltipPreCoordinate, winWidth: number, winHeight: number): TooltipCoordinate;
|
|
48
18
|
}
|
|
@@ -2,119 +2,96 @@ import { Scale } from "../scale/scale";
|
|
|
2
2
|
import { ARROW_DEFAULT_POSITION, TOOLTIP_ARROW_PADDING_X, TOOLTIP_ARROW_PADDING_Y } from "./tooltipDomHelper";
|
|
3
3
|
import { TooltipService } from "./newTooltip/newTooltipService";
|
|
4
4
|
export class TooltipHelper {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
attributes.x2 = blockSize.width - margin.right + this.convexsize * 2;
|
|
97
|
-
attributes.y1 = Scale.getScaledValue(scaleKey, key) + margin.top;
|
|
98
|
-
attributes.y2 = Scale.getScaledValue(scaleKey, key) + margin.top;
|
|
99
|
-
}
|
|
100
|
-
return attributes;
|
|
101
|
-
}
|
|
102
|
-
static recalcToolTipCoordinateByViewPort(blockBounding, tooltipBounding, preCoordinate, winWidth, winHeight) {
|
|
103
|
-
const res = TooltipService.getTooltipByWindow(
|
|
104
|
-
tooltipBounding,
|
|
105
|
-
preCoordinate,
|
|
106
|
-
{
|
|
107
|
-
width: winWidth,
|
|
108
|
-
height: winHeight
|
|
109
|
-
},
|
|
110
|
-
blockBounding
|
|
111
|
-
);
|
|
112
|
-
return {
|
|
113
|
-
left: res.left + "px",
|
|
114
|
-
top: res.top + "px",
|
|
115
|
-
right: null,
|
|
116
|
-
bottom: null
|
|
117
|
-
};
|
|
118
|
-
}
|
|
5
|
+
static getHorizontalPad(coordinateX, tooltipBlockWidth, blockSize, translateX) {
|
|
6
|
+
let pad = 0;
|
|
7
|
+
if (tooltipBlockWidth + coordinateX - TOOLTIP_ARROW_PADDING_X + translateX > blockSize.width)
|
|
8
|
+
pad = tooltipBlockWidth + coordinateX - TOOLTIP_ARROW_PADDING_X + translateX - blockSize.width;
|
|
9
|
+
return pad;
|
|
10
|
+
}
|
|
11
|
+
static getVerticalPad(coordinateY, tooltipBlockHeight, translateY) {
|
|
12
|
+
let pad = 0;
|
|
13
|
+
if (coordinateY - TOOLTIP_ARROW_PADDING_Y - tooltipBlockHeight + translateY <
|
|
14
|
+
-tooltipBlockHeight - TOOLTIP_ARROW_PADDING_Y)
|
|
15
|
+
pad = coordinateY;
|
|
16
|
+
return pad; // return zero or sub zero
|
|
17
|
+
}
|
|
18
|
+
static getTooltipArrowPadding(tooltipBlockWidth, horizontalPad) {
|
|
19
|
+
return horizontalPad > tooltipBlockWidth
|
|
20
|
+
? tooltipBlockWidth - ARROW_DEFAULT_POSITION - 20 * Math.sqrt(2)
|
|
21
|
+
: horizontalPad; // If tooltip arrow has coordinate outside svg, it take X position in end of tooltip block
|
|
22
|
+
}
|
|
23
|
+
static getCoordinateByPointer(pointer) {
|
|
24
|
+
const coordinate = {
|
|
25
|
+
left: null,
|
|
26
|
+
top: null,
|
|
27
|
+
right: null,
|
|
28
|
+
bottom: null
|
|
29
|
+
};
|
|
30
|
+
coordinate.left = pointer[0] + "px";
|
|
31
|
+
coordinate.top = pointer[1] + "px";
|
|
32
|
+
return coordinate;
|
|
33
|
+
}
|
|
34
|
+
static getTooltipFixedCoordinate(scaleKey, margin, keyValue, blockBoundingRect, tooltipBoundingRect, keyAxisOrient, winWidth, winHeight) {
|
|
35
|
+
const coordinate = {
|
|
36
|
+
top: null,
|
|
37
|
+
left: null
|
|
38
|
+
};
|
|
39
|
+
if (keyAxisOrient === "bottom" || keyAxisOrient === "top") {
|
|
40
|
+
coordinate.left = Scale.getScaledValue(scaleKey, keyValue) + margin.left - tooltipBoundingRect.width / 2;
|
|
41
|
+
if (keyAxisOrient === "bottom")
|
|
42
|
+
coordinate.top = margin.top - 5 - tooltipBoundingRect.height;
|
|
43
|
+
else
|
|
44
|
+
coordinate.top = blockBoundingRect.height - margin.bottom;
|
|
45
|
+
}
|
|
46
|
+
if (keyAxisOrient === "left" || keyAxisOrient === "right") {
|
|
47
|
+
coordinate.top = Scale.getScaledValue(scaleKey, keyValue) + margin.top - tooltipBoundingRect.height / 2;
|
|
48
|
+
if (keyAxisOrient === "left")
|
|
49
|
+
coordinate.left = blockBoundingRect.width - margin.right;
|
|
50
|
+
else
|
|
51
|
+
coordinate.left = margin.left - tooltipBoundingRect.width;
|
|
52
|
+
}
|
|
53
|
+
return this.recalcToolTipCoordinateByViewPort(blockBoundingRect, tooltipBoundingRect, coordinate, winWidth, winHeight);
|
|
54
|
+
}
|
|
55
|
+
static getTooltipCursorCoordinate(pointer, blockBoundingRect, tooltipBoundingRect) {
|
|
56
|
+
const pad = 10;
|
|
57
|
+
const coordinate = {
|
|
58
|
+
top: pointer[1] + pad,
|
|
59
|
+
left: pointer[0] + pad
|
|
60
|
+
};
|
|
61
|
+
return this.recalcToolTipCoordinateByViewPort(blockBoundingRect, tooltipBoundingRect, coordinate, window.innerWidth, window.innerHeight);
|
|
62
|
+
}
|
|
63
|
+
static getTooltipLineAttributes(scaleKey, margin, key, chartOrientation, blockSize) {
|
|
64
|
+
const attributes = {
|
|
65
|
+
x1: 0,
|
|
66
|
+
x2: 0,
|
|
67
|
+
y1: 0,
|
|
68
|
+
y2: 0
|
|
69
|
+
};
|
|
70
|
+
if (chartOrientation === "vertical") {
|
|
71
|
+
attributes.x1 = Math.ceil(Scale.getScaledValue(scaleKey, key) + margin.left) - 0.5;
|
|
72
|
+
attributes.x2 = Math.ceil(Scale.getScaledValue(scaleKey, key) + margin.left) - 0.5;
|
|
73
|
+
attributes.y1 = margin.top - this.convexsize;
|
|
74
|
+
attributes.y2 = blockSize.height - margin.bottom + this.convexsize * 2;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
attributes.x1 = margin.left - this.convexsize;
|
|
78
|
+
attributes.x2 = blockSize.width - margin.right + this.convexsize * 2;
|
|
79
|
+
attributes.y1 = Scale.getScaledValue(scaleKey, key) + margin.top;
|
|
80
|
+
attributes.y2 = Scale.getScaledValue(scaleKey, key) + margin.top;
|
|
81
|
+
}
|
|
82
|
+
return attributes;
|
|
83
|
+
}
|
|
84
|
+
static recalcToolTipCoordinateByViewPort(blockBounding, tooltipBounding, preCoordinate, winWidth, winHeight) {
|
|
85
|
+
const res = TooltipService.getTooltipByWindow(tooltipBounding, preCoordinate, {
|
|
86
|
+
width: winWidth,
|
|
87
|
+
height: winHeight
|
|
88
|
+
}, blockBounding);
|
|
89
|
+
return {
|
|
90
|
+
left: res.left + "px",
|
|
91
|
+
top: res.top + "px",
|
|
92
|
+
right: null,
|
|
93
|
+
bottom: null
|
|
94
|
+
};
|
|
95
|
+
}
|
|
119
96
|
}
|
|
120
97
|
TooltipHelper.convexsize = 5;
|
|
@@ -1,69 +1,49 @@
|
|
|
1
1
|
import { Block } from "../../../engine/block/block";
|
|
2
|
-
import {
|
|
3
|
-
OptionsModelData,
|
|
4
|
-
Orient,
|
|
5
|
-
TwoDimChartValueLabelsOptions,
|
|
6
|
-
TwoDimensionalChartModel,
|
|
7
|
-
TwoDimensionalValueLabels,
|
|
8
|
-
ValueLabelAnchor,
|
|
9
|
-
ValueLabelDominantBaseline,
|
|
10
|
-
ValueLabelsStyleModel
|
|
11
|
-
} from "../../../model/model";
|
|
2
|
+
import { OptionsModelData, Orient, TwoDimChartValueLabelsOptions, TwoDimensionalChartModel, TwoDimensionalValueLabels, ValueLabelAnchor, ValueLabelDominantBaseline, ValueLabelsStyleModel } from "../../../model/model";
|
|
12
3
|
import { MdtChartsDataRow, MdtChartsDataSource } from "../../../config/config";
|
|
13
4
|
import { Scales, ScalesWithSecondary } from "../../../engine/features/scale/scale";
|
|
14
5
|
export interface ValueLabelsOptions {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
elementAccessors: {
|
|
7
|
+
getBlock: () => Block;
|
|
8
|
+
};
|
|
9
|
+
data: {
|
|
10
|
+
keyFieldName: string;
|
|
11
|
+
};
|
|
12
|
+
canvas: {
|
|
13
|
+
keyAxisOrient: Orient;
|
|
14
|
+
valueLabels: TwoDimensionalValueLabels;
|
|
15
|
+
style: ValueLabelsStyleModel;
|
|
16
|
+
};
|
|
26
17
|
}
|
|
27
18
|
export interface ValueLabelAttrs {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
x: (data: MdtChartsDataRow) => number;
|
|
20
|
+
y: (data: MdtChartsDataRow) => number;
|
|
21
|
+
textAnchor: ValueLabelAnchor;
|
|
22
|
+
dominantBaseline: ValueLabelDominantBaseline;
|
|
32
23
|
}
|
|
33
24
|
export declare class ChartValueLabels {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
25
|
+
private readonly globalOptions;
|
|
26
|
+
private readonly chart;
|
|
27
|
+
static readonly valueLabelClass: string;
|
|
28
|
+
private readonly renderPipeline;
|
|
29
|
+
private readonly attrsProvider;
|
|
30
|
+
private options;
|
|
31
|
+
constructor(globalOptions: ValueLabelsOptions, chart: TwoDimensionalChartModel);
|
|
32
|
+
render(scales: Scales, data: MdtChartsDataRow[]): void;
|
|
33
|
+
update(scales: Scales, newData: MdtChartsDataRow[], updatedOptions: TwoDimChartValueLabelsOptions): Promise<void[]>;
|
|
34
|
+
private renderByGroupIndex;
|
|
35
|
+
private updateByGroupIndex;
|
|
36
|
+
private getAllValueLabelsOfChart;
|
|
37
|
+
private setAttrs;
|
|
38
|
+
private setClasses;
|
|
48
39
|
}
|
|
49
40
|
export declare class CanvasValueLabels {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
): void;
|
|
59
|
-
update(
|
|
60
|
-
scales: ScalesWithSecondary,
|
|
61
|
-
charts: TwoDimensionalChartModel[],
|
|
62
|
-
data: MdtChartsDataSource,
|
|
63
|
-
dataOptions: OptionsModelData,
|
|
64
|
-
newCanvasOptions: TwoDimensionalValueLabels
|
|
65
|
-
): void;
|
|
66
|
-
private toggleOldValueLabelsVisibility;
|
|
67
|
-
private getAllValueLabels;
|
|
68
|
-
private getChartScales;
|
|
41
|
+
private readonly options;
|
|
42
|
+
private chartsValueLabels;
|
|
43
|
+
constructor(options: ValueLabelsOptions);
|
|
44
|
+
render(scales: ScalesWithSecondary, charts: TwoDimensionalChartModel[], data: MdtChartsDataSource, dataOptions: OptionsModelData): void;
|
|
45
|
+
update(scales: ScalesWithSecondary, charts: TwoDimensionalChartModel[], data: MdtChartsDataSource, dataOptions: OptionsModelData, newCanvasOptions: TwoDimensionalValueLabels): void;
|
|
46
|
+
private toggleOldValueLabelsVisibility;
|
|
47
|
+
private getAllValueLabels;
|
|
48
|
+
private getChartScales;
|
|
69
49
|
}
|