modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
| 12 +++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 729675f6b55c176f56d583bd64b240fb91014840
Author: mtho11 <mikecthompson(a)gmail.com>
Date: Wed Jun 26 10:45:47 2013 -0700
Fix regression where nodata graph values hang below axis. Introduced by recent
minValue bugfix.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
index 6060305..0a2be03 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
@@ -91,6 +91,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
oobMax,
legendUnDefined,
lowBound,
+ newLow = 0,
highBound,
calcBarWidth,
yScale,
@@ -102,7 +103,8 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
// adjust the min scale so blue low line is not in axis
function determineLowBound(min, peak) {
- var newLow = min - ((peak - min) * 0.1);
+ //var newLow = min - ((peak - min) * 0.1);
+ newLow = min;
if (newLow < 0) {
return 0;
}
@@ -366,7 +368,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
})
.attr("height", function (d) {
if (d.down || d.unknown || d.nodata) {
- return height - yScale(lowBound);
+ return 0;
}
else {
return yScale(d.y) - yScale(d.high);
@@ -394,7 +396,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
})
.attr("height", function (d) {
if (d.down || d.unknown || d.nodata) {
- return height - yScale(lowBound);
+ return 0;
}
else {
return yScale(d.low) - yScale(d.y);
@@ -418,14 +420,14 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph
{
})
.attr("height", function (d) {
if (d.down || d.unknown || d.nodata) {
- return height - yScale(lowBound);
+ return 0;
}
else {
if (d.low === d.high) {
return yScale(d.low) - yScale(d.y) + 2;
}
else {
- return yScale(d.low) - yScale(d.y);
+ return 0;
}
}
})
Show replies by date