Skip to content

Commit

Permalink
No Graphs displayed in Aggregate Report/Response Time Graph
Browse files Browse the repository at this point in the history
Make sure, that we scale away from zero (which is in our case mostly up).
Otherwise we might end up with a scaling factor of zero, which would
result in really small images.

Bugzilla Id: 65784
  • Loading branch information
FSchumacher committed Jan 5, 2022
1 parent a16df4b commit 37be72f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ private void drawSample(String _title, int _maxLength, String[] _xAxisLabels,
// Y Axis
try {
BigDecimal round = BigDecimal.valueOf(max / 1000d);
round = round.setScale(0, RoundingMode.HALF_EVEN);
round = round.setScale(0, RoundingMode.UP);
double topValue = round.doubleValue() * 1000;
yaxis.setUserDefinedScale(0, 500);
yaxis.setNumItems((int) (topValue / 500)+1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private void drawSample(String _title, String[] _xAxisLabels,
double[][] _data, int _width, int _height, int _incrScaleYAxis,
Color[] _color, Font legendFont, Graphics g) {

double max = maxYAxisScale > 0 ? maxYAxisScale : getTopValue(findMax(_data), RoundingMode.HALF_EVEN); // define max scale y axis
double max = maxYAxisScale > 0 ? maxYAxisScale : getTopValue(findMax(_data), RoundingMode.UP); // define max scale y axis
try {
// if the title graph is empty, we can assume some default
if (_title.length() == 0 ) {
Expand Down Expand Up @@ -332,7 +332,7 @@ private void drawSample(String _title, String[] _xAxisLabels,
double incrYAxis = max / numInterval;
double incrTopValue = _incrScaleYAxis;
if (_incrScaleYAxis == 0) {
incrTopValue = getTopValue(incrYAxis, RoundingMode.HALF_EVEN);
incrTopValue = getTopValue(incrYAxis, RoundingMode.HALF_UP);
}
if (incrTopValue < 1) {
incrTopValue = 1.0d; // Increment cannot be < 1
Expand Down
1 change: 1 addition & 0 deletions xdocs/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ however, the profile can't be updated while the test is running.
<h3>Listeners</h3>
<ul>
<li><bug>64962</bug>Save CSV sub-results recursively from View Results Tree</li>
<li><bug>65784</bug>No Graphs displayed in Aggregate Report/Response Time Graph</li>
</ul>

<h3>Timers, Assertions, Config, Pre- &amp; Post-Processors</h3>
Expand Down

0 comments on commit 37be72f

Please sign in to comment.