d2-charts-api
Advanced tools
Comparing version 31.0.10 to 31.0.11
@@ -11,4 +11,5 @@ 'use strict'; | ||
switch (layout.type) { | ||
case _type.CHART_TYPE_PIE: | ||
case _type.CHART_TYPE_GAUGE: | ||
xAxis = (0, _gauge2.default)(); | ||
xAxis = noAxis(); | ||
break; | ||
@@ -38,6 +39,2 @@ case _type.CHART_TYPE_YEAR_OVER_YEAR_LINE: | ||
var _gauge = require('./gauge'); | ||
var _gauge2 = _interopRequireDefault(_gauge); | ||
var _yearOnYear = require('./yearOnYear'); | ||
@@ -51,2 +48,6 @@ | ||
function noAxis() { | ||
return null; | ||
} | ||
function getDefault(store, layout) { | ||
@@ -53,0 +54,0 @@ return (0, _objectClean2.default)({ |
@@ -8,6 +8,6 @@ "use strict"; | ||
exports.default = function (acc, seriesIds, categoryIds, idValueMap, metaData) { | ||
acc.push.apply(acc, _toConsumableArray(categoryIds.map(function (categoryId) { | ||
acc.push.apply(acc, _toConsumableArray(seriesIds.map(function (seriesId) { | ||
return { | ||
name: metaData.items[categoryId].name, | ||
y: parseFloat(idValueMap.get(categoryId)) | ||
name: metaData.items[seriesId].name, | ||
y: parseFloat(idValueMap.get(seriesId)) | ||
}; | ||
@@ -14,0 +14,0 @@ }))); |
{ | ||
"name": "d2-charts-api", | ||
"version": "31.0.10", | ||
"version": "31.0.11", | ||
"description": "DHIS2 charts api", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
import objectClean from 'd2-utilizr/lib/objectClean'; | ||
import getAxisTitle from '../getAxisTitle'; | ||
import getCategories from '../getCategories'; | ||
import getGauge from './gauge'; | ||
import getYearOnYear from './yearOnYear'; | ||
@@ -10,4 +9,9 @@ import { | ||
CHART_TYPE_YEAR_OVER_YEAR_COLUMN, | ||
CHART_TYPE_PIE, | ||
} from '../type'; | ||
function noAxis() { | ||
return null; | ||
} | ||
function getDefault(store, layout) { | ||
@@ -30,4 +34,5 @@ return objectClean({ | ||
switch (layout.type) { | ||
case CHART_TYPE_PIE: | ||
case CHART_TYPE_GAUGE: | ||
xAxis = getGauge(); | ||
xAxis = noAxis(); | ||
break; | ||
@@ -34,0 +39,0 @@ case CHART_TYPE_YEAR_OVER_YEAR_LINE: |
export default function(acc, seriesIds, categoryIds, idValueMap, metaData) { | ||
acc.push(...categoryIds.map(categoryId => ({ | ||
name: metaData.items[categoryId].name, | ||
y: parseFloat(idValueMap.get(categoryId)), | ||
acc.push(...seriesIds.map(seriesId => ({ | ||
name: metaData.items[seriesId].name, | ||
y: parseFloat(idValueMap.get(seriesId)), | ||
}))); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
306273
130
3449