← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18726: Chart plugins, series title bug fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 18726 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2015-03-28 17:54:31 +0100
message:
  Chart plugins, series title bug fixed.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/eventchart.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/chart.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/chart.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventchart.js
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.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-event-visualizer/scripts/eventchart.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/eventchart.js	2015-03-23 12:48:05 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/eventchart.js	2015-03-28 16:52:19 +0000
@@ -3146,7 +3146,7 @@
                         numberOfItems = titles.length,
                         numberOfChars,
                         totalItemLength = numberOfItems * itemLength,
-                        minLength = 5,
+                        //minLength = 5,
                         maxLength = support.prototype.array.getMaxLength(titles),
                         fallbackLength = 10,
                         maxWidth = ns.app.centerRegion.getWidth(),
@@ -3160,7 +3160,7 @@
 
                         fallbackLength = len < fallbackLength ? len : fallbackLength;
 
-                        for (var i = len, width; i >= minLength; i--) {
+                        for (var i = len, width; i > 0; i--) {
                             newTitles = [];
 
                             for (var j = 0, title, numberOfChars, newTitle; j < titles.length; j++) {

=== 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-03-23 12:48:05 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/chart.js	2015-03-28 16:52:19 +0000
@@ -2780,7 +2780,7 @@
                         numberOfItems = titles.length,
                         numberOfChars,
                         totalItemLength = numberOfItems * itemLength,
-                        minLength = 5,
+                        //minLength = 5,
                         maxLength = support.prototype.array.getMaxLength(titles),
                         fallbackLength = 10,
                         maxWidth = ns.app.centerRegion.getWidth(),
@@ -2794,7 +2794,7 @@
 
                         fallbackLength = len < fallbackLength ? len : fallbackLength;
 
-                        for (var i = len, width; i >= minLength; i--) {
+                        for (var i = len, width; i > 0; i--) {
                             newTitles = [];
 
                             for (var j = 0, title, numberOfChars, newTitle; j < titles.length; j++) {

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/chart.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/chart.js	2015-03-23 12:48:05 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/chart.js	2015-03-28 16:52:19 +0000
@@ -2779,7 +2779,7 @@
                         numberOfItems = titles.length,
                         numberOfChars,
                         totalItemLength = numberOfItems * itemLength,
-                        minLength = 5,
+                        //minLength = 5,
                         maxLength = support.prototype.array.getMaxLength(titles),
                         fallbackLength = 10,
                         maxWidth = ns.app.centerRegion.getWidth(),
@@ -2793,7 +2793,7 @@
 
                         fallbackLength = len < fallbackLength ? len : fallbackLength;
 
-                        for (var i = len, width; i >= minLength; i--) {
+                        for (var i = len, width; i > 0; i--) {
                             newTitles = [];
 
                             for (var j = 0, title, numberOfChars, newTitle; j < titles.length; j++) {

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventchart.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventchart.js	2015-03-23 12:48:05 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventchart.js	2015-03-28 16:52:19 +0000
@@ -3146,7 +3146,7 @@
                         numberOfItems = titles.length,
                         numberOfChars,
                         totalItemLength = numberOfItems * itemLength,
-                        minLength = 5,
+                        //minLength = 5,
                         maxLength = support.prototype.array.getMaxLength(titles),
                         fallbackLength = 10,
                         maxWidth = ns.app.centerRegion.getWidth(),
@@ -3160,7 +3160,7 @@
 
                         fallbackLength = len < fallbackLength ? len : fallbackLength;
 
-                        for (var i = len, width; i >= minLength; i--) {
+                        for (var i = len, width; i > 0; i--) {
                             newTitles = [];
 
                             for (var j = 0, title, numberOfChars, newTitle; j < titles.length; j++) {

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js	2015-03-23 12:48:05 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js	2015-03-28 16:52:19 +0000
@@ -2772,7 +2772,7 @@
                         numberOfItems = titles.length,
                         numberOfChars,
                         totalItemLength = numberOfItems * itemLength,
-                        minLength = 5,
+                        //minLength = 5,
                         maxLength = support.prototype.array.getMaxLength(titles),
                         fallbackLength = 10,
                         maxWidth = ns.app.centerRegion.getWidth(),
@@ -2786,7 +2786,7 @@
 
                         fallbackLength = len < fallbackLength ? len : fallbackLength;
 
-                        for (var i = len, width; i >= minLength; i--) {
+                        for (var i = len, width; i > 0; i--) {
                             newTitles = [];
 
                             for (var j = 0, title, numberOfChars, newTitle; j < titles.length; j++) {

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js	2015-03-23 12:48:05 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js	2015-03-28 16:52:19 +0000
@@ -3139,7 +3139,7 @@
                         numberOfItems = titles.length,
                         numberOfChars,
                         totalItemLength = numberOfItems * itemLength,
-                        minLength = 5,
+                        //minLength = 5,
                         maxLength = support.prototype.array.getMaxLength(titles),
                         fallbackLength = 10,
                         maxWidth = ns.app.centerRegion.getWidth(),
@@ -3153,7 +3153,7 @@
 
                         fallbackLength = len < fallbackLength ? len : fallbackLength;
 
-                        for (var i = len, width; i >= minLength; i--) {
+                        for (var i = len, width; i > 0; i--) {
                             newTitles = [];
 
                             for (var j = 0, title, numberOfChars, newTitle; j < titles.length; j++) {