mdt-charts 1.29.0 → 1.30.0
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 +170 -178
- 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 +170 -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 +281 -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 +5 -5
- 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
|
@@ -4,25 +4,14 @@ import { TooltipLineAttributes } from "./tooltipDomHelper";
|
|
|
4
4
|
import { ChartOrientation } from "../../../config/config";
|
|
5
5
|
import { NewTooltip, TooltipCoordinate } from "./newTooltip/newTooltip";
|
|
6
6
|
export declare class TooltipComponentsManager {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
): void;
|
|
18
|
-
static getLineWidth(tooltipLine: Selection<BaseType, any, BaseType, any>): number;
|
|
19
|
-
static renderTooltipArrow(
|
|
20
|
-
tooltipBlock: Selection<BaseType, unknown, HTMLElement, any>
|
|
21
|
-
): Selection<BaseType, unknown, HTMLElement, any>;
|
|
22
|
-
static setLineTooltipCoordinate(
|
|
23
|
-
tooltip: NewTooltip,
|
|
24
|
-
tooltipCoordinate: TooltipCoordinate,
|
|
25
|
-
chartOrientation: ChartOrientation,
|
|
26
|
-
transition?: number
|
|
27
|
-
): void;
|
|
7
|
+
static showComponent(tooltipBlock: Selection<BaseType, unknown, HTMLElement, any>): void;
|
|
8
|
+
static hideComponent(tooltipBlock: Selection<BaseType, unknown, HTMLElement, any>): void;
|
|
9
|
+
static renderTooltipWrapper(block: Block): void;
|
|
10
|
+
static renderTooltipBlock(block: Block, translateX?: number, translateY?: number): NewTooltip;
|
|
11
|
+
static renderTooltipContentBlock(tooltipBlock: NewTooltip): Selection<HTMLDivElement, unknown, HTMLElement, any>;
|
|
12
|
+
static renderTooltipLine(block: Block): Selection<SVGLineElement, unknown, HTMLElement, any>;
|
|
13
|
+
static setTooltipLineAttributes(tooltipLine: Selection<SVGLineElement, unknown, HTMLElement, any>, attributes: TooltipLineAttributes, transition: number): void;
|
|
14
|
+
static getLineWidth(tooltipLine: Selection<BaseType, any, BaseType, any>): number;
|
|
15
|
+
static renderTooltipArrow(tooltipBlock: Selection<BaseType, unknown, HTMLElement, any>): Selection<BaseType, unknown, HTMLElement, any>;
|
|
16
|
+
static setLineTooltipCoordinate(tooltip: NewTooltip, tooltipCoordinate: TooltipCoordinate, chartOrientation: ChartOrientation, transition?: number): void;
|
|
28
17
|
}
|
|
@@ -5,117 +5,118 @@ import { interrupt } from "d3-transition";
|
|
|
5
5
|
import { Tooltip } from "./tooltip";
|
|
6
6
|
import { NewTooltip } from "./newTooltip/newTooltip";
|
|
7
7
|
export class TooltipComponentsManager {
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
8
|
+
static showComponent(tooltipBlock) {
|
|
9
|
+
tooltipBlock.style("display", "block");
|
|
10
|
+
}
|
|
11
|
+
static hideComponent(tooltipBlock) {
|
|
12
|
+
tooltipBlock.style("display", "none");
|
|
13
|
+
}
|
|
14
|
+
static renderTooltipWrapper(block) {
|
|
15
|
+
let tooltipWrapper = block.getWrapper().select(`.${Tooltip.tooltipWrapperClass}`);
|
|
16
|
+
if (tooltipWrapper.empty())
|
|
17
|
+
block.getWrapper().append("div").attr("class", Tooltip.tooltipWrapperClass);
|
|
18
|
+
}
|
|
19
|
+
static renderTooltipBlock(block, translateX = 0, translateY = 0) {
|
|
20
|
+
const wrapper = block.getWrapper().select(`.${Tooltip.tooltipWrapperClass}`);
|
|
21
|
+
const tooltipService = new NewTooltip();
|
|
22
|
+
let tooltipBlock = tooltipService.findInWrapper(wrapper);
|
|
23
|
+
if (tooltipBlock.empty()) {
|
|
24
|
+
tooltipBlock = tooltipService.render(wrapper);
|
|
25
|
+
tooltipBlock.style("position", "absolute").style("display", "none");
|
|
26
|
+
}
|
|
27
|
+
if (translateX !== 0 || translateY !== 0)
|
|
28
|
+
tooltipBlock.style("transform", `translate(${translateX}px, ${translateY}px)`);
|
|
29
|
+
return tooltipService;
|
|
30
|
+
}
|
|
31
|
+
static renderTooltipContentBlock(tooltipBlock) {
|
|
32
|
+
let tooltipContentBlock = tooltipBlock.getEl().select(`.${Tooltip.tooltipContentClass}`);
|
|
33
|
+
if (tooltipContentBlock.empty()) {
|
|
34
|
+
tooltipContentBlock = select(document.createElement("div")).attr("class", Tooltip.tooltipContentClass);
|
|
35
|
+
tooltipBlock.appendContent(tooltipContentBlock.node());
|
|
36
|
+
}
|
|
37
|
+
return tooltipContentBlock;
|
|
38
|
+
}
|
|
39
|
+
static renderTooltipLine(block) {
|
|
40
|
+
let tooltipLine = block.svg.getChartBlock().select(`.${Tooltip.tooltipLineClass}`);
|
|
41
|
+
if (tooltipLine.empty())
|
|
42
|
+
tooltipLine = block.svg.getChartBlock().append("line").attr("class", Tooltip.tooltipLineClass).lower();
|
|
43
|
+
return tooltipLine;
|
|
44
|
+
}
|
|
45
|
+
static setTooltipLineAttributes(tooltipLine, attributes, transition) {
|
|
46
|
+
interrupt(tooltipLine.node());
|
|
47
|
+
if (transition > 0 && tooltipLine.style("display") === "block") {
|
|
48
|
+
tooltipLine
|
|
49
|
+
.interrupt()
|
|
50
|
+
.transition()
|
|
51
|
+
.duration(transition)
|
|
52
|
+
.ease(easeLinear)
|
|
53
|
+
.attr("x1", attributes.x1)
|
|
54
|
+
.attr("x2", attributes.x2)
|
|
55
|
+
.attr("y1", attributes.y1)
|
|
56
|
+
.attr("y2", attributes.y2);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
tooltipLine
|
|
60
|
+
.attr("x1", attributes.x1)
|
|
61
|
+
.attr("x2", attributes.x2)
|
|
62
|
+
.attr("y1", attributes.y1)
|
|
63
|
+
.attr("y2", attributes.y2);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
static getLineWidth(tooltipLine) {
|
|
67
|
+
return parseFloat(tooltipLine.style("stroke-width"));
|
|
68
|
+
}
|
|
69
|
+
static renderTooltipArrow(tooltipBlock) {
|
|
70
|
+
let arrowSize = ARROW_SIZE / 2;
|
|
71
|
+
let tooltipArrow = tooltipBlock.select(`.${Tooltip.tooltipArrowClass}`);
|
|
72
|
+
if (tooltipArrow.empty())
|
|
73
|
+
tooltipArrow = tooltipBlock
|
|
74
|
+
.append("div")
|
|
75
|
+
.attr("class", Tooltip.tooltipArrowClass)
|
|
76
|
+
.style("position", "absolute")
|
|
77
|
+
.style("left", `${ARROW_DEFAULT_POSITION}px`)
|
|
78
|
+
.style("border-top-width", `${arrowSize}px`)
|
|
79
|
+
.style("border-right-width", `${arrowSize}px`)
|
|
80
|
+
.style("border-bottom-width", `0px`)
|
|
81
|
+
.style("border-left-width", `${arrowSize}px`);
|
|
82
|
+
return tooltipArrow;
|
|
83
|
+
}
|
|
84
|
+
static setLineTooltipCoordinate(tooltip, tooltipCoordinate, chartOrientation, transition = null) {
|
|
85
|
+
const tooltipBlock = tooltip.getEl();
|
|
86
|
+
interrupt(tooltipBlock.node());
|
|
87
|
+
if (!transition || transition <= 0)
|
|
88
|
+
tooltip.setCoordinate(tooltipCoordinate);
|
|
89
|
+
if (chartOrientation === "vertical" &&
|
|
90
|
+
tooltipBlock.style("left") !== "0px" &&
|
|
91
|
+
tooltipBlock.style("right") !== "0px" &&
|
|
92
|
+
tooltipCoordinate.right !== "0px" &&
|
|
93
|
+
tooltipCoordinate.left !== null) {
|
|
94
|
+
tooltipBlock
|
|
95
|
+
.style("right", tooltipCoordinate.right)
|
|
96
|
+
.style("bottom", tooltipCoordinate.bottom)
|
|
97
|
+
.style("top", tooltipCoordinate.top)
|
|
98
|
+
.interrupt()
|
|
99
|
+
.transition()
|
|
100
|
+
.duration(transition)
|
|
101
|
+
.ease(easeLinear)
|
|
102
|
+
.style("left", tooltipCoordinate.left);
|
|
103
|
+
}
|
|
104
|
+
else if (chartOrientation === "horizontal" &&
|
|
105
|
+
tooltipBlock.style("top") !== "0px" &&
|
|
106
|
+
parseInt(tooltipBlock.style("bottom")) > 0 &&
|
|
107
|
+
tooltipCoordinate.bottom === null) {
|
|
108
|
+
tooltipBlock
|
|
109
|
+
.style("right", tooltipCoordinate.right)
|
|
110
|
+
.style("bottom", tooltipCoordinate.bottom)
|
|
111
|
+
.style("left", tooltipCoordinate.left)
|
|
112
|
+
.interrupt()
|
|
113
|
+
.transition()
|
|
114
|
+
.duration(transition)
|
|
115
|
+
.ease(easeLinear)
|
|
116
|
+
.style("top", tooltipCoordinate.top);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
tooltip.setCoordinate(tooltipCoordinate);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
121
122
|
}
|
|
@@ -3,53 +3,31 @@ import { MdtChartsDataSource, TooltipOptions } from "../../../config/config";
|
|
|
3
3
|
import { OptionsModelData, PolarChartModel, TwoDimensionalChartModel } from "../../../model/model";
|
|
4
4
|
import { Size } from "../../../config/config";
|
|
5
5
|
export interface TooltipLineAttributes {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
x1: number;
|
|
7
|
+
x2: number;
|
|
8
|
+
y1: number;
|
|
9
|
+
y2: number;
|
|
10
10
|
}
|
|
11
11
|
export declare const ARROW_SIZE = 20;
|
|
12
12
|
export declare const ARROW_DEFAULT_POSITION = 9;
|
|
13
13
|
export declare const TOOLTIP_ARROW_PADDING_X: number;
|
|
14
14
|
export declare const TOOLTIP_ARROW_PADDING_Y = 13;
|
|
15
15
|
export declare class TooltipDomHelper {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
keyValue: string,
|
|
34
|
-
markColor: string,
|
|
35
|
-
tooltipOptions?: TooltipOptions
|
|
36
|
-
): void;
|
|
37
|
-
static getRecalcedCoordinateByArrow(
|
|
38
|
-
coordinate: [number, number],
|
|
39
|
-
tooltipBlock: Selection<HTMLElement, unknown, HTMLElement, any>,
|
|
40
|
-
blockSize: Size,
|
|
41
|
-
tooltipArrow: Selection<BaseType, unknown, HTMLElement, any>,
|
|
42
|
-
translateX?: number,
|
|
43
|
-
translateY?: number
|
|
44
|
-
): [number, number];
|
|
45
|
-
private static renderHead;
|
|
46
|
-
private static fillValuesContent;
|
|
47
|
-
private static getTooltipItemHtml;
|
|
48
|
-
private static getTooltipContentItemHtml;
|
|
49
|
-
private static setTooltipArrowCoordinate;
|
|
50
|
-
private static fillContentByFunction;
|
|
51
|
-
private static setWhiteSpaceForTextBlocks;
|
|
52
|
-
private static getMarkerCreator;
|
|
53
|
-
private static addAggregatorTooltipItem;
|
|
54
|
-
private static fillCharts;
|
|
16
|
+
private static readonly groupClass;
|
|
17
|
+
private static readonly headClass;
|
|
18
|
+
private static readonly textItemClass;
|
|
19
|
+
private static readonly tooltipLegendDefaultMarker;
|
|
20
|
+
static fillForMulti2DCharts(contentBlock: Selection<HTMLElement, unknown, BaseType, unknown>, charts: TwoDimensionalChartModel[], data: MdtChartsDataSource, dataOptions: OptionsModelData, keyValue: string, tooltipOptions?: TooltipOptions): void;
|
|
21
|
+
static fillForPolarChart(contentBlock: Selection<HTMLElement, unknown, BaseType, unknown>, chart: PolarChartModel, data: MdtChartsDataSource, dataOptions: OptionsModelData, keyValue: string, markColor: string, tooltipOptions?: TooltipOptions): void;
|
|
22
|
+
static getRecalcedCoordinateByArrow(coordinate: [number, number], tooltipBlock: Selection<HTMLElement, unknown, HTMLElement, any>, blockSize: Size, tooltipArrow: Selection<BaseType, unknown, HTMLElement, any>, translateX?: number, translateY?: number): [number, number];
|
|
23
|
+
private static renderHead;
|
|
24
|
+
private static fillValuesContent;
|
|
25
|
+
private static getTooltipItemHtml;
|
|
26
|
+
private static getTooltipContentItemHtml;
|
|
27
|
+
private static setTooltipArrowCoordinate;
|
|
28
|
+
private static fillContentByFunction;
|
|
29
|
+
private static setWhiteSpaceForTextBlocks;
|
|
30
|
+
private static getMarkerCreator;
|
|
31
|
+
private static addAggregatorTooltipItem;
|
|
32
|
+
private static fillCharts;
|
|
55
33
|
}
|
|
@@ -7,151 +7,127 @@ export const ARROW_DEFAULT_POSITION = 9;
|
|
|
7
7
|
export const TOOLTIP_ARROW_PADDING_X = ARROW_DEFAULT_POSITION - (ARROW_SIZE * Math.sqrt(2) - ARROW_SIZE) / 2 + 14;
|
|
8
8
|
export const TOOLTIP_ARROW_PADDING_Y = 13;
|
|
9
9
|
export class TooltipDomHelper {
|
|
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
|
-
: markerCreator.renderMarker(colorBlock, markColor);
|
|
72
|
-
}
|
|
73
|
-
group
|
|
74
|
-
.append("div")
|
|
75
|
-
.attr("class", "tooltip-texts")
|
|
76
|
-
.append("div")
|
|
77
|
-
.attr("class", this.textItemClass)
|
|
78
|
-
.html(tooltipHtml);
|
|
79
|
-
}
|
|
80
|
-
static getTooltipItemHtml(row, valueField, tooltipOptions) {
|
|
81
|
-
const formattedValueByDefault = ValueFormatter.formatField(valueField.format, row[valueField.name]);
|
|
82
|
-
const formattedValue = (
|
|
83
|
-
tooltipOptions === null || tooltipOptions === void 0 ? void 0 : tooltipOptions.formatValue
|
|
84
|
-
)
|
|
85
|
-
? tooltipOptions.formatValue({
|
|
86
|
-
rawValue: row[valueField.name],
|
|
87
|
-
autoFormattedValue: formattedValueByDefault
|
|
88
|
-
})
|
|
89
|
-
: formattedValueByDefault;
|
|
90
|
-
const text = this.getTooltipContentItemHtml(valueField.title, formattedValue);
|
|
91
|
-
return text;
|
|
92
|
-
}
|
|
93
|
-
static getTooltipContentItemHtml(fieldTitle, fieldValue) {
|
|
94
|
-
return `<span class="tooltip-field-title">${fieldTitle}</span>
|
|
10
|
+
static fillForMulti2DCharts(contentBlock, charts, data, dataOptions, keyValue, tooltipOptions) {
|
|
11
|
+
const chartDataRows = [];
|
|
12
|
+
charts.forEach((chart) => {
|
|
13
|
+
chart.data.valueFields.forEach((field, index) => {
|
|
14
|
+
chartDataRows.push({
|
|
15
|
+
field,
|
|
16
|
+
markColor: chart.style.elementColors[index % chart.style.elementColors.length],
|
|
17
|
+
markerCreator: this.getMarkerCreator(chart.legend)
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
this.fillCharts(contentBlock, chartDataRows, data, dataOptions, keyValue, tooltipOptions);
|
|
22
|
+
}
|
|
23
|
+
static fillForPolarChart(contentBlock, chart, data, dataOptions, keyValue, markColor, tooltipOptions) {
|
|
24
|
+
const chartDataRows = [
|
|
25
|
+
{
|
|
26
|
+
field: chart.data.valueField,
|
|
27
|
+
markColor,
|
|
28
|
+
markerCreator: this.getMarkerCreator(chart.legend)
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
this.fillCharts(contentBlock, chartDataRows, data, dataOptions, keyValue, tooltipOptions);
|
|
32
|
+
}
|
|
33
|
+
static getRecalcedCoordinateByArrow(coordinate, tooltipBlock, blockSize, tooltipArrow, translateX = 0, translateY = 0) {
|
|
34
|
+
const tooltipBlockNode = tooltipBlock.node();
|
|
35
|
+
const horizontalPad = TooltipHelper.getHorizontalPad(coordinate[0], tooltipBlockNode.getBoundingClientRect().width, blockSize, translateX);
|
|
36
|
+
const verticalPad = TooltipHelper.getVerticalPad(coordinate[1], tooltipBlockNode.getBoundingClientRect().height, translateY);
|
|
37
|
+
this.setTooltipArrowCoordinate(tooltipArrow, TooltipHelper.getTooltipArrowPadding(tooltipBlockNode.getBoundingClientRect().width, horizontalPad));
|
|
38
|
+
return [
|
|
39
|
+
coordinate[0] - TOOLTIP_ARROW_PADDING_X - horizontalPad,
|
|
40
|
+
coordinate[1] - TOOLTIP_ARROW_PADDING_Y - tooltipBlockNode.getBoundingClientRect().height - verticalPad
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
static renderHead(contentBlock, keyValue) {
|
|
44
|
+
contentBlock.append("div").attr("class", `${this.groupClass} ${this.headClass}`).text(keyValue);
|
|
45
|
+
}
|
|
46
|
+
static fillValuesContent(contentBlock, { markColor, tooltipHtml, markerCreator }) {
|
|
47
|
+
const group = contentBlock.append("div").attr("class", this.groupClass);
|
|
48
|
+
if (markColor) {
|
|
49
|
+
const colorBlock = group.append("div").attr("class", "tooltip-color");
|
|
50
|
+
markerCreator === null || markerCreator === void 0 ? void 0 : markerCreator.renderMarker(colorBlock, markColor);
|
|
51
|
+
}
|
|
52
|
+
group
|
|
53
|
+
.append("div")
|
|
54
|
+
.attr("class", "tooltip-texts")
|
|
55
|
+
.append("div")
|
|
56
|
+
.attr("class", this.textItemClass)
|
|
57
|
+
.html(tooltipHtml);
|
|
58
|
+
}
|
|
59
|
+
static getTooltipItemHtml(row, valueField, tooltipOptions) {
|
|
60
|
+
const formattedValueByDefault = ValueFormatter.formatField(valueField.format, row[valueField.name]);
|
|
61
|
+
const formattedValue = (tooltipOptions === null || tooltipOptions === void 0 ? void 0 : tooltipOptions.formatValue) ? tooltipOptions.formatValue({
|
|
62
|
+
rawValue: row[valueField.name],
|
|
63
|
+
autoFormattedValue: formattedValueByDefault
|
|
64
|
+
})
|
|
65
|
+
: formattedValueByDefault;
|
|
66
|
+
const text = this.getTooltipContentItemHtml(valueField.title, formattedValue);
|
|
67
|
+
return text;
|
|
68
|
+
}
|
|
69
|
+
static getTooltipContentItemHtml(fieldTitle, fieldValue) {
|
|
70
|
+
return `<span class="tooltip-field-title">${fieldTitle}</span>
|
|
95
71
|
<span class="tooltip-field-value">${fieldValue}</span>`;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
72
|
+
}
|
|
73
|
+
static setTooltipArrowCoordinate(tooltipArrow, horizontalPad) {
|
|
74
|
+
if (horizontalPad !== 0)
|
|
75
|
+
tooltipArrow.style("left", `${ARROW_DEFAULT_POSITION + Math.floor(horizontalPad)}px`);
|
|
76
|
+
else
|
|
77
|
+
tooltipArrow.style("left", `${ARROW_DEFAULT_POSITION}px`);
|
|
78
|
+
}
|
|
79
|
+
static fillContentByFunction(contentBlock, data, dataOptions, keyValue, htmlHandler) {
|
|
80
|
+
const row = Helper.getRowsByKeys([keyValue], dataOptions.keyField.name, data[dataOptions.dataSource])[0];
|
|
81
|
+
contentBlock.html(htmlHandler(row));
|
|
82
|
+
this.setWhiteSpaceForTextBlocks(contentBlock);
|
|
83
|
+
contentBlock.selectAll(".tooltip-text-item").style("display", "block");
|
|
84
|
+
}
|
|
85
|
+
static setWhiteSpaceForTextBlocks(contentBlock) {
|
|
86
|
+
contentBlock.selectAll(`.${this.textItemClass}`).style("white-space", "pre-wrap");
|
|
87
|
+
}
|
|
88
|
+
static getMarkerCreator(options) {
|
|
89
|
+
return getMarkerCreator(options, { default: { cssClass: TooltipDomHelper.tooltipLegendDefaultMarker } });
|
|
90
|
+
}
|
|
91
|
+
static addAggregatorTooltipItem(tooltipOptions, data, tooltipItems) {
|
|
92
|
+
if (tooltipOptions === null || tooltipOptions === void 0 ? void 0 : tooltipOptions.aggregator) {
|
|
93
|
+
const aggregatorContent = tooltipOptions.aggregator.content({ row: data });
|
|
94
|
+
const aggregatorHtml = aggregatorContent.type === "plainText"
|
|
95
|
+
? aggregatorContent.textContent
|
|
96
|
+
: this.getTooltipContentItemHtml(aggregatorContent.caption, aggregatorContent.value);
|
|
97
|
+
const tooltipAggregatorItem = {
|
|
98
|
+
markColor: undefined,
|
|
99
|
+
tooltipHtml: aggregatorHtml,
|
|
100
|
+
markerCreator: undefined
|
|
101
|
+
};
|
|
102
|
+
if (tooltipOptions.aggregator.position === "underValues")
|
|
103
|
+
tooltipItems.push(tooltipAggregatorItem);
|
|
104
|
+
else
|
|
105
|
+
tooltipItems.unshift(tooltipAggregatorItem);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
static fillCharts(contentBlock, chartDataRows, data, dataOptions, keyValue, tooltipOptions) {
|
|
109
|
+
const row = data[dataOptions.dataSource].find((d) => d[dataOptions.keyField.name] === keyValue);
|
|
110
|
+
contentBlock.html("");
|
|
111
|
+
if (!(tooltipOptions === null || tooltipOptions === void 0 ? void 0 : tooltipOptions.html)) {
|
|
112
|
+
const tooltipItems = [];
|
|
113
|
+
this.renderHead(contentBlock, keyValue);
|
|
114
|
+
chartDataRows.forEach((dataRow) => {
|
|
115
|
+
const html = this.getTooltipItemHtml(row, dataRow.field, tooltipOptions);
|
|
116
|
+
tooltipItems.push({
|
|
117
|
+
markColor: dataRow.markColor,
|
|
118
|
+
tooltipHtml: html,
|
|
119
|
+
markerCreator: dataRow.markerCreator
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
this.addAggregatorTooltipItem(tooltipOptions, row, tooltipItems);
|
|
123
|
+
tooltipItems.forEach((item) => {
|
|
124
|
+
this.fillValuesContent(contentBlock, item);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
this.fillContentByFunction(contentBlock, data, dataOptions, keyValue, tooltipOptions.html);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
155
131
|
}
|
|
156
132
|
TooltipDomHelper.groupClass = "tooltip-group";
|
|
157
133
|
TooltipDomHelper.headClass = "tooltip-head";
|