mdt-charts 1.28.1 → 1.29.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 +164 -165
- package/lib/designer/designerConfig.d.ts +62 -59
- package/lib/engine/block/block.d.ts +22 -16
- 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 +65 -66
- 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 +6 -6
- package/lib/engine/contentManager/contentManager.js +15 -15
- package/lib/engine/contentManager/contentManagerFactory.d.ts +6 -6
- package/lib/engine/contentManager/contentManagerFactory.js +12 -12
- package/lib/engine/elementHighlighter/elementHighlighter.d.ts +70 -22
- package/lib/engine/elementHighlighter/elementHighlighter.js +230 -181
- package/lib/engine/elementHighlighter/selectHighlighter.d.ts +29 -4
- package/lib/engine/elementHighlighter/selectHighlighter.js +189 -87
- package/lib/engine/engine.d.ts +16 -16
- package/lib/engine/engine.js +87 -62
- package/lib/engine/features/aggregator/aggregator.d.ts +24 -17
- package/lib/engine/features/aggregator/aggregator.js +113 -102
- package/lib/engine/features/axis/axis.d.ts +22 -9
- package/lib/engine/features/axis/axis.js +159 -150
- package/lib/engine/features/axis/axisDomHelper.d.ts +7 -2
- package/lib/engine/features/axis/axisDomHelper.js +19 -20
- package/lib/engine/features/axis/axisHelper.d.ts +9 -5
- package/lib/engine/features/axis/axisHelper.js +28 -33
- package/lib/engine/features/axis/axisLabelDomHelper.d.ts +26 -11
- package/lib/engine/features/axis/axisLabelDomHelper.js +156 -152
- 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 +51 -16
- package/lib/engine/features/embeddedLabels/embeddedLabels.js +234 -134
- package/lib/engine/features/embeddedLabels/embeddedLabelsDomHelper.d.ts +13 -2
- package/lib/engine/features/embeddedLabels/embeddedLabelsDomHelper.js +20 -23
- package/lib/engine/features/embeddedLabels/embeddedLabelsHelper.d.ts +32 -15
- package/lib/engine/features/embeddedLabels/embeddedLabelsHelper.js +56 -63
- package/lib/engine/features/gridLine/gidLineHelper.d.ts +13 -7
- package/lib/engine/features/gridLine/gidLineHelper.js +42 -49
- package/lib/engine/features/gridLine/gridLine.d.ts +19 -5
- package/lib/engine/features/gridLine/gridLine.js +35 -36
- package/lib/engine/features/legend/legend.d.ts +38 -29
- package/lib/engine/features/legend/legend.js +117 -92
- package/lib/engine/features/legend/legendDomHelper.d.ts +13 -6
- package/lib/engine/features/legend/legendDomHelper.js +63 -62
- package/lib/engine/features/legend/legendEventsManager.d.ts +13 -8
- package/lib/engine/features/legend/legendEventsManager.js +48 -47
- package/lib/engine/features/legend/legendHelper.d.ts +39 -14
- package/lib/engine/features/legend/legendHelper.js +98 -93
- package/lib/engine/features/legend/legendHelperService.d.ts +13 -6
- package/lib/engine/features/legend/legendHelperService.js +24 -25
- package/lib/engine/features/legend/legendMarkerCreator.d.ts +18 -9
- package/lib/engine/features/legend/legendMarkerCreator.js +79 -76
- package/lib/engine/features/legend/legendWidthCalculator.d.ts +7 -7
- package/lib/engine/features/legend/legendWidthCalculator.js +126 -122
- package/lib/engine/features/markDots/markDot.d.ts +42 -15
- package/lib/engine/features/markDots/markDot.js +101 -70
- package/lib/engine/features/markDots/markDotsHelper.d.ts +8 -1
- package/lib/engine/features/markDots/markDotsHelper.js +13 -12
- package/lib/engine/features/recordOverflowAlert/recordOverflowAlertCore.d.ts +17 -17
- package/lib/engine/features/recordOverflowAlert/recordOverflowAlertCore.js +42 -47
- package/lib/engine/features/scale/scale.d.ts +17 -12
- package/lib/engine/features/scale/scale.js +76 -69
- package/lib/engine/features/tipBox/tipBox.d.ts +9 -5
- package/lib/engine/features/tipBox/tipBox.js +24 -24
- package/lib/engine/features/tipBox/tipBoxHelper.d.ts +16 -9
- package/lib/engine/features/tipBox/tipBoxHelper.js +60 -45
- package/lib/engine/features/title/title.d.ts +6 -6
- package/lib/engine/features/title/title.js +34 -35
- package/lib/engine/features/tolltip/newTooltip/newTooltip.d.ts +15 -11
- package/lib/engine/features/tolltip/newTooltip/newTooltip.js +21 -21
- package/lib/engine/features/tolltip/newTooltip/newTooltipService.d.ts +13 -8
- package/lib/engine/features/tolltip/newTooltip/newTooltipService.js +26 -23
- package/lib/engine/features/tolltip/tooltip.d.ts +17 -11
- package/lib/engine/features/tolltip/tooltip.js +296 -142
- package/lib/engine/features/tolltip/tooltipComponentsManager.d.ts +21 -10
- package/lib/engine/features/tolltip/tooltipComponentsManager.js +113 -114
- package/lib/engine/features/tolltip/tooltipDomHelper.d.ts +43 -21
- package/lib/engine/features/tolltip/tooltipDomHelper.js +144 -120
- package/lib/engine/features/tolltip/tooltipHelper.d.ts +39 -9
- package/lib/engine/features/tolltip/tooltipHelper.js +114 -91
- package/lib/engine/features/valueLabels/valueLabels.d.ts +58 -38
- package/lib/engine/features/valueLabels/valueLabels.js +205 -169
- package/lib/engine/features/valueLabels/valueLabelsHelper.d.ts +7 -1
- package/lib/engine/features/valueLabels/valueLabelsHelper.js +23 -18
- package/lib/engine/features/valueLabelsCollision/valueLabelsCollision.d.ts +18 -15
- package/lib/engine/features/valueLabelsCollision/valueLabelsCollision.js +46 -47
- package/lib/engine/features/valueLabelsCollision/valueLabelsCollisionHelper.d.ts +6 -3
- package/lib/engine/features/valueLabelsCollision/valueLabelsCollisionHelper.js +49 -45
- package/lib/engine/filterManager/filterEventManager.d.ts +37 -26
- package/lib/engine/filterManager/filterEventManager.js +174 -129
- package/lib/engine/helpers/domHelper.d.ts +45 -20
- package/lib/engine/helpers/domHelper.js +62 -61
- package/lib/engine/helpers/fontResizer/fontResizer.d.ts +10 -10
- package/lib/engine/helpers/fontResizer/fontResizer.js +21 -16
- package/lib/engine/helpers/fontResizer/fontResizerService.d.ts +1 -1
- package/lib/engine/helpers/fontResizer/fontResizerService.js +9 -10
- package/lib/engine/helpers/helper.d.ts +27 -27
- package/lib/engine/helpers/helper.js +91 -92
- 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 +25 -11
- package/lib/engine/polarNotation/donut/DonutHelper.js +71 -70
- package/lib/engine/polarNotation/donut/donut.d.ts +38 -23
- package/lib/engine/polarNotation/donut/donut.js +109 -99
- package/lib/engine/polarNotation/extenders/polarRecordOverflowAlert.d.ts +7 -7
- package/lib/engine/polarNotation/extenders/polarRecordOverflowAlert.js +36 -36
- package/lib/engine/polarNotation/polarManager.d.ts +5 -5
- package/lib/engine/polarNotation/polarManager.js +66 -52
- package/lib/engine/transitionManager.d.ts +13 -14
- package/lib/engine/transitionManager.js +48 -49
- package/lib/engine/twoDimensionalNotation/area/area.d.ts +44 -28
- package/lib/engine/twoDimensionalNotation/area/area.js +272 -238
- package/lib/engine/twoDimensionalNotation/area/areaGenerator.d.ts +13 -5
- 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 +57 -41
- package/lib/engine/twoDimensionalNotation/bar/bar.d.ts +54 -29
- package/lib/engine/twoDimensionalNotation/bar/bar.js +362 -224
- package/lib/engine/twoDimensionalNotation/bar/barHelper.d.ts +71 -32
- package/lib/engine/twoDimensionalNotation/bar/barHelper.js +162 -126
- 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 +16 -17
- package/lib/engine/twoDimensionalNotation/dot/dotChart.d.ts +23 -23
- package/lib/engine/twoDimensionalNotation/dot/dotChart.js +135 -114
- package/lib/engine/twoDimensionalNotation/extenders/twoDimRecordOverflowAlert.d.ts +7 -7
- package/lib/engine/twoDimensionalNotation/extenders/twoDimRecordOverflowAlert.js +28 -28
- package/lib/engine/twoDimensionalNotation/line/line.d.ts +37 -16
- package/lib/engine/twoDimensionalNotation/line/line.js +162 -132
- package/lib/engine/twoDimensionalNotation/line/lineBuilder.d.ts +14 -11
- package/lib/engine/twoDimensionalNotation/line/lineBuilder.js +47 -48
- 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 +12 -6
- package/lib/engine/twoDimensionalNotation/line/lineHelper.js +76 -60
- 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 +16 -17
- package/lib/engine/twoDimensionalNotation/lineLike/generatorMiddleware/lineLikeGeneratorDefineMiddleware.d.ts +11 -10
- package/lib/engine/twoDimensionalNotation/lineLike/generatorMiddleware/lineLikeGeneratorDefineMiddleware.js +9 -7
- package/lib/engine/twoDimensionalNotation/lineLike/generatorMiddleware/lineLikeGeneratorMiddleware.d.ts +3 -1
- package/lib/engine/twoDimensionalNotation/twoDimensionalManager.d.ts +9 -9
- package/lib/engine/twoDimensionalNotation/twoDimensionalManager.js +252 -143
- package/lib/engine/valueFormatter.d.ts +3 -3
- package/lib/engine/valueFormatter.js +6 -6
- package/lib/main.d.ts +82 -75
- package/lib/main.js +79 -84
- 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 +27 -25
- package/lib/model/chartStyleModel/colorRange.d.ts +3 -3
- package/lib/model/chartStyleModel/colorRange.js +19 -24
- package/lib/model/chartStyleModel/twoDimensionalChartStyleModel.d.ts +22 -12
- package/lib/model/chartStyleModel/twoDimensionalChartStyleModel.js +69 -60
- package/lib/model/configsValidator/configValidator.d.ts +1 -1
- package/lib/model/configsValidator/configValidator.js +4 -4
- package/lib/model/dataManagerModel/dataManagerModel.d.ts +36 -26
- package/lib/model/dataManagerModel/dataManagerModel.js +179 -128
- package/lib/model/dataManagerModel/dataManagerModelService.d.ts +2 -2
- package/lib/model/dataManagerModel/dataManagerModelService.js +25 -26
- package/lib/model/featuresModel/axisModel.d.ts +69 -18
- package/lib/model/featuresModel/axisModel.js +224 -169
- package/lib/model/featuresModel/axisModelService.d.ts +10 -6
- package/lib/model/featuresModel/axisModelService.js +27 -27
- package/lib/model/featuresModel/legendModel/legendCanvasModel.d.ts +16 -11
- package/lib/model/featuresModel/legendModel/legendCanvasModel.js +55 -59
- package/lib/model/featuresModel/legendModel/legendModel.d.ts +7 -3
- package/lib/model/featuresModel/legendModel/legendModel.js +59 -41
- package/lib/model/featuresModel/legendModel/polarMarginCalculator.d.ts +8 -3
- package/lib/model/featuresModel/legendModel/polarMarginCalculator.js +18 -20
- package/lib/model/featuresModel/legendModel/twoDimLegendModel.d.ts +8 -4
- package/lib/model/featuresModel/legendModel/twoDimLegendModel.js +40 -27
- package/lib/model/featuresModel/otherComponents.d.ts +7 -4
- package/lib/model/featuresModel/otherComponents.js +9 -9
- package/lib/model/featuresModel/scaleModel/scaleAxisRecalcer.d.ts +6 -6
- package/lib/model/featuresModel/scaleModel/scaleAxisRecalcer.js +27 -23
- package/lib/model/featuresModel/scaleModel/scaleDomainService.d.ts +19 -5
- package/lib/model/featuresModel/scaleModel/scaleDomainService.js +44 -55
- package/lib/model/featuresModel/scaleModel/scaleModel.d.ts +10 -10
- package/lib/model/featuresModel/scaleModel/scaleModel.js +61 -50
- package/lib/model/featuresModel/scaleModel/scaleModelServices.js +15 -22
- 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 +23 -11
- package/lib/model/featuresModel/valueLabelsModel/valueLabelsModel.js +53 -51
- package/lib/model/helpers/modelHelper.d.ts +7 -7
- package/lib/model/helpers/modelHelper.js +38 -42
- package/lib/model/helpers/twoDimensionalModelHelper.d.ts +37 -9
- package/lib/model/helpers/twoDimensionalModelHelper.js +147 -125
- package/lib/model/helpers/unitsFromConfigReader.js +4 -4
- package/lib/model/helpers/unitsReader.d.ts +2 -2
- package/lib/model/helpers/unitsReader.js +11 -13
- package/lib/model/margin/marginModel.d.ts +7 -7
- package/lib/model/margin/marginModel.js +23 -20
- package/lib/model/margin/twoDim/twoDimMarginModel.d.ts +13 -13
- package/lib/model/margin/twoDim/twoDimMarginModel.js +184 -113
- package/lib/model/model.d.ts +308 -280
- package/lib/model/model.js +4 -4
- package/lib/model/modelBuilder.d.ts +27 -18
- package/lib/model/modelBuilder.js +85 -79
- package/lib/model/modelInstance/canvasModel/canvasModel.d.ts +17 -17
- package/lib/model/modelInstance/canvasModel/canvasModel.js +42 -43
- 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 +32 -23
- package/lib/model/modelInstance/configReader.js +125 -94
- package/lib/model/modelInstance/dataModel/dataModel.d.ts +9 -9
- package/lib/model/modelInstance/dataModel/dataModel.js +24 -24
- 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 +11 -6
- package/lib/model/modelInstance/modelInstance.js +16 -16
- package/lib/model/modelInstance/titleConfigReader.d.ts +8 -8
- package/lib/model/modelInstance/titleConfigReader.js +37 -30
- package/lib/model/notations/polar/donut/donutAggregatorService.d.ts +9 -6
- package/lib/model/notations/polar/donut/donutAggregatorService.js +40 -37
- package/lib/model/notations/polar/donut/donutModel.d.ts +9 -5
- 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 +13 -15
- package/lib/model/notations/polar/polarModel.d.ts +18 -7
- package/lib/model/notations/polar/polarModel.js +79 -65
- package/lib/model/notations/twoDimensional/styles.d.ts +44 -7
- package/lib/model/notations/twoDimensional/styles.js +234 -125
- package/lib/model/notations/twoDimensionalModel.d.ts +23 -13
- package/lib/model/notations/twoDimensionalModel.js +330 -162
- 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 +10 -11
- package/lib/style/charts-main.css +150 -151
- package/lib/style/charts-main.less +150 -151
- package/package.json +1 -1
|
@@ -7,20 +7,26 @@ import { Size } from "../../config/config";
|
|
|
7
7
|
import { BlockSvg } from "./blockSvg";
|
|
8
8
|
import { BlockHtml } from "./blockHtml";
|
|
9
9
|
export declare class Block {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
parentElement: HTMLElement;
|
|
11
|
+
transitionManager: TransitionManager;
|
|
12
|
+
scales: Scales;
|
|
13
|
+
filterEventManager: FilterEventManager;
|
|
14
|
+
svg: BlockSvg;
|
|
15
|
+
html: BlockHtml;
|
|
16
|
+
private wrapperCssClasses;
|
|
17
|
+
private parentElementSelection;
|
|
18
|
+
private wrapper;
|
|
19
|
+
constructor(
|
|
20
|
+
cssClass: string,
|
|
21
|
+
parentElement: HTMLElement,
|
|
22
|
+
blockId: number,
|
|
23
|
+
filterEventManager: FilterEventManager,
|
|
24
|
+
transitions?: Transitions
|
|
25
|
+
);
|
|
26
|
+
renderWrapper(blockSize: Size): void;
|
|
27
|
+
destroy(): void;
|
|
28
|
+
getSvg(): Selection<SVGElement, unknown, HTMLElement, any>;
|
|
29
|
+
getWrapper(): Selection<BaseType, unknown, HTMLElement, any>;
|
|
30
|
+
removeMouseEvents(): void;
|
|
31
|
+
clearWrapper(): void;
|
|
26
32
|
}
|
|
@@ -7,55 +7,55 @@ import { BlockHelper } from "./blockHelper";
|
|
|
7
7
|
import { BlockSvg } from "./blockSvg";
|
|
8
8
|
import { BlockHtml } from "./blockHtml";
|
|
9
9
|
export class Block {
|
|
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
|
-
|
|
10
|
+
constructor(cssClass, parentElement, blockId, filterEventManager, transitions = null) {
|
|
11
|
+
this.svg = new BlockSvg({
|
|
12
|
+
svgCssClasses: cssClass,
|
|
13
|
+
parentBlockId: blockId
|
|
14
|
+
});
|
|
15
|
+
this.html = new BlockHtml({ blockCssClass: cssClass });
|
|
16
|
+
this.wrapperCssClasses = Helper.getCssClassesArray(cssClass);
|
|
17
|
+
this.wrapperCssClasses = BlockHelper.getFormattedCssClassesForWrapper(this.wrapperCssClasses);
|
|
18
|
+
this.parentElement = parentElement;
|
|
19
|
+
this.parentElementSelection = select(parentElement);
|
|
20
|
+
this.transitionManager = new TransitionManager(this, transitions);
|
|
21
|
+
this.filterEventManager = filterEventManager;
|
|
22
|
+
}
|
|
23
|
+
renderWrapper(blockSize) {
|
|
24
|
+
this.wrapper = this.parentElementSelection
|
|
25
|
+
.append("div")
|
|
26
|
+
.attr("class", this.wrapperCssClasses.join(" "))
|
|
27
|
+
.style("width", blockSize.width + "px")
|
|
28
|
+
.style("height", blockSize.height + "px")
|
|
29
|
+
.style("position", "relative");
|
|
30
|
+
this.svg.initParent(this.wrapper);
|
|
31
|
+
this.html.initParent(this.wrapper);
|
|
32
|
+
}
|
|
33
|
+
destroy() {
|
|
34
|
+
this.transitionManager.interruptTransitions();
|
|
35
|
+
this.removeMouseEvents();
|
|
36
|
+
this.getWrapper().remove();
|
|
37
|
+
}
|
|
38
|
+
getSvg() {
|
|
39
|
+
//TODO: move this method in blockSvg
|
|
40
|
+
return this.svg.getBlock();
|
|
41
|
+
}
|
|
42
|
+
getWrapper() {
|
|
43
|
+
return this.wrapper;
|
|
44
|
+
}
|
|
45
|
+
removeMouseEvents() {
|
|
46
|
+
//TODO: move this method in blockSvg
|
|
47
|
+
const tipBoxes = this.getSvg().selectAll(`.${TipBox.tipBoxClass}`);
|
|
48
|
+
tipBoxes.on("mousemove", null);
|
|
49
|
+
tipBoxes.on("mouseover", null);
|
|
50
|
+
tipBoxes.on("mouseleave", null);
|
|
51
|
+
tipBoxes.on("click", null);
|
|
52
|
+
const arcItems = Donut.getAllArcGroups(this);
|
|
53
|
+
arcItems.on("mouseover", null);
|
|
54
|
+
arcItems.on("mouseleave", null);
|
|
55
|
+
arcItems.on("mousemove", null);
|
|
56
|
+
arcItems.on("click", null);
|
|
57
|
+
}
|
|
58
|
+
clearWrapper() {
|
|
59
|
+
this.getWrapper().selectAll("*").remove();
|
|
60
|
+
}
|
|
61
61
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BlockMargin } from "../../model/model";
|
|
2
2
|
import { Size } from "../../config/config";
|
|
3
3
|
export interface ClipPathAttributes {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
8
|
}
|
|
9
9
|
export declare class BlockHelper {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
static getClipPathAttributes(blockSize: Size, margin: BlockMargin): ClipPathAttributes;
|
|
11
|
+
static getFormattedCssClassesForWrapper(cssClasses: string[]): string[];
|
|
12
12
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Helper } from "../helpers/helper";
|
|
2
2
|
export class BlockHelper {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
static getClipPathAttributes(blockSize, margin) {
|
|
4
|
+
const outSize = 9;
|
|
5
|
+
return {
|
|
6
|
+
x: margin.left - outSize,
|
|
7
|
+
y: margin.top - outSize,
|
|
8
|
+
width: Helper.getValueOrZero(blockSize.width - margin.left - margin.right) + outSize * 2,
|
|
9
|
+
height: Helper.getValueOrZero(blockSize.height - margin.top - margin.bottom) + outSize * 2
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
static getFormattedCssClassesForWrapper(cssClasses) {
|
|
13
|
+
const wrapperClasses = [];
|
|
14
|
+
cssClasses.forEach((cssClass) => {
|
|
15
|
+
wrapperClasses.push(cssClass + "-wrapper");
|
|
16
|
+
});
|
|
17
|
+
return wrapperClasses;
|
|
18
|
+
}
|
|
19
19
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Selection } from "d3-selection";
|
|
2
2
|
interface BlockHtmlOptions {
|
|
3
|
-
|
|
3
|
+
blockCssClass: string;
|
|
4
4
|
}
|
|
5
5
|
export declare class BlockHtml {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
private parent;
|
|
7
|
+
private block;
|
|
8
|
+
private blockCssClass;
|
|
9
|
+
constructor(options: BlockHtmlOptions);
|
|
10
|
+
initParent(parent: Selection<HTMLDivElement, unknown, HTMLElement, any>): void;
|
|
11
|
+
render(): void;
|
|
12
|
+
getBlock(): Selection<HTMLDivElement, unknown, HTMLElement, any>;
|
|
13
13
|
}
|
|
14
14
|
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { NamesHelper } from "../helpers/namesHelper";
|
|
2
2
|
export class BlockHtml {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
constructor(options) {
|
|
4
|
+
this.blockCssClass = options.blockCssClass;
|
|
5
|
+
}
|
|
6
|
+
initParent(parent) {
|
|
7
|
+
this.parent = parent;
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
this.block = this.parent
|
|
11
|
+
.append("div")
|
|
12
|
+
.attr("class", NamesHelper.getClassName("html-chart"))
|
|
13
|
+
.classed(this.blockCssClass, true);
|
|
14
|
+
}
|
|
15
|
+
getBlock() {
|
|
16
|
+
return this.block;
|
|
17
|
+
}
|
|
18
18
|
}
|
|
@@ -2,27 +2,27 @@ import { Selection, BaseType } from "d3-selection";
|
|
|
2
2
|
import { Size } from "../../config/config";
|
|
3
3
|
import { BlockMargin } from "../../model/model";
|
|
4
4
|
interface BlockSvgOptions {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
parentBlockId: number;
|
|
6
|
+
svgCssClasses: string;
|
|
7
7
|
}
|
|
8
8
|
export declare class BlockSvg {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
private parentBlockId;
|
|
10
|
+
private parent;
|
|
11
|
+
private svgCssClasses;
|
|
12
|
+
private hatchPatternDef;
|
|
13
|
+
private readonly chartBlockClass;
|
|
14
|
+
private readonly chartGroupClass;
|
|
15
|
+
constructor(options: BlockSvgOptions);
|
|
16
|
+
initParent(parent: Selection<BaseType, unknown, HTMLElement, any>): void;
|
|
17
|
+
render(blockSize: Size): void;
|
|
18
|
+
getBlock(): Selection<SVGElement, unknown, HTMLElement, any>;
|
|
19
|
+
renderChartsBlock(): void;
|
|
20
|
+
getChartBlock(): Selection<SVGGElement, unknown, HTMLElement, any>;
|
|
21
|
+
getChartGroup(chartIndex: number): Selection<SVGGElement, any, BaseType, any>;
|
|
22
|
+
getClipPathId(): string;
|
|
23
|
+
renderChartClipPath(margin: BlockMargin, blockSize: Size): void;
|
|
24
|
+
updateChartClipPath(margin: BlockMargin, blockSize: Size): void;
|
|
25
|
+
renderBarHatchPattern(): void;
|
|
26
|
+
ensureDefsRendered(): Selection<SVGDefsElement, unknown, HTMLElement, unknown>;
|
|
27
27
|
}
|
|
28
28
|
export {};
|
|
@@ -2,70 +2,69 @@ import { NamesHelper } from "../helpers/namesHelper";
|
|
|
2
2
|
import { BlockHelper } from "./blockHelper";
|
|
3
3
|
import { HatchPatternDef } from "./defs/hatchPattern";
|
|
4
4
|
export class BlockSvg {
|
|
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
|
-
}
|
|
5
|
+
constructor(options) {
|
|
6
|
+
this.hatchPatternDef = new HatchPatternDef();
|
|
7
|
+
this.chartBlockClass = "chart-block";
|
|
8
|
+
this.chartGroupClass = "chart-group";
|
|
9
|
+
this.svgCssClasses = options.svgCssClasses;
|
|
10
|
+
this.parentBlockId = options.parentBlockId;
|
|
11
|
+
}
|
|
12
|
+
initParent(parent) {
|
|
13
|
+
this.parent = parent;
|
|
14
|
+
}
|
|
15
|
+
render(blockSize) {
|
|
16
|
+
this.parent
|
|
17
|
+
.append("svg")
|
|
18
|
+
.attr("width", blockSize.width)
|
|
19
|
+
.attr("height", blockSize.height)
|
|
20
|
+
.attr("class", this.svgCssClasses + " " + NamesHelper.getClassName("svg-chart"));
|
|
21
|
+
}
|
|
22
|
+
getBlock() {
|
|
23
|
+
return this.parent.select(`svg.${NamesHelper.getClassName("svg-chart")}`);
|
|
24
|
+
}
|
|
25
|
+
renderChartsBlock() {
|
|
26
|
+
this.getBlock().append("g").attr("class", this.chartBlockClass);
|
|
27
|
+
}
|
|
28
|
+
getChartBlock() {
|
|
29
|
+
return this.getBlock().select(`.${this.chartBlockClass}`);
|
|
30
|
+
}
|
|
31
|
+
getChartGroup(chartIndex) {
|
|
32
|
+
let group = this.getChartBlock().select(`.${this.chartGroupClass}-${chartIndex}`);
|
|
33
|
+
if (group.empty()) {
|
|
34
|
+
group = this.getChartBlock().append("g").attr("class", `${this.chartGroupClass}-${chartIndex}`);
|
|
35
|
+
}
|
|
36
|
+
return group;
|
|
37
|
+
}
|
|
38
|
+
getClipPathId() {
|
|
39
|
+
return NamesHelper.getId("clip-path", this.parentBlockId);
|
|
40
|
+
}
|
|
41
|
+
renderChartClipPath(margin, blockSize) {
|
|
42
|
+
const attributes = BlockHelper.getClipPathAttributes(blockSize, margin);
|
|
43
|
+
this.ensureDefsRendered()
|
|
44
|
+
.append("clipPath")
|
|
45
|
+
.attr("id", this.getClipPathId())
|
|
46
|
+
.append("rect")
|
|
47
|
+
.attr("x", attributes.x)
|
|
48
|
+
.attr("y", attributes.y)
|
|
49
|
+
.attr("width", attributes.width)
|
|
50
|
+
.attr("height", attributes.height);
|
|
51
|
+
}
|
|
52
|
+
updateChartClipPath(margin, blockSize) {
|
|
53
|
+
const attributes = BlockHelper.getClipPathAttributes(blockSize, margin);
|
|
54
|
+
this.ensureDefsRendered()
|
|
55
|
+
.select("clipPath")
|
|
56
|
+
.select("rect")
|
|
57
|
+
.attr("x", attributes.x)
|
|
58
|
+
.attr("y", attributes.y)
|
|
59
|
+
.attr("width", attributes.width)
|
|
60
|
+
.attr("height", attributes.height);
|
|
61
|
+
}
|
|
62
|
+
renderBarHatchPattern() {
|
|
63
|
+
this.hatchPatternDef.appendToDefsBlock(this.ensureDefsRendered());
|
|
64
|
+
}
|
|
65
|
+
ensureDefsRendered() {
|
|
66
|
+
let defs = this.getBlock().select("defs");
|
|
67
|
+
if (defs.empty()) defs = this.getBlock().append("defs");
|
|
68
|
+
return defs;
|
|
69
|
+
}
|
|
71
70
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Selection } from "d3-selection";
|
|
2
2
|
import { GradientDef } from "../../../model/model";
|
|
3
3
|
export declare class LinearGradientDef {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
render(defs: Selection<SVGDefsElement, unknown, HTMLElement, any>, gradients: GradientDef[]): void;
|
|
5
|
+
updateColors(defs: Selection<SVGDefsElement, unknown, HTMLElement, any>, gradients: GradientDef[]): void;
|
|
6
6
|
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
export class LinearGradientDef {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
2
|
+
render(defs, gradients) {
|
|
3
|
+
gradients.forEach((gradient) => {
|
|
4
|
+
const linearGradient = defs
|
|
5
|
+
.append("linearGradient")
|
|
6
|
+
.attr("id", gradient.id)
|
|
7
|
+
.attr("x1", gradient.position.x1)
|
|
8
|
+
.attr("y1", gradient.position.y1)
|
|
9
|
+
.attr("x2", gradient.position.x2)
|
|
10
|
+
.attr("y2", gradient.position.y2);
|
|
11
|
+
gradient.items.forEach((item) => {
|
|
12
|
+
linearGradient
|
|
13
|
+
.append("stop")
|
|
14
|
+
.attr("id", item.id)
|
|
15
|
+
.attr("offset", item.offset)
|
|
16
|
+
.attr("stop-opacity", item.opacity)
|
|
17
|
+
.attr("stop-color", item.color);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
updateColors(defs, gradients) {
|
|
22
|
+
gradients.forEach((gradient) => {
|
|
23
|
+
const linearGradient = defs.select(`#${gradient.id}`);
|
|
24
|
+
gradient.items.forEach((item) => {
|
|
25
|
+
linearGradient.select(`#${item.id}`).attr("stop-color", item.color);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
29
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Selection } from "d3-selection";
|
|
2
2
|
export declare class HatchPatternDef {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
static getMaskValue(): string;
|
|
4
|
+
private static readonly hatchMaskUrl;
|
|
5
|
+
private readonly hatchPattern;
|
|
6
|
+
appendToDefsBlock(defsSelection: Selection<SVGDefsElement, unknown, HTMLElement, unknown>): void;
|
|
7
7
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export class HatchPatternDef {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
constructor() {
|
|
3
|
+
this.hatchPattern = `
|
|
4
4
|
<pattern id="hatch-pattern" width="4" height="4" patternUnits="userSpaceOnUse"patternTransform="rotate(45)">
|
|
5
5
|
<rect width="2" height="4" transform="translate(0,0)" fill="white"></rect>
|
|
6
6
|
</pattern>
|
|
7
7
|
<mask id="${HatchPatternDef.hatchMaskUrl}">
|
|
8
8
|
<rect x="0" y="0" width="100%" height="100%" fill="url(#hatch-pattern)" />
|
|
9
9
|
</mask>`;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
}
|
|
11
|
+
static getMaskValue() {
|
|
12
|
+
return `url(#${this.hatchMaskUrl})`;
|
|
13
|
+
}
|
|
14
|
+
appendToDefsBlock(defsSelection) {
|
|
15
|
+
defsSelection.append("g").html(this.hatchPattern);
|
|
16
|
+
}
|
|
17
17
|
}
|
|
18
18
|
HatchPatternDef.hatchMaskUrl = "hatch-mask";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { MdtChartsDataRow } from "../../config/config";
|
|
2
2
|
import { PolarChartModel } from "../../model/model";
|
|
3
3
|
export declare class ColorReaderClass {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
getColorForArc(row: MdtChartsDataRow, chart: PolarChartModel, arcIndex: number): any;
|
|
5
|
+
getChartColorField(chart: PolarChartModel): string;
|
|
6
|
+
isNeedReadFromData(chart: PolarChartModel): boolean;
|
|
7
|
+
private getColorFromData;
|
|
8
|
+
private getColorFromPalette;
|
|
9
9
|
}
|
|
10
10
|
export declare const ColorReader: ColorReaderClass;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export class ColorReaderClass {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
getColorForArc(row, chart, arcIndex) {
|
|
3
|
+
if (chart.data.colorField) {
|
|
4
|
+
return this.getColorFromData(row, chart.data.colorField);
|
|
5
|
+
}
|
|
6
|
+
return this.getColorFromPalette(chart.style.elementColors, arcIndex);
|
|
7
|
+
}
|
|
8
|
+
getChartColorField(chart) {
|
|
9
|
+
return chart.data.colorField;
|
|
10
|
+
}
|
|
11
|
+
isNeedReadFromData(chart) {
|
|
12
|
+
return !!this.getChartColorField(chart);
|
|
13
|
+
}
|
|
14
|
+
getColorFromData(row, colorField) {
|
|
15
|
+
return row[colorField];
|
|
16
|
+
}
|
|
17
|
+
getColorFromPalette(colorPalette, arcIndex) {
|
|
18
|
+
return colorPalette[arcIndex % colorPalette.length];
|
|
19
|
+
}
|
|
20
20
|
}
|
|
21
21
|
export const ColorReader = new ColorReaderClass();
|
|
@@ -3,10 +3,10 @@ import { Engine } from "../engine";
|
|
|
3
3
|
import { Block } from "../block/block";
|
|
4
4
|
import { MdtChartsDataSource } from "../../config/config";
|
|
5
5
|
export declare class ContentManager {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
private manager;
|
|
7
|
+
constructor(model: Model);
|
|
8
|
+
render(model: Model, engine: Engine): void;
|
|
9
|
+
updateData(block: Block, model: Model, newData: MdtChartsDataSource): void;
|
|
10
|
+
updateColors(engine: Engine, model: Model): void;
|
|
11
|
+
clearSelection(engine: Engine, model: Model): void;
|
|
12
12
|
}
|