Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

d2-charts-api

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d2-charts-api - npm Package Compare versions

Comparing version 25.0.9 to 25.0.10

35

lib/config/adapters/dhis_highcharts/subtitle/index.js

@@ -8,13 +8,22 @@ 'use strict';

exports.default = function (series, layout, metaData, dashboard) {
if (layout.hideSubtitle) {
return null;
}
var subtitle = void 0;
var filterTitle = (0, _getFilterTitle2.default)(layout, metaData);
// DHIS2-578: allow for optional custom subtitle
if ((0, _isString2.default)(layout.subtitle)) {
subtitle = { text: layout.subtitle };
} else {
var filterTitle = (0, _getFilterTitle2.default)(layout, metaData);
switch (layout.type) {
case _.CHART_TYPE_PIE:
case _.CHART_TYPE_GAUGE:
subtitle = (0, _gauge2.default)(series, layout, metaData, dashboard, filterTitle);
break;
default:
subtitle = getDefault(layout, dashboard, filterTitle);
switch (layout.type) {
case _.CHART_TYPE_PIE:
case _.CHART_TYPE_GAUGE:
subtitle = (0, _gauge2.default)(series, layout, metaData, dashboard, filterTitle);
break;
default:
subtitle = getDefault(layout, dashboard, filterTitle);
}
}

@@ -43,2 +52,7 @@

style: {
// DHIS2-578: dynamically truncate subtitle when it's taking more than 1 line
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
fontSize: '14px',

@@ -52,2 +66,7 @@ color: '#555',

style: {
// DHIS2-578: dynamically truncate subtitle when it's taking more than 1 line
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
fontSize: '12px'

@@ -54,0 +73,0 @@ }

{
"name": "d2-charts-api",
"version": "25.0.9",
"version": "25.0.10",
"description": "DHIS2 charts api",

@@ -5,0 +5,0 @@ "main": "index.html",

@@ -8,2 +8,7 @@ import isString from 'd2-utilizr/lib/isString';

style: {
// DHIS2-578: dynamically truncate subtitle when it's taking more than 1 line
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
fontSize: '14px',

@@ -17,2 +22,7 @@ color: '#555',

style: {
// DHIS2-578: dynamically truncate subtitle when it's taking more than 1 line
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
fontSize: '12px'

@@ -29,13 +39,23 @@ }

export default function (series, layout, metaData, dashboard) {
if (layout.hideSubtitle) {
return null;
}
let subtitle;
const filterTitle = getFilterTitle(layout, metaData);
// DHIS2-578: allow for optional custom subtitle
if (isString(layout.subtitle)) {
subtitle = { text: layout.subtitle };
}
else {
const filterTitle = getFilterTitle(layout, metaData);
switch(layout.type) {
case CHART_TYPE_PIE:
case CHART_TYPE_GAUGE:
subtitle = getGauge(series, layout, metaData, dashboard, filterTitle);
break;
default:
subtitle = getDefault(layout, dashboard, filterTitle);
switch(layout.type) {
case CHART_TYPE_PIE:
case CHART_TYPE_GAUGE:
subtitle = getGauge(series, layout, metaData, dashboard, filterTitle);
break;
default:
subtitle = getDefault(layout, dashboard, filterTitle);
}
}

@@ -49,2 +69,2 @@

) : subtitle;
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc