mdt-charts 1.30.0 → 1.30.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/jest.config.js +4 -0
- package/lib/engine/elementHighlighter/elementHighlighter.js +8 -8
- package/lib/engine/elementHighlighter/selectHighlighter.js +10 -10
- package/lib/engine/features/axis/axisLabelDomHelper.js +4 -4
- package/lib/engine/features/embeddedLabels/embeddedLabels.js +2 -2
- package/lib/engine/features/embeddedLabels/embeddedLabelsDomHelper.js +2 -2
- package/lib/engine/features/legend/legend.d.ts +1 -1
- package/lib/engine/features/legend/legend.js +1 -1
- package/lib/engine/features/legend/legendDomHelper.js +2 -4
- package/lib/engine/features/legend/legendHelper.js +2 -1
- package/lib/engine/features/markDots/markDot.js +4 -4
- package/lib/engine/features/title/title.js +2 -2
- package/lib/engine/features/tolltip/tooltip.js +6 -5
- package/lib/engine/features/tolltip/tooltipDomHelper.js +5 -4
- package/lib/engine/features/valueLabels/valueLabels.js +4 -3
- package/lib/engine/helpers/{domHelper.d.ts → domSelectionHelper.d.ts} +1 -2
- package/lib/engine/helpers/{domHelper.js → domSelectionHelper.js} +1 -4
- package/lib/engine/polarNotation/donut/donut.js +6 -5
- package/lib/engine/polarNotation/donut/{DonutHelper.d.ts → donutHelper.d.ts} +1 -4
- package/lib/engine/polarNotation/donut/{DonutHelper.js → donutHelper.js} +0 -22
- package/lib/engine/twoDimensionalNotation/area/area.js +8 -8
- package/lib/engine/twoDimensionalNotation/bar/bar.js +15 -15
- package/lib/engine/twoDimensionalNotation/dot/dotChart.js +5 -5
- package/lib/engine/twoDimensionalNotation/line/line.js +5 -5
- package/lib/engine/twoDimensionalNotation/lineLike/generatorMiddleware/lineLikeGeneratorCurveMiddleware.d.ts +1 -1
- package/lib/model/domUtils/cssUtils.d.ts +1 -0
- package/lib/model/domUtils/cssUtils.js +3 -0
- package/lib/model/featuresModel/axisModel.js +2 -3
- package/lib/model/featuresModel/legendModel/legendModel.d.ts +1 -1
- package/lib/model/featuresModel/recordOverflowModel/recordOverflowModel.d.ts +6 -2
- package/lib/model/featuresModel/recordOverflowModel/recordOverflowModel.js +2 -5
- package/lib/model/helpers/modelHelper.js +2 -2
- package/lib/model/modelInstance/titleConfigReader.js +2 -1
- package/lib/model/notations/polar/donut/donutThicknessService.d.ts +7 -1
- package/lib/model/notations/polar/donut/donutThicknessService.js +24 -0
- package/lib/model/notations/polar/polarModel.js +1 -1
- package/lib/model/notations/twoDimensional/styles.js +2 -1
- package/lib/model/notations/twoDimensionalModel.js +1 -1
- package/package.json +17 -17
package/jest.config.js
ADDED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { select } from "d3-selection";
|
|
2
2
|
import { easeLinear } from "d3-ease";
|
|
3
3
|
import { interrupt } from "d3-transition";
|
|
4
|
-
import {
|
|
4
|
+
import { DomSelectionHelper, SelectionCondition } from "../helpers/domSelectionHelper";
|
|
5
5
|
import { Donut } from "../polarNotation/donut/donut";
|
|
6
6
|
import { MarkDot } from "../features/markDots/markDot";
|
|
7
7
|
import { Helper } from "../helpers/helper";
|
|
@@ -66,18 +66,18 @@ export class ElementHighlighter {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
static removeDonutHighlightingByKeys(arcSegments, keyFieldName, keyValues, margin, blockSize, donutThickness) {
|
|
69
|
-
const segments =
|
|
69
|
+
const segments = DomSelectionHelper.getChartElementsByKeys(arcSegments, true, keyFieldName, keyValues, SelectionCondition.Exclude);
|
|
70
70
|
this.toggleDonutHighlightState(segments, margin, blockSize, donutThickness, 0, false);
|
|
71
71
|
}
|
|
72
72
|
static setInactiveFor2D(block, keyFieldName, charts) {
|
|
73
73
|
charts.forEach((chart) => {
|
|
74
|
-
const elems =
|
|
74
|
+
const elems = DomSelectionHelper.get2DChartElements(block, chart);
|
|
75
75
|
if (block.filterEventManager.getSelectedKeys().length === 0) {
|
|
76
76
|
this.toggleActivityStyle(elems, true);
|
|
77
77
|
}
|
|
78
78
|
else {
|
|
79
|
-
const unselectedElems =
|
|
80
|
-
const selectedElems =
|
|
79
|
+
const unselectedElems = DomSelectionHelper.getChartElementsByKeys(elems, chart.isSegmented, keyFieldName, block.filterEventManager.getSelectedKeys(), SelectionCondition.Exclude);
|
|
80
|
+
const selectedElems = DomSelectionHelper.getChartElementsByKeys(elems, chart.isSegmented, keyFieldName, block.filterEventManager.getSelectedKeys());
|
|
81
81
|
this.toggleActivityStyle(unselectedElems, false);
|
|
82
82
|
this.toggleActivityStyle(selectedElems, true);
|
|
83
83
|
}
|
|
@@ -85,7 +85,7 @@ export class ElementHighlighter {
|
|
|
85
85
|
}
|
|
86
86
|
static remove2DChartsFullHighlighting(block, charts, transitionDuration = 0) {
|
|
87
87
|
charts.forEach((chart) => {
|
|
88
|
-
const elems =
|
|
88
|
+
const elems = DomSelectionHelper.get2DChartElements(block, chart);
|
|
89
89
|
if (chart.type !== "bar")
|
|
90
90
|
MarkDot.tryMakeMarkDotVisible(elems, chart.markersOptions, false);
|
|
91
91
|
this.toggle2DElements(elems, false, chart, transitionDuration);
|
|
@@ -94,8 +94,8 @@ export class ElementHighlighter {
|
|
|
94
94
|
}
|
|
95
95
|
static removeUnselected2DHighlight(block, keyFieldName, charts, transitionDuration) {
|
|
96
96
|
charts.forEach((chart) => {
|
|
97
|
-
const elems =
|
|
98
|
-
const selectedElems =
|
|
97
|
+
const elems = DomSelectionHelper.get2DChartElements(block, chart);
|
|
98
|
+
const selectedElems = DomSelectionHelper.getChartElementsByKeys(elems, chart.isSegmented, keyFieldName, block.filterEventManager.getSelectedKeys(), SelectionCondition.Exclude);
|
|
99
99
|
if (chart.type !== "bar")
|
|
100
100
|
MarkDot.tryMakeMarkDotVisible(selectedElems, chart.markersOptions, false);
|
|
101
101
|
this.toggle2DElements(selectedElems, false, chart, transitionDuration);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { select } from "d3-selection";
|
|
2
2
|
import { Legend } from "../features/legend/legend";
|
|
3
|
-
import {
|
|
3
|
+
import { DomSelectionHelper, SelectionCondition } from "../helpers/domSelectionHelper";
|
|
4
4
|
import { Donut } from "../polarNotation/donut/donut";
|
|
5
|
-
import { DonutHelper } from "../polarNotation/donut/DonutHelper";
|
|
6
5
|
import { ElementHighlighter } from "./elementHighlighter";
|
|
7
6
|
import { MarkDot } from "../../engine/features/markDots/markDot";
|
|
7
|
+
import { DonutThicknessCalculator } from "../../model/notations/polar/donut/donutThicknessService";
|
|
8
8
|
export class SelectHighlighter {
|
|
9
9
|
static click2DHandler(multySelection, appendKey, keyValue, selectedKeys, block, options) {
|
|
10
10
|
options.charts.forEach((chart) => {
|
|
11
|
-
const selectedElements =
|
|
12
|
-
const elements =
|
|
11
|
+
const selectedElements = DomSelectionHelper.getChartElementsByKeys(DomSelectionHelper.get2DChartElements(block, chart), chart.isSegmented, options.data.keyField.name, [keyValue]);
|
|
12
|
+
const elements = DomSelectionHelper.get2DChartElements(block, chart);
|
|
13
13
|
if (!appendKey) {
|
|
14
14
|
ElementHighlighter.toggle2DElements(selectedElements, false, chart, block.transitionManager.durations.markerHover);
|
|
15
15
|
if (chart.type !== "bar")
|
|
@@ -27,10 +27,10 @@ export class SelectHighlighter {
|
|
|
27
27
|
if (multySelection) {
|
|
28
28
|
ElementHighlighter.toggle2DElements(selectedElements, true, chart, block.transitionManager.durations.markerHover);
|
|
29
29
|
ElementHighlighter.toggleActivityStyle(selectedElements, true);
|
|
30
|
-
ElementHighlighter.toggleActivityStyle(
|
|
30
|
+
ElementHighlighter.toggleActivityStyle(DomSelectionHelper.getChartElementsByKeys(elements, chart.isSegmented, options.data.keyField.name, selectedKeys, SelectionCondition.Exclude), false);
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
|
-
ElementHighlighter.toggle2DElements(
|
|
33
|
+
ElementHighlighter.toggle2DElements(DomSelectionHelper.getChartElementsByKeys(elements, chart.isSegmented, options.data.keyField.name, selectedKeys, SelectionCondition.Exclude), false, chart, block.transitionManager.durations.markerHover);
|
|
34
34
|
ElementHighlighter.toggleActivityStyle(elements, false);
|
|
35
35
|
if (chart.type !== "bar")
|
|
36
36
|
MarkDot.tryMakeMarkDotVisible(elements, chart.markersOptions, false);
|
|
@@ -42,7 +42,7 @@ export class SelectHighlighter {
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
static clickPolarHandler(multySelection, appendKey, selectedSegment, selectedKeys, margin, blockSize, block, options, arcItems, donutSettings) {
|
|
45
|
-
const donutThickness =
|
|
45
|
+
const donutThickness = DonutThicknessCalculator.getThickness(donutSettings, blockSize, margin);
|
|
46
46
|
if (!appendKey) {
|
|
47
47
|
ElementHighlighter.toggleDonutHighlightState(selectedSegment, margin, blockSize, donutThickness, block.transitionManager.durations.higlightedScale, false);
|
|
48
48
|
ElementHighlighter.removeCloneForElem(block, options.data.keyField.name, selectedSegment);
|
|
@@ -62,7 +62,7 @@ export class SelectHighlighter {
|
|
|
62
62
|
ElementHighlighter.removeShadowClone(block, options.data.keyField.name, selectedSegment, margin, blockSize, donutThickness);
|
|
63
63
|
ElementHighlighter.renderArcCloneAndHighlight(block, margin, selectedSegment, blockSize, donutThickness);
|
|
64
64
|
ElementHighlighter.toggleActivityStyle(selectedSegment, true);
|
|
65
|
-
ElementHighlighter.toggleActivityStyle(
|
|
65
|
+
ElementHighlighter.toggleActivityStyle(DomSelectionHelper.getChartElementsByKeys(Donut.getAllArcGroups(block), true, options.data.keyField.name, selectedKeys, SelectionCondition.Exclude), false);
|
|
66
66
|
}
|
|
67
67
|
else {
|
|
68
68
|
ElementHighlighter.removeDonutHighlightingByKeys(arcItems, options.data.keyField.name, selectedKeys, margin, blockSize, donutThickness);
|
|
@@ -76,7 +76,7 @@ export class SelectHighlighter {
|
|
|
76
76
|
}
|
|
77
77
|
static clear2D(block, options) {
|
|
78
78
|
options.charts.forEach((chart) => {
|
|
79
|
-
const elements =
|
|
79
|
+
const elements = DomSelectionHelper.get2DChartElements(block, chart);
|
|
80
80
|
ElementHighlighter.toggle2DElements(elements, false, chart, block.transitionManager.durations.markerHover);
|
|
81
81
|
ElementHighlighter.toggleActivityStyle(elements, true);
|
|
82
82
|
if (chart.type !== "bar")
|
|
@@ -84,7 +84,7 @@ export class SelectHighlighter {
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
static clearPolar(margin, blockSize, block, options, arcItems, donutSettings) {
|
|
87
|
-
const donutThickness =
|
|
87
|
+
const donutThickness = DonutThicknessCalculator.getThickness(donutSettings, blockSize, margin);
|
|
88
88
|
ElementHighlighter.toggleDonutHighlightState(arcItems, margin, blockSize, donutThickness, block.transitionManager.durations.higlightedScale, false);
|
|
89
89
|
arcItems.each(function () {
|
|
90
90
|
ElementHighlighter.removeCloneForElem(block, options.data.keyField.name, select(this));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { select } from "d3-selection";
|
|
2
|
-
import {
|
|
2
|
+
import { DomSelectionHelper } from "../../helpers/domSelectionHelper";
|
|
3
3
|
import { Helper } from "../../helpers/helper";
|
|
4
4
|
import { AXIS_HORIZONTAL_LABEL_PADDING, AXIS_VERTICAL_LABEL_PADDING } from "../../../model/margin/twoDim/twoDimMarginModel";
|
|
5
5
|
export class AxisLabelHelper {
|
|
@@ -42,7 +42,7 @@ export class AxisLabelHelper {
|
|
|
42
42
|
maxLabelSize = axisOptions.labels.maxSize;
|
|
43
43
|
else
|
|
44
44
|
maxLabelSize = ((_c = (_b = (_a = scale).step) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : Infinity) - 4;
|
|
45
|
-
|
|
45
|
+
DomSelectionHelper.cropSvgLabels(axisTextBlocks, maxLabelSize);
|
|
46
46
|
if (axisOptions.labels.position === "straight" &&
|
|
47
47
|
(axisOptions.orient === "top" || axisOptions.orient === "bottom")) {
|
|
48
48
|
this.cropAndAlignExtremeLabels(block, maxLabelSize, axisOptions, blockSize);
|
|
@@ -84,7 +84,7 @@ export class AxisLabelHelper {
|
|
|
84
84
|
lastLabel.attr("text-anchor", "start");
|
|
85
85
|
lastLabel.attr("transform", `translate(${this.getTranslateNumber(maxLabelSize, lastLabel, marginRight)}, 0)`);
|
|
86
86
|
if (crop)
|
|
87
|
-
|
|
87
|
+
DomSelectionHelper.cropSvgLabels(lastLabel, maxLabelSize / 2 + marginRight);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
static cropAndAlignExtremeLabels(block, maxLabelSize, axisOptions, blockSize) {
|
|
@@ -100,7 +100,7 @@ export class AxisLabelHelper {
|
|
|
100
100
|
if (axisOptions.translate.translateX - firstLabel.node().getBBox().width / 2 < 0) {
|
|
101
101
|
firstLabel.attr("text-anchor", "start");
|
|
102
102
|
firstLabel.attr("transform", `translate(${-axisOptions.translate.translateX}, 0)`);
|
|
103
|
-
|
|
103
|
+
DomSelectionHelper.cropSvgLabels(firstLabel, maxLabelSize / 2 + axisElementTranslate);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
static getTranslateNumber(maxLabelSize, lastLabel, marginRight) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { select } from "d3-selection";
|
|
2
|
-
import {
|
|
2
|
+
import { DomSelectionHelper } from "../../helpers/domSelectionHelper";
|
|
3
3
|
import { Helper } from "../../helpers/helper";
|
|
4
4
|
import { ValueFormatter } from "../../valueFormatter";
|
|
5
5
|
import { EmbeddedLabelsDomHelper } from "./embeddedLabelsDomHelper";
|
|
@@ -7,7 +7,7 @@ import { EmbeddedLabelsHelper } from "./embeddedLabelsHelper";
|
|
|
7
7
|
export class EmbeddedLabels {
|
|
8
8
|
static render(block, bars, barAttrsHelper, field, type, keyAxisOrient, blockSize, margin, index, cssClasses) {
|
|
9
9
|
const labelsGroup = this.renderGroup(block, Helper.getCssClassesWithElementIndex(cssClasses, index));
|
|
10
|
-
|
|
10
|
+
DomSelectionHelper.setCssClasses(labelsGroup, Helper.getCssClassesWithElementIndex(cssClasses, index));
|
|
11
11
|
bars.each((dataRow) => {
|
|
12
12
|
this.renderLabel(labelsGroup, barAttrsHelper, dataRow, field, type, keyAxisOrient, blockSize, margin);
|
|
13
13
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmbeddedLabelsHelper } from "./embeddedLabelsHelper";
|
|
2
|
-
import {
|
|
2
|
+
import { DomSelectionHelper } from "../../helpers/domSelectionHelper";
|
|
3
3
|
export class EmbeddedLabelsDomHelper {
|
|
4
4
|
static setLabelBlockAttrs(attrs, labelBlock, transitionDuration = 0) {
|
|
5
5
|
return new Promise((resolve) => {
|
|
@@ -22,6 +22,6 @@ export class EmbeddedLabelsDomHelper {
|
|
|
22
22
|
labelTextSpace = blockSize.width - margin.left - margin.right;
|
|
23
23
|
else
|
|
24
24
|
labelTextSpace = EmbeddedLabelsHelper.getSpaceSizeForType(position, barAttrs.width, margin, blockSize);
|
|
25
|
-
|
|
25
|
+
DomSelectionHelper.cropSvgLabels(labelBlock, labelTextSpace);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -2,7 +2,7 @@ import { BaseType, Selection } from "d3-selection";
|
|
|
2
2
|
import { MdtChartsDataSource } from "../../../config/config";
|
|
3
3
|
import { LegendBlockModel, Model, PolarOptionsModel, TwoDimensionalOptionsModel } from "../../../model/model";
|
|
4
4
|
import { Block } from "../../block/block";
|
|
5
|
-
import { SelectionCondition } from "../../helpers/
|
|
5
|
+
import { SelectionCondition } from "../../helpers/domSelectionHelper";
|
|
6
6
|
import { ChartLegendEngineModel } from "./legendHelper";
|
|
7
7
|
export interface LegendContentRenderingOptions {
|
|
8
8
|
wrapperClasses: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { select } from "d3-selection";
|
|
2
2
|
import { ColorReader } from "../../colorReader/colorReader";
|
|
3
|
-
import { SelectionCondition } from "../../helpers/
|
|
3
|
+
import { SelectionCondition } from "../../helpers/domSelectionHelper";
|
|
4
4
|
import { LegendDomHelper } from "./legendDomHelper";
|
|
5
5
|
import { LegendEventsManager } from "./legendEventsManager";
|
|
6
6
|
import { LegendHelper } from "./legendHelper";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DomHelper } from "../../helpers/domHelper";
|
|
2
1
|
import { Helper } from "../../helpers/helper";
|
|
3
2
|
import { Legend } from "./legend";
|
|
4
3
|
import { LegendHelper } from "./legendHelper";
|
|
5
4
|
import { getNewLegendItemWidths } from "./legendWidthCalculator";
|
|
5
|
+
import { getCssPropertyValue } from "../../../model/domUtils/cssUtils";
|
|
6
6
|
export class LegendDomHelper {
|
|
7
7
|
static setItemsTitles(items) {
|
|
8
8
|
items.attr("title", (d) => d.textContent);
|
|
@@ -59,9 +59,7 @@ export class LegendDomHelper {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
static getItemsRightMargins(items) {
|
|
62
|
-
return items
|
|
63
|
-
.nodes()
|
|
64
|
-
.map((node) => Helper.getPXValueFromString(DomHelper.getCssPropertyValue(node, "margin-right")));
|
|
62
|
+
return items.nodes().map((node) => Helper.getPXValueFromString(getCssPropertyValue(node, "margin-right")));
|
|
65
63
|
}
|
|
66
64
|
static getItemsWidth(items) {
|
|
67
65
|
return items.nodes().map((node) => node.getBoundingClientRect().width);
|
|
@@ -71,10 +71,11 @@ export class LegendHelper {
|
|
|
71
71
|
static getContentRenderingOptions(chartNotation, legendPosition, legendBlockModel) {
|
|
72
72
|
const itemsDirection = this.service.getLegendItemsDirection(legendPosition);
|
|
73
73
|
const legendLabelClass = this.getLegendClassByChartNotation(chartNotation);
|
|
74
|
+
const centeredCssClass = "legend-block-centered";
|
|
74
75
|
return {
|
|
75
76
|
wrapperClasses: [
|
|
76
77
|
Legend.legendBlockClass,
|
|
77
|
-
chartNotation === "2d" ? "
|
|
78
|
+
chartNotation === "2d" ? centeredCssClass : itemsDirection === "column" ? centeredCssClass : "",
|
|
78
79
|
this.service.getWrapperClassByItemsDirection(itemsDirection),
|
|
79
80
|
this.service.getWrapperClassByWrappingItems(legendPosition, chartNotation)
|
|
80
81
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { select } from "d3-selection";
|
|
2
2
|
import { transition } from "d3-transition";
|
|
3
|
-
import {
|
|
3
|
+
import { DomSelectionHelper } from "../../helpers/domSelectionHelper";
|
|
4
4
|
import { Helper } from "../../helpers/helper";
|
|
5
5
|
import { NamesHelper } from "../../helpers/namesHelper";
|
|
6
6
|
import { MarkDotHelper } from "./markDotsHelper";
|
|
@@ -45,7 +45,7 @@ export class MarkDot {
|
|
|
45
45
|
const dots = block.svg
|
|
46
46
|
.getChartGroup(chart.index)
|
|
47
47
|
.selectAll(`.${this.markerDotClass}${Helper.getCssClassesLine(chart.cssClasses)}.chart-element-${valueFieldIndex}`);
|
|
48
|
-
|
|
48
|
+
DomSelectionHelper.setChartElementColor(dots, chart.style.elementColors, valueFieldIndex, "stroke");
|
|
49
49
|
}
|
|
50
50
|
static getMarkDotForChart(block, chartCssClasses) {
|
|
51
51
|
return block.getSvg().selectAll(`.${MarkDot.markerDotClass}${Helper.getCssClassesLine(chartCssClasses)}`);
|
|
@@ -64,8 +64,8 @@ export class MarkDot {
|
|
|
64
64
|
markDots.classed(MarkDot.hiddenDotClass, !isHighlight);
|
|
65
65
|
}
|
|
66
66
|
static setClassesAndStyle(dots, cssClasses, vfIndex, elementColors) {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
DomSelectionHelper.setCssClasses(dots, Helper.getCssClassesWithElementIndex(cssClasses, vfIndex));
|
|
68
|
+
DomSelectionHelper.setChartElementColor(dots, elementColors, vfIndex, "stroke");
|
|
69
69
|
}
|
|
70
70
|
static setAttrs(block, dots, attrs, styles) {
|
|
71
71
|
dots.attr("class", this.markerDotClass)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DomSelectionHelper } from "../../helpers/domSelectionHelper";
|
|
2
2
|
export class Title {
|
|
3
3
|
static render(block, title, titleBlockModel, blockSize) {
|
|
4
4
|
if (!title.textContent)
|
|
@@ -18,7 +18,7 @@ export class Title {
|
|
|
18
18
|
.attr("dominant-baseline", attributes.dominantBaseline)
|
|
19
19
|
.text(title.textContent)
|
|
20
20
|
.style("font-size", `${title.fontSize}px`);
|
|
21
|
-
|
|
21
|
+
DomSelectionHelper.cropSvgLabels(titleBlock, attributes.maxWidth);
|
|
22
22
|
}
|
|
23
23
|
static getTitleAttributes(blockSize, titleBlockModel) {
|
|
24
24
|
const coordinate = {
|
|
@@ -8,9 +8,10 @@ import { TipBox } from "../tipBox/tipBox";
|
|
|
8
8
|
import { TipBoxHelper } from "../tipBox/tipBoxHelper";
|
|
9
9
|
import { Helper } from "../../helpers/helper";
|
|
10
10
|
import { TooltipHelper } from "./tooltipHelper";
|
|
11
|
-
import {
|
|
11
|
+
import { DomSelectionHelper } from "../../helpers/domSelectionHelper";
|
|
12
12
|
import { NewTooltip } from "./newTooltip/newTooltip";
|
|
13
13
|
import { MarkDot } from "../../../engine/features/markDots/markDot";
|
|
14
|
+
import { DonutThicknessCalculator } from "../../../model/notations/polar/donut/donutThicknessService";
|
|
14
15
|
export class Tooltip {
|
|
15
16
|
static render(block, model, data, tooltipOptions, scales) {
|
|
16
17
|
TooltipComponentsManager.renderTooltipWrapper(block);
|
|
@@ -20,7 +21,7 @@ export class Tooltip {
|
|
|
20
21
|
this.renderTooltipFor2DCharts(block, data, model.blockCanvas.size, model.chartBlock.margin, scales, model.options, tooltipOptions);
|
|
21
22
|
}
|
|
22
23
|
else if (model.options.type === "polar") {
|
|
23
|
-
this.renderTooltipForPolar(block, model.options, data, model.blockCanvas.size, model.chartBlock.margin,
|
|
24
|
+
this.renderTooltipForPolar(block, model.options, data, model.blockCanvas.size, model.chartBlock.margin, DonutThicknessCalculator.getThickness(model.options.chartCanvas, model.blockCanvas.size, model.chartBlock.margin), model.otherComponents.tooltipBlock);
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
}
|
|
@@ -78,9 +79,9 @@ export class Tooltip {
|
|
|
78
79
|
TooltipComponentsManager.showComponent(tooltipLine);
|
|
79
80
|
if (args.type === "2d") {
|
|
80
81
|
args.charts.forEach((chart) => {
|
|
81
|
-
const elements =
|
|
82
|
+
const elements = DomSelectionHelper.get2DChartElements(block, chart);
|
|
82
83
|
if (!block.filterEventManager.isSelected(currentKey)) {
|
|
83
|
-
const oldElements =
|
|
84
|
+
const oldElements = DomSelectionHelper.getChartElementsByKeys(elements, chart.isSegmented, args.dataOptions.keyField.name, [currentKey]);
|
|
84
85
|
if (chart.type !== "bar")
|
|
85
86
|
MarkDot.tryMakeMarkDotVisible(oldElements, chart.markersOptions, false);
|
|
86
87
|
ElementHighlighter.toggle2DElements(oldElements, false, chart, block.transitionManager.durations.markerHover);
|
|
@@ -88,7 +89,7 @@ export class Tooltip {
|
|
|
88
89
|
ElementHighlighter.toggleActivityStyle(oldElements, false);
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
|
-
const selectedElements =
|
|
92
|
+
const selectedElements = DomSelectionHelper.getChartElementsByKeys(elements, chart.isSegmented, args.dataOptions.keyField.name, [keyValue]);
|
|
92
93
|
if (chart.type !== "bar")
|
|
93
94
|
MarkDot.tryMakeMarkDotVisible(selectedElements, chart.markersOptions, true);
|
|
94
95
|
ElementHighlighter.toggleActivityStyle(selectedElements, true);
|
|
@@ -58,10 +58,11 @@ export class TooltipDomHelper {
|
|
|
58
58
|
}
|
|
59
59
|
static getTooltipItemHtml(row, valueField, tooltipOptions) {
|
|
60
60
|
const formattedValueByDefault = ValueFormatter.formatField(valueField.format, row[valueField.name]);
|
|
61
|
-
const formattedValue = (tooltipOptions === null || tooltipOptions === void 0 ? void 0 : tooltipOptions.formatValue)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
const formattedValue = (tooltipOptions === null || tooltipOptions === void 0 ? void 0 : tooltipOptions.formatValue)
|
|
62
|
+
? tooltipOptions.formatValue({
|
|
63
|
+
rawValue: row[valueField.name],
|
|
64
|
+
autoFormattedValue: formattedValueByDefault
|
|
65
|
+
})
|
|
65
66
|
: formattedValueByDefault;
|
|
66
67
|
const text = this.getTooltipContentItemHtml(valueField.title, formattedValue);
|
|
67
68
|
return text;
|
|
@@ -2,7 +2,7 @@ import { NamesHelper } from "../../../engine/helpers/namesHelper";
|
|
|
2
2
|
import { ValueLabelsAttrsProvider } from "../../../engine/features/valueLabels/valueLabelsHelper";
|
|
3
3
|
import { Helper } from "../../../engine/helpers/helper";
|
|
4
4
|
import { select } from "d3-selection";
|
|
5
|
-
import {
|
|
5
|
+
import { DomSelectionHelper } from "../../helpers/domSelectionHelper";
|
|
6
6
|
import { CLASSES } from "../../../model/modelBuilder";
|
|
7
7
|
import { ValueLabelsCollision } from "../../../engine/features/valueLabelsCollision/valueLabelsCollision";
|
|
8
8
|
import { Pipeline } from "../../helpers/pipeline/Pipeline";
|
|
@@ -100,7 +100,8 @@ export class ChartValueLabels {
|
|
|
100
100
|
.attr("y", (d) => attrs.y(d))
|
|
101
101
|
.attr("transform", (d) => {
|
|
102
102
|
var _a;
|
|
103
|
-
return ((_a = this.chart.valueLabels.rotation) === null || _a === void 0 ? void 0 : _a.angle)
|
|
103
|
+
return ((_a = this.chart.valueLabels.rotation) === null || _a === void 0 ? void 0 : _a.angle)
|
|
104
|
+
? `rotate(${this.chart.valueLabels.rotation.angle}, ${attrs.x(d)}, ${attrs.y(d)})`
|
|
104
105
|
: null;
|
|
105
106
|
});
|
|
106
107
|
const handleElements = () => {
|
|
@@ -126,7 +127,7 @@ export class ChartValueLabels {
|
|
|
126
127
|
setClasses(textLabels, cssClasses, vfIndex) {
|
|
127
128
|
textLabels.classed(ChartValueLabels.valueLabelClass, true);
|
|
128
129
|
textLabels.classed(CLASSES.dataLabel, true);
|
|
129
|
-
|
|
130
|
+
DomSelectionHelper.setCssClasses(textLabels, Helper.getCssClassesWithElementIndex(cssClasses, vfIndex));
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
ChartValueLabels.valueLabelClass = NamesHelper.getClassName("value-label");
|
|
@@ -7,10 +7,9 @@ export declare enum SelectionCondition {
|
|
|
7
7
|
Include = 0,
|
|
8
8
|
Exclude = 1
|
|
9
9
|
}
|
|
10
|
-
export declare class
|
|
10
|
+
export declare class DomSelectionHelper {
|
|
11
11
|
static setCssClasses(elem: Selection<BaseType, unknown, any, unknown>, cssClasses: string[]): void;
|
|
12
12
|
static get2DChartElements(block: Block, chart: TwoDimensionalChartModel): Selection<BaseType, MdtChartsDataRow, BaseType, unknown>;
|
|
13
|
-
static getCssPropertyValue(node: Element, propertyName: string): string;
|
|
14
13
|
static getSelectionNumericAttr(selection: Selection<BaseType, unknown, BaseType, unknown>, attrName: string): number;
|
|
15
14
|
static setChartStyle(elements: Selection<BaseType, unknown, BaseType, unknown>, chartStyle: ChartStyle, fieldIndex: number, styleType: StyleColorType): void;
|
|
16
15
|
static setChartElementColor(elements: Selection<BaseType, unknown, BaseType, unknown>, colorPalette: string[], fieldIndex: number, styleType: StyleColorType): void;
|
|
@@ -5,7 +5,7 @@ export var SelectionCondition;
|
|
|
5
5
|
SelectionCondition[SelectionCondition["Include"] = 0] = "Include";
|
|
6
6
|
SelectionCondition[SelectionCondition["Exclude"] = 1] = "Exclude";
|
|
7
7
|
})(SelectionCondition || (SelectionCondition = {}));
|
|
8
|
-
export class
|
|
8
|
+
export class DomSelectionHelper {
|
|
9
9
|
static setCssClasses(elem, cssClasses) {
|
|
10
10
|
cssClasses.forEach((cssClass) => {
|
|
11
11
|
elem.classed(cssClass, true);
|
|
@@ -17,9 +17,6 @@ export class DomHelper {
|
|
|
17
17
|
else
|
|
18
18
|
return Bar.get().getAllBarsForChart(block, chart.cssClasses);
|
|
19
19
|
}
|
|
20
|
-
static getCssPropertyValue(node, propertyName) {
|
|
21
|
-
return window.getComputedStyle(node).getPropertyValue(propertyName);
|
|
22
|
-
}
|
|
23
20
|
static getSelectionNumericAttr(selection, attrName) {
|
|
24
21
|
return parseFloat(selection.attr(attrName));
|
|
25
22
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { interpolate } from "d3-interpolate";
|
|
2
2
|
import { Aggregator } from "../../features/aggregator/aggregator";
|
|
3
|
-
import { DonutHelper } from "./
|
|
4
|
-
import {
|
|
3
|
+
import { DonutHelper } from "./donutHelper";
|
|
4
|
+
import { DomSelectionHelper } from "../../helpers/domSelectionHelper";
|
|
5
5
|
import { ColorReader } from "../../colorReader/colorReader";
|
|
6
|
+
import { DonutThicknessCalculator } from "../../../model/notations/polar/donut/donutThicknessService";
|
|
6
7
|
export class Donut {
|
|
7
8
|
static render(block, data, margin, chart, blockSize, settings) {
|
|
8
9
|
const outerRadius = DonutHelper.getOuterRadius(margin, blockSize);
|
|
9
|
-
const thickness =
|
|
10
|
+
const thickness = DonutThicknessCalculator.getThickness(settings, blockSize, margin);
|
|
10
11
|
const innerRadius = DonutHelper.getInnerRadius(outerRadius, thickness);
|
|
11
12
|
const arcGenerator = DonutHelper.getArcGenerator(outerRadius, innerRadius);
|
|
12
13
|
const pieGenerator = DonutHelper.getPieGenerator(chart.data.valueField.name, settings.padAngle);
|
|
@@ -24,7 +25,7 @@ export class Donut {
|
|
|
24
25
|
}
|
|
25
26
|
static update(block, data, margin, chart, blockSize, donutSettings, keyField) {
|
|
26
27
|
const outerRadius = DonutHelper.getOuterRadius(margin, blockSize);
|
|
27
|
-
const thickness =
|
|
28
|
+
const thickness = DonutThicknessCalculator.getThickness(donutSettings, blockSize, margin);
|
|
28
29
|
const innerRadius = DonutHelper.getInnerRadius(outerRadius, thickness);
|
|
29
30
|
const arcGenerator = DonutHelper.getArcGenerator(outerRadius, innerRadius);
|
|
30
31
|
const pieGenerator = DonutHelper.getPieGenerator(chart.data.valueField.name, donutSettings.padAngle);
|
|
@@ -85,7 +86,7 @@ export class Donut {
|
|
|
85
86
|
.each(function (d) {
|
|
86
87
|
this._currentData = d;
|
|
87
88
|
}); // _currentData используется для получения текущих данных внутри функции обновления.
|
|
88
|
-
|
|
89
|
+
DomSelectionHelper.setCssClasses(arcs, chart.cssClasses);
|
|
89
90
|
this.setElementsColor(items, chart);
|
|
90
91
|
}
|
|
91
92
|
static setElementsColor(arcItems, chart) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { PieArcDatum, Arc, Pie } from "d3-shape";
|
|
2
2
|
import { MdtChartsDataRow, Size, MdtChartsColorField } from "../../../config/config";
|
|
3
|
-
import { BlockMargin
|
|
3
|
+
import { BlockMargin } from "../../../model/model";
|
|
4
4
|
import { Translate } from "./donut";
|
|
5
5
|
export declare class DonutHelper {
|
|
6
|
-
static getThickness(donutSettings: DonutChartSettings, blockSize: Size, margin: BlockMargin): number;
|
|
7
6
|
static getArcCentroid(blockSize: Size, margin: BlockMargin, dataItem: PieArcDatum<MdtChartsDataRow>, donutThickness: number): [number, number];
|
|
8
7
|
static getArcGeneratorObject(blockSize: Size, margin: BlockMargin, donutThickness: number): Arc<any, PieArcDatum<MdtChartsDataRow>>;
|
|
9
8
|
static getOuterRadius(margin: BlockMargin, blockSize: Size): number;
|
|
@@ -12,6 +11,4 @@ export declare class DonutHelper {
|
|
|
12
11
|
static getArcGenerator(outerRadius: number, innerRadius: number): Arc<any, PieArcDatum<MdtChartsDataRow>>;
|
|
13
12
|
static getPieGenerator(valueField: string, padAngle: number): Pie<any, MdtChartsDataRow>;
|
|
14
13
|
static mergeDataWithZeros(firstDataset: MdtChartsDataRow[], secondDataset: MdtChartsDataRow[], keyField: string, colorField: MdtChartsColorField): MdtChartsDataRow[];
|
|
15
|
-
private static getThicknessByUnit;
|
|
16
|
-
private static getChartBlockSize;
|
|
17
14
|
}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { merge } from "d3-array";
|
|
2
2
|
import { arc, pie } from "d3-shape";
|
|
3
|
-
const MIN_CHART_BLOCK_SIZE_FOR_MAX_THICKNESS = 400;
|
|
4
3
|
export class DonutHelper {
|
|
5
|
-
static getThickness(donutSettings, blockSize, margin) {
|
|
6
|
-
const thicknessOpts = donutSettings.thickness;
|
|
7
|
-
const chartBlockSize = this.getChartBlockSize(blockSize, margin);
|
|
8
|
-
if (thicknessOpts.value)
|
|
9
|
-
return this.getThicknessByUnit(chartBlockSize, thicknessOpts.value, thicknessOpts.unit);
|
|
10
|
-
if (Math.min(chartBlockSize.width, chartBlockSize.height) > MIN_CHART_BLOCK_SIZE_FOR_MAX_THICKNESS)
|
|
11
|
-
return this.getThicknessByUnit(chartBlockSize, thicknessOpts.max, thicknessOpts.unit);
|
|
12
|
-
return this.getThicknessByUnit(chartBlockSize, thicknessOpts.min, thicknessOpts.unit);
|
|
13
|
-
}
|
|
14
4
|
static getArcCentroid(blockSize, margin, dataItem, donutThickness) {
|
|
15
5
|
const arc = this.getArcGeneratorObject(blockSize, margin, donutThickness);
|
|
16
6
|
return arc.centroid(dataItem);
|
|
@@ -60,16 +50,4 @@ export class DonutHelper {
|
|
|
60
50
|
const sortedMerge = merge([secondDataset, onlyNew]);
|
|
61
51
|
return sortedMerge;
|
|
62
52
|
}
|
|
63
|
-
static getThicknessByUnit(chartBlockSize, valueInPx, unit) {
|
|
64
|
-
if (unit === "px")
|
|
65
|
-
return valueInPx;
|
|
66
|
-
const minSideSize = Math.min(chartBlockSize.width, chartBlockSize.height);
|
|
67
|
-
return (minSideSize / 2) * (valueInPx / 100);
|
|
68
|
-
}
|
|
69
|
-
static getChartBlockSize(blockSize, margin) {
|
|
70
|
-
return {
|
|
71
|
-
height: blockSize.height - margin.top - margin.bottom,
|
|
72
|
-
width: blockSize.width - margin.left - margin.right
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
53
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { select } from "d3-selection";
|
|
2
2
|
import { MarkDot } from "../../features/markDots/markDot";
|
|
3
3
|
import { AreaGeneratorFactory } from "./areaHelper";
|
|
4
|
-
import {
|
|
4
|
+
import { DomSelectionHelper } from "../../helpers/domSelectionHelper";
|
|
5
5
|
import { Helper } from "../../helpers/helper";
|
|
6
6
|
import { getStackedDataWithOwn } from "../bar/stackedData/dataStacker";
|
|
7
7
|
import { getStackedData, LineGeneratorFactory } from "../../../engine/twoDimensionalNotation/line/lineHelper";
|
|
@@ -37,7 +37,7 @@ export class Area {
|
|
|
37
37
|
this.setChartFillStyle(chart, areaPath, valueIndex);
|
|
38
38
|
if (chart.areaViewOptions.borderLine.on) {
|
|
39
39
|
const borderLinePath = chartGroup.select(`.${Area.areaBorderLineClass}${Helper.getCssClassesLine(chart.cssClasses)}.chart-element-${valueIndex}`);
|
|
40
|
-
|
|
40
|
+
DomSelectionHelper.setChartElementColor(borderLinePath, chart.style.elementColors, valueIndex, "stroke");
|
|
41
41
|
}
|
|
42
42
|
MarkDot.updateColors(block, chart, valueIndex);
|
|
43
43
|
});
|
|
@@ -122,7 +122,7 @@ export class Area {
|
|
|
122
122
|
path.style("fill", `url(#${chart.areaViewOptions.fill.ids[valueIndex]})`);
|
|
123
123
|
}
|
|
124
124
|
else
|
|
125
|
-
|
|
125
|
+
DomSelectionHelper.setChartStyle(path, chart.style, valueIndex, "fill");
|
|
126
126
|
}
|
|
127
127
|
createAreaGeneratorFactory(chart, scales, margin, keyAxisOrient, keyField) {
|
|
128
128
|
return new AreaGeneratorFactory({
|
|
@@ -153,7 +153,7 @@ export class Area {
|
|
|
153
153
|
.attr("class", Area.areaChartClass)
|
|
154
154
|
.style("clip-path", `url(#${block.svg.getClipPathId()})`)
|
|
155
155
|
.style("pointer-events", "none");
|
|
156
|
-
|
|
156
|
+
DomSelectionHelper.setCssClasses(path, Helper.getCssClassesWithElementIndex(chart.cssClasses, valueIndex));
|
|
157
157
|
this.setChartFillStyle(chart, path, valueIndex);
|
|
158
158
|
}
|
|
159
159
|
renderBorderLine(lineGeneratorFactory, block, chart, data, field, valueIndex) {
|
|
@@ -166,8 +166,8 @@ export class Area {
|
|
|
166
166
|
.style("fill", "none")
|
|
167
167
|
.style("clip-path", `url(#${block.svg.getClipPathId()})`)
|
|
168
168
|
.style("pointer-events", "none");
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
DomSelectionHelper.setCssClasses(linePath, Helper.getCssClassesWithElementIndex(chart.cssClasses, valueIndex));
|
|
170
|
+
DomSelectionHelper.setChartStyle(linePath, chart.areaViewOptions.borderLine.colorStyle, valueIndex, "stroke");
|
|
171
171
|
}
|
|
172
172
|
renderAreaSegmented(areaGeneratorFactory, block, scales, data, keyField, margin, keyAxisOrient, chart) {
|
|
173
173
|
const stackedData = getStackedDataWithOwn(data, chart.data.valueFields.map((field) => field.name));
|
|
@@ -185,7 +185,7 @@ export class Area {
|
|
|
185
185
|
const thisClass = this;
|
|
186
186
|
areas.each(function (_, i) {
|
|
187
187
|
thisClass.setChartFillStyle(chart, select(this), i);
|
|
188
|
-
|
|
188
|
+
DomSelectionHelper.setCssClasses(select(this), Helper.getCssClassesWithElementIndex(chart.cssClasses, i));
|
|
189
189
|
});
|
|
190
190
|
stackedData.forEach((dataset, index) => {
|
|
191
191
|
MarkDot.render(block, dataset, keyAxisOrient, scales, margin, keyField.name, index, "1", chart);
|
|
@@ -200,7 +200,7 @@ export class Area {
|
|
|
200
200
|
let lines = lineBuilder.renderSegmented(stackedData, Area.areaBorderLineClass);
|
|
201
201
|
lineBuilder.setSegmentColor(lines, chart.style.elementColors);
|
|
202
202
|
lines.each(function (_, i) {
|
|
203
|
-
|
|
203
|
+
DomSelectionHelper.setCssClasses(select(this), Helper.getCssClassesWithElementIndex(chart.cssClasses, i));
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
206
|
updateAreaSegmented(block, scales, newData, keyField, margin, chart, keyAxisOrient) {
|
|
@@ -3,7 +3,7 @@ import { EmbeddedLabels } from "../../features/embeddedLabels/embeddedLabels";
|
|
|
3
3
|
import { EmbeddedLabelsHelper } from "../../features/embeddedLabels/embeddedLabelsHelper";
|
|
4
4
|
import { BarHelper, onBarChartInit } from "./barHelper";
|
|
5
5
|
import { sum } from "d3-array";
|
|
6
|
-
import {
|
|
6
|
+
import { DomSelectionHelper } from "../../helpers/domSelectionHelper";
|
|
7
7
|
import { Helper } from "../../helpers/helper";
|
|
8
8
|
import { getStackedDataWithOwn } from "./stackedData/dataStacker";
|
|
9
9
|
import { Pipeline } from "../../helpers/pipeline/Pipeline";
|
|
@@ -39,7 +39,7 @@ export class Bar {
|
|
|
39
39
|
const bars = block.svg
|
|
40
40
|
.getChartGroup(chart.index)
|
|
41
41
|
.selectAll(`.${this.barItemClass}${Helper.getCssClassesLine(chart.cssClasses)}${Helper.getCssClassesLine(Helper.getCssClassesWithElementIndex(chart.cssClasses, index))}`);
|
|
42
|
-
|
|
42
|
+
DomSelectionHelper.setChartStyle(bars, chart.style, index, "fill");
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
getAllBarsForChart(block, chartCssClasses) {
|
|
@@ -58,8 +58,8 @@ export class Bar {
|
|
|
58
58
|
bars = this.createBarPipeline.execute(bars, chart);
|
|
59
59
|
const barAttrs = BarHelper.getGroupedBarAttrs(keyAxisOrient, scales, margin, keyField.name, field.name, chart.barViewOptions.barIndexes[index], sum(barsAmounts), barSettings);
|
|
60
60
|
this.fillBarAttrs(bars, barAttrs);
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
DomSelectionHelper.setCssClasses(bars, Helper.getCssClassesWithElementIndex(chart.cssClasses, index));
|
|
62
|
+
DomSelectionHelper.setChartStyle(bars, chart.style, index, "fill");
|
|
63
63
|
this.setInitialAttrsInfo(bars, keyAxisOrient, barSettings);
|
|
64
64
|
if (chart.embeddedLabels !== "none")
|
|
65
65
|
EmbeddedLabels.render(block, bars, barAttrs, EmbeddedLabelsHelper.getLabelField(chart.embeddedLabels, chart.data.valueFields, keyField, index), chart.embeddedLabels, keyAxisOrient, blockSize, margin, index, chart.cssClasses);
|
|
@@ -84,12 +84,12 @@ export class Bar {
|
|
|
84
84
|
const barAttrs = BarHelper.getStackedBarAttr(keyAxisOrient, scales, margin, keyField.name, chart.barViewOptions.barIndexes[0], sum(barsAmounts), barSettings);
|
|
85
85
|
this.fillBarAttrs(bars, barAttrs);
|
|
86
86
|
this.setInitialAttrsInfo(bars, keyAxisOrient, barSettings);
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
DomSelectionHelper.setCssClasses(groups, chart.cssClasses);
|
|
88
|
+
DomSelectionHelper.setCssClasses(bars, chart.cssClasses); // Для обозначения принадлежности бара к конкретному чарту
|
|
89
89
|
const thisClass = this;
|
|
90
90
|
groups.each(function (d, i) {
|
|
91
91
|
const barsInGroup = select(this).selectAll(`rect${Helper.getCssClassesLine(chart.cssClasses)}`);
|
|
92
|
-
|
|
92
|
+
DomSelectionHelper.setCssClasses(barsInGroup, Helper.getCssClassesWithElementIndex(chart.cssClasses, i)); // Для обозначения принадлежности бара к конкретной части стака
|
|
93
93
|
thisClass.createSegmentGroupBarsPipeline.execute(barsInGroup, { segmentIndex: i, chart });
|
|
94
94
|
thisClass.setSegmentColor(select(this).selectAll(Helper.getCssClassesLine(chart.cssClasses)), chart.style.elementColors, i);
|
|
95
95
|
});
|
|
@@ -132,8 +132,8 @@ export class Bar {
|
|
|
132
132
|
this.fillBarAttrs(newBars, barAttrs);
|
|
133
133
|
promises.push(prom);
|
|
134
134
|
this.setInitialAttrsInfo(newBars, keyAxisOrient, barSettings);
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
DomSelectionHelper.setCssClasses(newBars, Helper.getCssClassesWithElementIndex(chart.cssClasses, index));
|
|
136
|
+
DomSelectionHelper.setChartStyle(newBars, chart.style, index, "fill");
|
|
137
137
|
if (chart.embeddedLabels !== "none") {
|
|
138
138
|
EmbeddedLabels.removeUnused(block, chart.cssClasses, index, indexesOfRemoved);
|
|
139
139
|
EmbeddedLabels.update(block, bars, keyAxisOrient, barAttrs, margin, valueField, chart.embeddedLabels, blockSize, newData, index, chart.cssClasses);
|
|
@@ -176,11 +176,11 @@ export class Bar {
|
|
|
176
176
|
});
|
|
177
177
|
this.fillBarAttrs(newBars, barAttrs);
|
|
178
178
|
this.setInitialAttrsInfo(newBars, keyAxisOrient, barSettings);
|
|
179
|
-
|
|
179
|
+
DomSelectionHelper.setCssClasses(newBars, chart.cssClasses);
|
|
180
180
|
const thisClass = this;
|
|
181
181
|
groups.each(function (d, i) {
|
|
182
182
|
const barsInGroup = select(this).selectAll(`rect${Helper.getCssClassesLine(chart.cssClasses)}`);
|
|
183
|
-
|
|
183
|
+
DomSelectionHelper.setCssClasses(barsInGroup, Helper.getCssClassesWithElementIndex(chart.cssClasses, i)); // Для обозначения принадлежности бара к конкретной части стака
|
|
184
184
|
thisClass.createSegmentGroupBarsPipeline.execute(barsInGroup, { segmentIndex: i, chart });
|
|
185
185
|
thisClass.setSegmentColor(select(this).selectAll(Helper.getCssClassesLine(chart.cssClasses)), chart.style.elementColors, i);
|
|
186
186
|
});
|
|
@@ -217,14 +217,14 @@ export class Bar {
|
|
|
217
217
|
*/
|
|
218
218
|
setInitialAttrsInfo(bars, keyAxisOrient, barSettings) {
|
|
219
219
|
bars.each(function () {
|
|
220
|
-
const width =
|
|
221
|
-
const height =
|
|
220
|
+
const width = DomSelectionHelper.getSelectionNumericAttr(select(this), "width");
|
|
221
|
+
const height = DomSelectionHelper.getSelectionNumericAttr(select(this), "height");
|
|
222
222
|
const orient = keyAxisOrient === "left" || keyAxisOrient === "right" ? "horizontal" : "vertical";
|
|
223
223
|
let scaleSize = 0.06 * (orient === "vertical" ? width : height);
|
|
224
224
|
scaleSize = scaleSize > barSettings.barDistance / 2 ? barSettings.barDistance / 2 : scaleSize;
|
|
225
225
|
this.attrs = {
|
|
226
|
-
x:
|
|
227
|
-
y:
|
|
226
|
+
x: DomSelectionHelper.getSelectionNumericAttr(select(this), "x"),
|
|
227
|
+
y: DomSelectionHelper.getSelectionNumericAttr(select(this), "y"),
|
|
228
228
|
width,
|
|
229
229
|
height,
|
|
230
230
|
orient,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Scale } from "../../features/scale/scale";
|
|
2
|
-
import {
|
|
2
|
+
import { DomSelectionHelper } from "../../helpers/domSelectionHelper";
|
|
3
3
|
import { Helper } from "../../helpers/helper";
|
|
4
4
|
import { NamesHelper } from "../../helpers/namesHelper";
|
|
5
5
|
import { BarHelper, DotChartSettingsStore } from "../bar/barHelper";
|
|
@@ -31,8 +31,8 @@ export class CanvasDotChart {
|
|
|
31
31
|
.attr("y1", (d) => attrs.y1(d))
|
|
32
32
|
.attr("x2", (d) => attrs.x2(d))
|
|
33
33
|
.attr("y2", (d) => attrs.y2(d));
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
DomSelectionHelper.setCssClasses(elements, Helper.getCssClassesWithElementIndex(chart.cssClasses, valueFieldIndex));
|
|
35
|
+
DomSelectionHelper.setChartStyle(elements, chart.style, valueFieldIndex, "stroke");
|
|
36
36
|
this.renderedChart = chart;
|
|
37
37
|
}
|
|
38
38
|
update(scales, newRecords, margin) {
|
|
@@ -56,8 +56,8 @@ export class CanvasDotChart {
|
|
|
56
56
|
.attr("y1", (d) => attrs.y1(d))
|
|
57
57
|
.attr("x2", (d) => attrs.x2(d))
|
|
58
58
|
.attr("y2", (d) => attrs.y2(d));
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
DomSelectionHelper.setCssClasses(newElements, Helper.getCssClassesWithElementIndex(this.renderedChart.cssClasses, valueFieldIndex));
|
|
60
|
+
DomSelectionHelper.setChartStyle(newElements, this.renderedChart.style, valueFieldIndex, "stroke");
|
|
61
61
|
return [
|
|
62
62
|
new Promise((resolve) => {
|
|
63
63
|
elements
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { select } from "d3-selection";
|
|
2
2
|
import { MarkDot } from "../../features/markDots/markDot";
|
|
3
3
|
import { getStackedData, LineGeneratorFactory, onLineChartInit } from "./lineHelper";
|
|
4
|
-
import {
|
|
4
|
+
import { DomSelectionHelper } from "../../helpers/domSelectionHelper";
|
|
5
5
|
import { Helper } from "../../helpers/helper";
|
|
6
6
|
import { Pipeline } from "../../helpers/pipeline/Pipeline";
|
|
7
7
|
import { LineBuilder } from "../../../engine/twoDimensionalNotation/line/lineBuilder";
|
|
@@ -36,7 +36,7 @@ export class Line {
|
|
|
36
36
|
const path = block.svg
|
|
37
37
|
.getChartGroup(chart.index)
|
|
38
38
|
.select(`.${this.lineChartClass}${Helper.getCssClassesLine(chart.cssClasses)}.chart-element-${valueIndex}`);
|
|
39
|
-
|
|
39
|
+
DomSelectionHelper.setChartStyle(path, chart.style, valueIndex, "stroke");
|
|
40
40
|
MarkDot.updateColors(block, chart, valueIndex);
|
|
41
41
|
});
|
|
42
42
|
}
|
|
@@ -60,8 +60,8 @@ export class Line {
|
|
|
60
60
|
.style("clip-path", `url(#${block.svg.getClipPathId()})`)
|
|
61
61
|
.style("pointer-events", "none");
|
|
62
62
|
path = this.creatingPipeline.execute(path, chart);
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
DomSelectionHelper.setCssClasses(path, Helper.getCssClassesWithElementIndex(chart.cssClasses, valueIndex));
|
|
64
|
+
DomSelectionHelper.setChartStyle(path, chart.style, valueIndex, "stroke");
|
|
65
65
|
MarkDot.render(block, data, keyAxisOrient, scales, margin, keyField.name, valueIndex, valueField.name, chart);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
@@ -76,7 +76,7 @@ export class Line {
|
|
|
76
76
|
lines = this.creatingPipeline.execute(lines, chart);
|
|
77
77
|
lineBuilder.setSegmentColor(lines, chart.style.elementColors);
|
|
78
78
|
lines.each(function (_, i) {
|
|
79
|
-
|
|
79
|
+
DomSelectionHelper.setCssClasses(select(this), Helper.getCssClassesWithElementIndex(chart.cssClasses, i));
|
|
80
80
|
});
|
|
81
81
|
stackedData.forEach((dataset, stackIndex) => {
|
|
82
82
|
MarkDot.render(block, dataset, keyAxisOrient, scales, margin, keyField.name, stackIndex, "1", chart);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Area, Line } from "d3-shape";
|
|
2
2
|
import { LineCurveType } from "../../../../model/model";
|
|
3
3
|
import { LineLikeGeneratorMiddleware } from "./lineLikeGeneratorMiddleware";
|
|
4
|
-
import { MdtChartsDataRow } from "../../../../
|
|
4
|
+
import { MdtChartsDataRow } from "../../../../config/config";
|
|
5
5
|
interface LineLikeGeneratorCurveMiddlewareOptions {
|
|
6
6
|
curve?: LineCurveType;
|
|
7
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getCssPropertyValue(node: Element, propertyName: string): string;
|
|
@@ -3,7 +3,6 @@ import { AxisType } from "../modelBuilder";
|
|
|
3
3
|
import { DataManagerModel } from "../dataManagerModel/dataManagerModel";
|
|
4
4
|
import { TwoDimensionalModel } from "../notations/twoDimensionalModel";
|
|
5
5
|
import { AxisModelService, AxisModelTickCalculator, showAllTicks } from "./axisModelService";
|
|
6
|
-
import { max, min } from "d3-array";
|
|
7
6
|
export const MINIMAL_VERTICAL_STEP_SIZE = 60;
|
|
8
7
|
export const MINIMAL_HORIZONTAL_STEP_SIZE = 100;
|
|
9
8
|
export const LABEL_ELEMENT_HEIGHT_PX = 17;
|
|
@@ -149,8 +148,8 @@ export class AxisModel {
|
|
|
149
148
|
tickAmountPolicy = { type: "amount", amount: Math.floor(axisLength / linearTickStep) };
|
|
150
149
|
}
|
|
151
150
|
else {
|
|
152
|
-
const roundedMaxValue = this.getRoundValue(max(scaleInfo.domain));
|
|
153
|
-
tickAmountPolicy = { type: "constant", values: [min(scaleInfo.domain), roundedMaxValue] };
|
|
151
|
+
const roundedMaxValue = this.getRoundValue(Math.max(...scaleInfo.domain));
|
|
152
|
+
tickAmountPolicy = { type: "constant", values: [Math.min(...scaleInfo.domain), roundedMaxValue] };
|
|
154
153
|
}
|
|
155
154
|
return tickAmountPolicy;
|
|
156
155
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LegendBlockCanvas } from "../../../
|
|
1
|
+
import { LegendBlockCanvas } from "../../../designer/designerConfig";
|
|
2
2
|
import { LegendBlockModel, Orient } from "../../model";
|
|
3
3
|
import { CanvasModel } from "../../modelInstance/canvasModel/canvasModel";
|
|
4
4
|
import { LegendItemsDirection } from "./legendCanvasModel";
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { RecordOverflowAlertOptions, RecordOverflowVariationTextContent } from "../../../config/config";
|
|
2
|
-
import { RecordOverflowAlertModel } from "../../model";
|
|
2
|
+
import { RecordOverflowAlertModel, RecordOverflowAlertPositionAttrs } from "../../model";
|
|
3
3
|
export declare function getTextVariationByNumber(hidedRecordsAmount: number, textVariation: RecordOverflowVariationTextContent): string;
|
|
4
|
-
|
|
4
|
+
interface RecordOverflowBlockCanvasOptions {
|
|
5
|
+
positionAttrs: RecordOverflowAlertPositionAttrs;
|
|
6
|
+
}
|
|
7
|
+
export declare function createRecordOverflowModel(hiddenRecordsAmount: number, defaultTextVariation: RecordOverflowVariationTextContent, canvasOptions: RecordOverflowBlockCanvasOptions, options?: RecordOverflowAlertOptions): RecordOverflowAlertModel;
|
|
8
|
+
export {};
|
|
@@ -8,7 +8,7 @@ export function getTextVariationByNumber(hidedRecordsAmount, textVariation) {
|
|
|
8
8
|
return textVariation.twoToFour;
|
|
9
9
|
return textVariation.other;
|
|
10
10
|
}
|
|
11
|
-
export function createRecordOverflowModel(hiddenRecordsAmount, defaultTextVariation, options) {
|
|
11
|
+
export function createRecordOverflowModel(hiddenRecordsAmount, defaultTextVariation, canvasOptions, options) {
|
|
12
12
|
var _a;
|
|
13
13
|
let textContent;
|
|
14
14
|
if ((_a = options === null || options === void 0 ? void 0 : options.textContent) === null || _a === void 0 ? void 0 : _a.create) {
|
|
@@ -24,10 +24,7 @@ export function createRecordOverflowModel(hiddenRecordsAmount, defaultTextVariat
|
|
|
24
24
|
? { show: false }
|
|
25
25
|
: {
|
|
26
26
|
show: true,
|
|
27
|
-
positionAttrs:
|
|
28
|
-
bottom: "0",
|
|
29
|
-
right: "0"
|
|
30
|
-
},
|
|
27
|
+
positionAttrs: canvasOptions.positionAttrs,
|
|
31
28
|
textContent
|
|
32
29
|
};
|
|
33
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getCssPropertyValue } from "../domUtils/cssUtils";
|
|
2
2
|
export class ModelHelper {
|
|
3
3
|
static getBaseFontSize(propertyName) {
|
|
4
4
|
if (!this.baseFontSize)
|
|
@@ -6,7 +6,7 @@ export class ModelHelper {
|
|
|
6
6
|
return this.baseFontSize;
|
|
7
7
|
}
|
|
8
8
|
static getFontSizeCssValue(propertyName, defaultValue) {
|
|
9
|
-
const value = parseInt(
|
|
9
|
+
const value = parseInt(getCssPropertyValue(document.documentElement, propertyName));
|
|
10
10
|
return isNaN(value) ? defaultValue : value;
|
|
11
11
|
}
|
|
12
12
|
static getSum(items) {
|
|
@@ -14,7 +14,8 @@ export class TitleConfigReader {
|
|
|
14
14
|
getFontSize() {
|
|
15
15
|
var _a;
|
|
16
16
|
return typeof this.config === "object"
|
|
17
|
-
? (_a = this.config.fontSize) !== null && _a !== void 0 ? _a : this.defaultCssUnitReader()
|
|
17
|
+
? (_a = this.config.fontSize) !== null && _a !== void 0 ? _a : this.defaultCssUnitReader()
|
|
18
|
+
: this.defaultCssUnitReader();
|
|
18
19
|
}
|
|
19
20
|
getResolvedTitle() {
|
|
20
21
|
switch (typeof this.config) {
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import { Size } from "../../../../config/config";
|
|
1
2
|
import { MdtChartsDonutThicknessOptions } from "../../../../designer/designerConfig";
|
|
2
|
-
import { DonutThicknessUnit } from "../../../model";
|
|
3
|
+
import { BlockMargin, DonutChartSettings, DonutThicknessUnit } from "../../../model";
|
|
3
4
|
export declare class DonutThicknessService {
|
|
4
5
|
private defaultUnit;
|
|
5
6
|
getUnit(settingsFromConfig: MdtChartsDonutThicknessOptions): DonutThicknessUnit;
|
|
6
7
|
valueToNumber(value: string | number): number;
|
|
7
8
|
}
|
|
9
|
+
export declare class DonutThicknessCalculator {
|
|
10
|
+
static getThickness(donutSettings: DonutChartSettings, blockSize: Size, margin: BlockMargin): number;
|
|
11
|
+
private static getThicknessByUnit;
|
|
12
|
+
private static getChartBlockSize;
|
|
13
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getPxPercentUnitByValue } from "../../../helpers/unitsFromConfigReader";
|
|
2
|
+
const MIN_CHART_BLOCK_SIZE_FOR_MAX_THICKNESS = 400;
|
|
2
3
|
export class DonutThicknessService {
|
|
3
4
|
constructor() {
|
|
4
5
|
this.defaultUnit = "px";
|
|
@@ -16,3 +17,26 @@ export class DonutThicknessService {
|
|
|
16
17
|
return parseInt(value);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
20
|
+
export class DonutThicknessCalculator {
|
|
21
|
+
static getThickness(donutSettings, blockSize, margin) {
|
|
22
|
+
const thicknessOpts = donutSettings.thickness;
|
|
23
|
+
const chartBlockSize = this.getChartBlockSize(blockSize, margin);
|
|
24
|
+
if (thicknessOpts.value)
|
|
25
|
+
return this.getThicknessByUnit(chartBlockSize, thicknessOpts.value, thicknessOpts.unit);
|
|
26
|
+
if (Math.min(chartBlockSize.width, chartBlockSize.height) > MIN_CHART_BLOCK_SIZE_FOR_MAX_THICKNESS)
|
|
27
|
+
return this.getThicknessByUnit(chartBlockSize, thicknessOpts.max, thicknessOpts.unit);
|
|
28
|
+
return this.getThicknessByUnit(chartBlockSize, thicknessOpts.min, thicknessOpts.unit);
|
|
29
|
+
}
|
|
30
|
+
static getThicknessByUnit(chartBlockSize, valueInPx, unit) {
|
|
31
|
+
if (unit === "px")
|
|
32
|
+
return valueInPx;
|
|
33
|
+
const minSideSize = Math.min(chartBlockSize.width, chartBlockSize.height);
|
|
34
|
+
return (minSideSize / 2) * (valueInPx / 100);
|
|
35
|
+
}
|
|
36
|
+
static getChartBlockSize(blockSize, margin) {
|
|
37
|
+
return {
|
|
38
|
+
height: blockSize.height - margin.top - margin.bottom,
|
|
39
|
+
width: blockSize.width - margin.left - margin.right
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -24,7 +24,7 @@ export class PolarModel {
|
|
|
24
24
|
twoToFour: "категории",
|
|
25
25
|
tenToTwenty: "категорий",
|
|
26
26
|
other: "категорий"
|
|
27
|
-
}, options.recordOverflowAlert)
|
|
27
|
+
}, { positionAttrs: { bottom: "0", right: "0" } }, options.recordOverflowAlert)
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
//TODO: type for returned value
|
|
@@ -137,7 +137,8 @@ export function getAreaViewOptions(chart, chartIndex, style, chartBlockId) {
|
|
|
137
137
|
for (let index = 0; index < style.elementColors.length; index++) {
|
|
138
138
|
gradientIds.push(getGradientId(chartIndex, index, chartBlockId));
|
|
139
139
|
}
|
|
140
|
-
const fill = ((_b = (_a = chart.areaStyles) === null || _a === void 0 ? void 0 : _a.gradient) === null || _b === void 0 ? void 0 : _b.on)
|
|
140
|
+
const fill = ((_b = (_a = chart.areaStyles) === null || _a === void 0 ? void 0 : _a.gradient) === null || _b === void 0 ? void 0 : _b.on)
|
|
141
|
+
? { type: "gradient", ids: gradientIds }
|
|
141
142
|
: { type: "paletteColor" };
|
|
142
143
|
const borderLine = {
|
|
143
144
|
on: (_e = (_d = (_c = chart.areaStyles) === null || _c === void 0 ? void 0 : _c.borderLine) === null || _d === void 0 ? void 0 : _d.on) !== null && _e !== void 0 ? _e : false,
|
|
@@ -53,7 +53,7 @@ export class TwoDimensionalModel {
|
|
|
53
53
|
twoToFour: isHorizontal ? "строки" : "столбца",
|
|
54
54
|
tenToTwenty: isHorizontal ? "строк" : "столбцов",
|
|
55
55
|
other: isHorizontal ? "строк" : "столбцов"
|
|
56
|
-
}, options.recordOverflowAlert)
|
|
56
|
+
}, { positionAttrs: { top: "0", right: "0" } }, options.recordOverflowAlert)
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
static getChartsEmbeddedLabelsFlag(charts, chartOrientation) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdt-charts",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/main.js",
|
|
6
6
|
"scripts": {
|
|
@@ -23,36 +23,36 @@
|
|
|
23
23
|
"@types/chroma-js": "^2.1.3",
|
|
24
24
|
"@types/d3-array": "^3.2.1",
|
|
25
25
|
"@types/d3-axis": "^3.0.6",
|
|
26
|
-
"@types/d3-ease": "^
|
|
27
|
-
"@types/d3-format": "^
|
|
28
|
-
"@types/d3-interpolate": "^
|
|
26
|
+
"@types/d3-ease": "^3.0.2",
|
|
27
|
+
"@types/d3-format": "^3.0.4",
|
|
28
|
+
"@types/d3-interpolate": "^3.0.4",
|
|
29
29
|
"@types/d3-scale": "^3.2.2",
|
|
30
30
|
"@types/d3-selection": "^2.0.0",
|
|
31
31
|
"@types/d3-shape": "^2.0.0",
|
|
32
32
|
"@types/d3-timer": "^2.0.0",
|
|
33
33
|
"@types/d3-transition": "^2.0.0",
|
|
34
34
|
"@types/html-webpack-plugin": "^3.2.4",
|
|
35
|
-
"@types/jest": "^
|
|
35
|
+
"@types/jest": "^29.5.14",
|
|
36
36
|
"clean-webpack-plugin": "^3.0.0",
|
|
37
|
-
"css-loader": "^
|
|
37
|
+
"css-loader": "^7.1.2",
|
|
38
38
|
"d3-timer": "^2.0.0",
|
|
39
|
-
"html-webpack-plugin": "^
|
|
40
|
-
"jest": "^
|
|
41
|
-
"
|
|
39
|
+
"html-webpack-plugin": "^5.6.3",
|
|
40
|
+
"jest": "^29.7.0",
|
|
41
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
42
|
+
"shx": "^0.4.0",
|
|
42
43
|
"style-loader": "^2.0.0",
|
|
43
|
-
"ts-loader": "^8.0
|
|
44
|
-
"typescript": "^4.
|
|
45
|
-
"webpack": "^5.
|
|
46
|
-
"webpack-
|
|
47
|
-
"webpack-cli": "^4.2.0"
|
|
44
|
+
"ts-loader": "^8.4.0",
|
|
45
|
+
"typescript": "^4.8.4",
|
|
46
|
+
"webpack": "^5.99.5",
|
|
47
|
+
"webpack-cli": "^6.0.1"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"chroma-js": "^2.1.1",
|
|
51
51
|
"d3-array": "^3.2.4",
|
|
52
52
|
"d3-axis": "^3.0.0",
|
|
53
|
-
"d3-ease": "^
|
|
54
|
-
"d3-format": "^
|
|
55
|
-
"d3-interpolate": "^
|
|
53
|
+
"d3-ease": "^3.0.1",
|
|
54
|
+
"d3-format": "^3.1.0",
|
|
55
|
+
"d3-interpolate": "^3.0.1",
|
|
56
56
|
"d3-scale": "^3.2.3",
|
|
57
57
|
"d3-selection": "^2.0.0",
|
|
58
58
|
"d3-shape": "^2.0.0",
|