dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40999
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20877: DV gauge legend set fix.
------------------------------------------------------------
revno: 20877
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-10-26 13:21:45 +0100
message:
DV gauge legend set fix.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js 2015-10-12 11:12:49 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js 2015-10-26 12:21:45 +0000
@@ -2552,6 +2552,7 @@
xColAxis,
xRowAxis,
config,
+ dx = dimConf.data.objectName,
ind = dimConf.indicator.objectName,
legendSet,
fn;
@@ -2602,9 +2603,9 @@
ns.app.xResponse = xResponse;
// legend set
- if (xLayout.type === 'GAUGE' && Ext.Array.contains(xLayout.axisObjectNames, ind) && xLayout.objectNameIdsMap[ind].length) {
+ if (xLayout.type === 'gauge' && Ext.Array.contains(xLayout.axisObjectNames, dx) && xLayout.dimensionNameIdsMap[dx].length) {
Ext.Ajax.request({
- url: ns.core.init.contextPath + '/api/indicators/' + xLayout.objectNameIdsMap[ind][0] + '.json?fields=legendSet[legends[id,name,startValue,endValue,color]]',
+ url: ns.core.init.contextPath + '/api/indicators/' + xLayout.dimensionNameIdsMap[dx][0] + '.json?fields=legendSet[legends[id,name,startValue,endValue,color]]',
disableCaching: false,
success: function(r) {
legendSet = Ext.decode(r.responseText).legendSet;