@dhis2/analytics 28.1.0 → 28.1.2
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/build/cjs/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/getSingleValueSubtext.js +2 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/series/index.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/getSingleValueSubtext.js +2 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/series/index.js +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getSingleValueSubtext = getSingleValueSubtext;
|
|
7
7
|
var _getSingleValueFormattedValue = require("./getSingleValueFormattedValue.js");
|
|
8
|
+
const INDICATOR_FACTOR_1 = 1;
|
|
8
9
|
function getSingleValueSubtext(metaData) {
|
|
9
10
|
const indicatorType = metaData.items[metaData.dimensions.dx[0]].indicatorType;
|
|
10
|
-
return indicatorType !== null && indicatorType !== void 0 && indicatorType.displayName && (indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.factor)
|
|
11
|
+
return indicatorType !== null && indicatorType !== void 0 && indicatorType.displayName && ![INDICATOR_FACTOR_1, _getSingleValueFormattedValue.INDICATOR_FACTOR_100].includes(indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.factor) ? indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.displayName : undefined;
|
|
11
12
|
}
|
|
@@ -194,7 +194,7 @@ function _default({
|
|
|
194
194
|
}
|
|
195
195
|
(_series = series) === null || _series === void 0 ? void 0 : _series.forEach(seriesObj => {
|
|
196
196
|
// animation
|
|
197
|
-
seriesObj.animation = {
|
|
197
|
+
seriesObj.animation = extraOptions.dashboard ? false : {
|
|
198
198
|
duration: getAnimation(extraOptions.animation, DEFAULT_ANIMATION_DURATION)
|
|
199
199
|
};
|
|
200
200
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { INDICATOR_FACTOR_100 } from './getSingleValueFormattedValue.js';
|
|
2
|
+
const INDICATOR_FACTOR_1 = 1;
|
|
2
3
|
export function getSingleValueSubtext(metaData) {
|
|
3
4
|
const indicatorType = metaData.items[metaData.dimensions.dx[0]].indicatorType;
|
|
4
|
-
return indicatorType !== null && indicatorType !== void 0 && indicatorType.displayName && (indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.factor)
|
|
5
|
+
return indicatorType !== null && indicatorType !== void 0 && indicatorType.displayName && ![INDICATOR_FACTOR_1, INDICATOR_FACTOR_100].includes(indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.factor) ? indicatorType === null || indicatorType === void 0 ? void 0 : indicatorType.displayName : undefined;
|
|
5
6
|
}
|
|
@@ -187,7 +187,7 @@ export default function ({
|
|
|
187
187
|
}
|
|
188
188
|
(_series = series) === null || _series === void 0 ? void 0 : _series.forEach(seriesObj => {
|
|
189
189
|
// animation
|
|
190
|
-
seriesObj.animation = {
|
|
190
|
+
seriesObj.animation = extraOptions.dashboard ? false : {
|
|
191
191
|
duration: getAnimation(extraOptions.animation, DEFAULT_ANIMATION_DURATION)
|
|
192
192
|
};
|
|
193
193
|
});
|