@dhis2/analytics 24.10.4 → 24.10.5
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/CHANGELOG.md +7 -0
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/chart.js +1 -1
- package/build/cjs/visualizations/config/generators/highcharts/index.js +6 -4
- package/build/es/visualizations/config/adapters/dhis_highcharts/chart.js +1 -1
- package/build/es/visualizations/config/generators/highcharts/index.js +6 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [24.10.5](https://github.com/dhis2/analytics/compare/v24.10.4...v24.10.5) (2024-04-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* avoid crash in DV with some chart types (DHIS2-15882) [24.x] ([#1651](https://github.com/dhis2/analytics/issues/1651)) ([68907d2](https://github.com/dhis2/analytics/commit/68907d2ef4dc1e200eeaa03c2b092229a68b9a99)), closes [#1582](https://github.com/dhis2/analytics/issues/1582)
|
|
7
|
+
|
|
1
8
|
## [24.10.4](https://github.com/dhis2/analytics/compare/v24.10.3...v24.10.4) (2024-04-02)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -29,7 +29,7 @@ const getEvents = () => ({
|
|
|
29
29
|
this.legend.allItems.forEach(item => {
|
|
30
30
|
if (item.legendSymbol) {
|
|
31
31
|
item.legendSymbol.attr({
|
|
32
|
-
translateY: -(item.legendItem.getBBox().height * 0.75 / 4) + item.legendSymbol.r / 2
|
|
32
|
+
translateY: -(item.legendItem.label.getBBox().height * 0.75 / 4) + item.legendSymbol.r / 2
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
});
|
|
@@ -35,6 +35,8 @@ function drawLegendSymbolWrap() {
|
|
|
35
35
|
_highcharts.default.wrap(_highcharts.default.seriesTypes.column.prototype, 'drawLegendSymbol', function (proceed, legend, item) {
|
|
36
36
|
var _this$options$legendS, _this$options$legendS2;
|
|
37
37
|
|
|
38
|
+
const legendItem = item.legendItem;
|
|
39
|
+
|
|
38
40
|
if ((_this$options$legendS = this.options.legendSet) !== null && _this$options$legendS !== void 0 && (_this$options$legendS2 = _this$options$legendS.legends) !== null && _this$options$legendS2 !== void 0 && _this$options$legendS2.length) {
|
|
39
41
|
const ys = legend.baseline - legend.symbolHeight + 1,
|
|
40
42
|
// y start
|
|
@@ -45,18 +47,18 @@ function drawLegendSymbolWrap() {
|
|
|
45
47
|
const legends = this.options.legendSet.legends.sort((a, b) => a.startValue - b.startValue);
|
|
46
48
|
this.chart.renderer.path(['M', x, ys, 'A', 1, 1, 0, 0, 0, x, ye, 'V', ys]).attr({
|
|
47
49
|
fill: legends[legends.length >= 5 ? 1 : 0].color
|
|
48
|
-
}).add(
|
|
50
|
+
}).add(legendItem.group);
|
|
49
51
|
this.chart.renderer.path(['M', x, ye, 'A', 1, 1, 0, 0, 0, x, ys, 'V', ye]).attr({
|
|
50
52
|
fill: legends[legends.length >= 5 ? legends.length - 2 : legends.length - 1].color
|
|
51
|
-
}).add(
|
|
53
|
+
}).add(legendItem.group);
|
|
52
54
|
} else {
|
|
53
55
|
var options = legend.options,
|
|
54
56
|
symbolHeight = legend.symbolHeight,
|
|
55
57
|
square = options.squareSymbol,
|
|
56
58
|
symbolWidth = square ? symbolHeight : legend.symbolWidth;
|
|
57
|
-
|
|
59
|
+
legendItem.symbol = this.chart.renderer.rect(square ? (legend.symbolWidth - symbolHeight) / 2 : 0, legend.baseline - symbolHeight + 1, symbolWidth, symbolHeight, pick(legend.options.symbolRadius, symbolHeight / 2)).addClass('highcharts-point').attr({
|
|
58
60
|
zIndex: 3
|
|
59
|
-
}).add(
|
|
61
|
+
}).add(legendItem.group);
|
|
60
62
|
}
|
|
61
63
|
});
|
|
62
64
|
}
|
|
@@ -19,7 +19,7 @@ const getEvents = () => ({
|
|
|
19
19
|
this.legend.allItems.forEach(item => {
|
|
20
20
|
if (item.legendSymbol) {
|
|
21
21
|
item.legendSymbol.attr({
|
|
22
|
-
translateY: -(item.legendItem.getBBox().height * 0.75 / 4) + item.legendSymbol.r / 2
|
|
22
|
+
translateY: -(item.legendItem.label.getBBox().height * 0.75 / 4) + item.legendSymbol.r / 2
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
});
|
|
@@ -18,6 +18,8 @@ function drawLegendSymbolWrap() {
|
|
|
18
18
|
H.wrap(H.seriesTypes.column.prototype, 'drawLegendSymbol', function (proceed, legend, item) {
|
|
19
19
|
var _this$options$legendS, _this$options$legendS2;
|
|
20
20
|
|
|
21
|
+
const legendItem = item.legendItem;
|
|
22
|
+
|
|
21
23
|
if ((_this$options$legendS = this.options.legendSet) !== null && _this$options$legendS !== void 0 && (_this$options$legendS2 = _this$options$legendS.legends) !== null && _this$options$legendS2 !== void 0 && _this$options$legendS2.length) {
|
|
22
24
|
const ys = legend.baseline - legend.symbolHeight + 1,
|
|
23
25
|
// y start
|
|
@@ -28,18 +30,18 @@ function drawLegendSymbolWrap() {
|
|
|
28
30
|
const legends = this.options.legendSet.legends.sort((a, b) => a.startValue - b.startValue);
|
|
29
31
|
this.chart.renderer.path(['M', x, ys, 'A', 1, 1, 0, 0, 0, x, ye, 'V', ys]).attr({
|
|
30
32
|
fill: legends[legends.length >= 5 ? 1 : 0].color
|
|
31
|
-
}).add(
|
|
33
|
+
}).add(legendItem.group);
|
|
32
34
|
this.chart.renderer.path(['M', x, ye, 'A', 1, 1, 0, 0, 0, x, ys, 'V', ye]).attr({
|
|
33
35
|
fill: legends[legends.length >= 5 ? legends.length - 2 : legends.length - 1].color
|
|
34
|
-
}).add(
|
|
36
|
+
}).add(legendItem.group);
|
|
35
37
|
} else {
|
|
36
38
|
var options = legend.options,
|
|
37
39
|
symbolHeight = legend.symbolHeight,
|
|
38
40
|
square = options.squareSymbol,
|
|
39
41
|
symbolWidth = square ? symbolHeight : legend.symbolWidth;
|
|
40
|
-
|
|
42
|
+
legendItem.symbol = this.chart.renderer.rect(square ? (legend.symbolWidth - symbolHeight) / 2 : 0, legend.baseline - symbolHeight + 1, symbolWidth, symbolHeight, pick(legend.options.symbolRadius, symbolHeight / 2)).addClass('highcharts-point').attr({
|
|
41
43
|
zIndex: 3
|
|
42
|
-
}).add(
|
|
44
|
+
}).add(legendItem.group);
|
|
43
45
|
}
|
|
44
46
|
});
|
|
45
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2/analytics",
|
|
3
|
-
"version": "24.10.
|
|
3
|
+
"version": "24.10.5",
|
|
4
4
|
"main": "./build/cjs/index.js",
|
|
5
5
|
"module": "./build/es/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"classnames": "^2.3.1",
|
|
64
64
|
"d2-utilizr": "^0.2.16",
|
|
65
65
|
"d3-color": "^1.2.3",
|
|
66
|
-
"highcharts": "^10.
|
|
66
|
+
"highcharts": "^10.3.3",
|
|
67
67
|
"lodash": "^4.17.21",
|
|
68
68
|
"mathjs": "^9.4.2",
|
|
69
69
|
"react-beautiful-dnd": "^10.1.1",
|