← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20871: DV chart type fix.

 

------------------------------------------------------------
revno: 20871
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2015-10-24 21:17:29 +0200
message:
  DV chart type fix.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/chart.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.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/chart.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/chart.js	2015-10-12 11:52:06 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/chart.js	2015-10-24 19:17:29 +0000
@@ -684,7 +684,8 @@
                         line: 'line',
                         area: 'area',
                         pie: 'pie',
-                        radar: 'radar'
+                        radar: 'radar',
+                        gauge: 'gauge'
                     },
                     server: {
                         column: 'COLUMN',
@@ -3360,8 +3361,8 @@
                         text = '',
                         titleFont,
                         titleColor,
-                        isPie = xLayout.type === conf.finals.chart.pie,
-                        isGauge = xLayout.type === conf.finals.chart.gauge;
+                        isPie = xLayout.type === conf.finals.chart.client.pie,
+                        isGauge = xLayout.type === conf.finals.chart.client.gauge;
 
                     if (isPie) {
                         ids.push(columnIds[0]);
@@ -4532,7 +4533,7 @@
                     xResponse = service.response.getExtendedResponse(xLayout, response);
 
                     // 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, ind) && xLayout.objectNameIdsMap[ind].length) {
                         Ext.Ajax.request({
                             url: ns.core.init.contextPath + '/api/indicators/' + xLayout.objectNameIdsMap[ind][0] + '.json?fields=legendSet[legends[id,name,startValue,endValue,color]]',
                             disableCaching: false,

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js	2015-10-03 12:51:50 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js	2015-10-24 19:17:29 +0000
@@ -626,7 +626,8 @@
                         line: 'line',
                         area: 'area',
                         pie: 'pie',
-                        radar: 'radar'
+                        radar: 'radar',
+                        gauge: 'gauge'
                     },
                     server: {
                         column: 'COLUMN',
@@ -3302,8 +3303,8 @@
                         text = '',
                         titleFont,
                         titleColor,
-                        isPie = xLayout.type === conf.finals.chart.pie,
-                        isGauge = xLayout.type === conf.finals.chart.gauge;
+                        isPie = xLayout.type === conf.finals.chart.client.pie,
+                        isGauge = xLayout.type === conf.finals.chart.client.gauge;
 
                     if (isPie) {
                         ids.push(columnIds[0]);