d2-charts-api
Advanced tools
Comparing version 31.0.8 to 31.0.9
@@ -10,2 +10,6 @@ 'use strict'; | ||
exports.default = function (series, layout, metaData, dashboard) { | ||
var subtitle = { | ||
text: undefined | ||
}; | ||
if (layout.hideSubtitle) { | ||
@@ -15,7 +19,5 @@ return null; | ||
var subtitle = void 0; | ||
// DHIS2-578: allow for optional custom subtitle | ||
if ((0, _isString2.default)(layout.subtitle)) { | ||
subtitle = { text: layout.subtitle }; | ||
subtitle.text = layout.subtitle; | ||
} else { | ||
@@ -29,2 +31,6 @@ var filterTitle = (0, _getFilterTitle2.default)(layout.filters, metaData); | ||
break; | ||
case _type.CHART_TYPE_YEAR_OVER_YEAR_LINE: | ||
case _type.CHART_TYPE_YEAR_OVER_YEAR_COLUMN: | ||
subtitle.text = (0, _yearOverYear2.default)(layout, metaData, Boolean(!dashboard)); | ||
break; | ||
default: | ||
@@ -52,2 +58,6 @@ subtitle = getDefault(layout, dashboard, filterTitle); | ||
var _yearOverYear = require('../title/yearOverYear'); | ||
var _yearOverYear2 = _interopRequireDefault(_yearOverYear); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -54,0 +64,0 @@ |
{ | ||
"name": "d2-charts-api", | ||
"version": "31.0.8", | ||
"version": "31.0.9", | ||
"description": "DHIS2 charts api", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
import isString from 'd2-utilizr/lib/isString'; | ||
import getGauge from './gauge'; | ||
import getFilterTitle from '../getFilterTitle'; | ||
import { CHART_TYPE_PIE, CHART_TYPE_GAUGE } from '../type'; | ||
import { | ||
CHART_TYPE_PIE, | ||
CHART_TYPE_GAUGE, | ||
CHART_TYPE_YEAR_OVER_YEAR_LINE, | ||
CHART_TYPE_YEAR_OVER_YEAR_COLUMN, | ||
} from '../type'; | ||
import getYearOverYearTitle from '../title/yearOverYear'; | ||
@@ -37,2 +43,6 @@ const DEFAULT_SUBTITLE = { | ||
export default function(series, layout, metaData, dashboard) { | ||
let subtitle = { | ||
text: undefined, | ||
}; | ||
if (layout.hideSubtitle) { | ||
@@ -42,7 +52,5 @@ return null; | ||
let subtitle; | ||
// DHIS2-578: allow for optional custom subtitle | ||
if (isString(layout.subtitle)) { | ||
subtitle = { text: layout.subtitle }; | ||
subtitle.text = layout.subtitle; | ||
} else { | ||
@@ -56,2 +64,6 @@ const filterTitle = getFilterTitle(layout.filters, metaData); | ||
break; | ||
case CHART_TYPE_YEAR_OVER_YEAR_LINE: | ||
case CHART_TYPE_YEAR_OVER_YEAR_COLUMN: | ||
subtitle.text = getYearOverYearTitle(layout, metaData, Boolean(!dashboard)); | ||
break; | ||
default: | ||
@@ -58,0 +70,0 @@ subtitle = getDefault(layout, dashboard, filterTitle); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
373068
130
3414