d2-charts-api
Advanced tools
Comparing version 32.0.4 to 32.0.5
@@ -16,3 +16,3 @@ 'use strict'; | ||
default: | ||
series = getDefault(series, store, layout, isStacked, extraOptions); | ||
series = getDefault(series, layout, isStacked, extraOptions); | ||
} | ||
@@ -102,3 +102,3 @@ | ||
function getDefault(series, store, layout, isStacked, extraOptions) { | ||
function getDefault(series, layout, isStacked, extraOptions) { | ||
var fullIdAxisMap = (0, _seriesItems.getFullIdAxisMap)(layout.seriesItems, series); | ||
@@ -133,3 +133,3 @@ var idColorMap = getIdColorMap(series, layout, extraOptions); | ||
// color | ||
seriesObj.color = idColorMap[seriesObj.id]; | ||
seriesObj.color = (0, _type.isYearOverYear)(layout.type) ? extraOptions.colors[index] : idColorMap[seriesObj.id]; | ||
@@ -136,0 +136,0 @@ // axis number |
{ | ||
"name": "d2-charts-api", | ||
"version": "32.0.4", | ||
"version": "32.0.5", | ||
"description": "DHIS2 charts api", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
import getCumulativeData from './../getCumulativeData'; | ||
import getPie from './pie'; | ||
import getGauge from './gauge'; | ||
import getType, { isDualAxis } from '../type'; | ||
import getType, { isDualAxis, isYearOverYear } from '../type'; | ||
import { CHART_TYPE_PIE, CHART_TYPE_GAUGE } from '../type'; | ||
@@ -59,3 +59,3 @@ import { getFullIdAxisMap, getAxisIdsMap } from '../seriesItems'; | ||
function getDefault(series, store, layout, isStacked, extraOptions) { | ||
function getDefault(series, layout, isStacked, extraOptions) { | ||
const fullIdAxisMap = getFullIdAxisMap(layout.seriesItems, series); | ||
@@ -90,3 +90,5 @@ const idColorMap = getIdColorMap(series, layout, extraOptions); | ||
// color | ||
seriesObj.color = idColorMap[seriesObj.id]; | ||
seriesObj.color = isYearOverYear(layout.type) ? | ||
extraOptions.colors[index] : | ||
idColorMap[seriesObj.id]; | ||
@@ -119,3 +121,3 @@ // axis number | ||
default: | ||
series = getDefault(series, store, layout, isStacked, extraOptions); | ||
series = getDefault(series, layout, isStacked, extraOptions); | ||
} | ||
@@ -122,0 +124,0 @@ |
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
408507
146
3932