@dhis2/analytics 25.1.1 → 25.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [25.1.2](https://github.com/dhis2/analytics/compare/v25.1.1...v25.1.2) (2023-05-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * small cosmetic fixes to SV SVG ([#1457](https://github.com/dhis2/analytics/issues/1457)) ([2785a9e](https://github.com/dhis2/analytics/commit/2785a9e3e7c656d830df78c84c4ef29de74b0614))
7
+
1
8
  ## [25.1.1](https://github.com/dhis2/analytics/compare/v25.1.0...v25.1.1) (2023-05-02)
2
9
 
3
10
 
@@ -226,7 +226,7 @@ const generateDVItem = (config, _ref3) => {
226
226
  const subtitle = document.createElementNS(svgNS, 'text');
227
227
  subtitle.setAttribute('x', getXFromTextAlign(subtitleFontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_ALIGN]));
228
228
  subtitle.setAttribute('y', titleYPosition);
229
- subtitle.setAttribute('dy', "".concat(subtitleFontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] + 4));
229
+ subtitle.setAttribute('dy', "".concat(subtitleFontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] + 10));
230
230
  subtitle.setAttribute('text-anchor', getTextAnchorFromTextAlign(subtitleFontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_ALIGN]));
231
231
  subtitle.setAttribute('font-size', "".concat(subtitleFontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px"));
232
232
  subtitle.setAttribute('font-weight', subtitleFontStyle[_fontStyle.FONT_STYLE_OPTION_BOLD] ? _fontStyle.FONT_STYLE_OPTION_BOLD : 'normal');
@@ -317,7 +317,7 @@ function _default(config, parentEl, _ref4) {
317
317
  svgContainer.setAttribute('data-test', 'visualization-container');
318
318
 
319
319
  if (dashboard) {
320
- parentEl.style.borderRadius = _ui.spacers.dp8;
320
+ parentEl.style.borderRadius = '3px';
321
321
  return generateDashboardItem(config, {
322
322
  svgContainer,
323
323
  width,
@@ -1,4 +1,4 @@
1
- import { colors, spacers } from '@dhis2/ui';
1
+ import { colors } from '@dhis2/ui';
2
2
  import { FONT_STYLE_VISUALIZATION_TITLE, FONT_STYLE_VISUALIZATION_SUBTITLE, FONT_STYLE_OPTION_FONT_SIZE, FONT_STYLE_OPTION_TEXT_COLOR, FONT_STYLE_OPTION_TEXT_ALIGN, FONT_STYLE_OPTION_ITALIC, FONT_STYLE_OPTION_BOLD, TEXT_ALIGN_LEFT, TEXT_ALIGN_RIGHT, TEXT_ALIGN_CENTER, mergeFontStyleWithDefault, defaultFontStyle } from '../../../../modules/fontStyle.js';
3
3
  import { getColorByValueFromLegendSet, LEGEND_DISPLAY_STYLE_FILL } from '../../../../modules/legends.js';
4
4
  const svgNS = 'http://www.w3.org/2000/svg'; // Compute text width before rendering
@@ -216,7 +216,7 @@ const generateDVItem = (config, _ref3) => {
216
216
  const subtitle = document.createElementNS(svgNS, 'text');
217
217
  subtitle.setAttribute('x', getXFromTextAlign(subtitleFontStyle[FONT_STYLE_OPTION_TEXT_ALIGN]));
218
218
  subtitle.setAttribute('y', titleYPosition);
219
- subtitle.setAttribute('dy', "".concat(subtitleFontStyle[FONT_STYLE_OPTION_FONT_SIZE] + 4));
219
+ subtitle.setAttribute('dy', "".concat(subtitleFontStyle[FONT_STYLE_OPTION_FONT_SIZE] + 10));
220
220
  subtitle.setAttribute('text-anchor', getTextAnchorFromTextAlign(subtitleFontStyle[FONT_STYLE_OPTION_TEXT_ALIGN]));
221
221
  subtitle.setAttribute('font-size', "".concat(subtitleFontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px"));
222
222
  subtitle.setAttribute('font-weight', subtitleFontStyle[FONT_STYLE_OPTION_BOLD] ? FONT_STYLE_OPTION_BOLD : 'normal');
@@ -307,7 +307,7 @@ export default function (config, parentEl, _ref4) {
307
307
  svgContainer.setAttribute('data-test', 'visualization-container');
308
308
 
309
309
  if (dashboard) {
310
- parentEl.style.borderRadius = spacers.dp8;
310
+ parentEl.style.borderRadius = '3px';
311
311
  return generateDashboardItem(config, {
312
312
  svgContainer,
313
313
  width,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "25.1.1",
3
+ "version": "25.1.2",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {