From eb31c796e549df54ac91f3930cf9c87f596ed47e Mon Sep 17 00:00:00 2001 From: cdtank Date: Tue, 1 Feb 2011 16:14:11 +0000 Subject: [PATCH] 1. Fix for bar display bug in temporal graph vis (see NIHVIVO-1971). A minimum of 1 pixel is assigned to any bar. --- productMods/js/visualization/entitycomparison/util.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/productMods/js/visualization/entitycomparison/util.js b/productMods/js/visualization/entitycomparison/util.js index 17fa067c..9550da51 100644 --- a/productMods/js/visualization/entitycomparison/util.js +++ b/productMods/js/visualization/entitycomparison/util.js @@ -812,8 +812,13 @@ function getNormalizedWidth(entity, sum){ var normalizedWidth = 0; normalizedWidth = Math.floor(225 * (sum / maxValueOfComparisonParameter)); - - return normalizedWidth; + + /* + * This will make sure that the entites that have very low count have at least + * 1 pixel width bar. This happens when the highest count organization has a very high count + * compared to the lowest count organization. + * */ + return normalizedWidth === 0 ? 1 : normalizedWidth; } function renderLineGraph(renderedObjects, entity){