print only bar chart tics when they are greater than zero
This commit is contained in:
@@ -134,6 +134,7 @@ public class BarChartAggregatorForIntervals implements CustomAggregator, Indexed
|
|||||||
int offset = 0;
|
int offset = 0;
|
||||||
for (final String bucketId : bucketIds()) {
|
for (final String bucketId : bucketIds()) {
|
||||||
final long count = buckets.get(bucketId).get();
|
final long count = buckets.get(bucketId).get();
|
||||||
|
if (count > 0) {
|
||||||
final String label = String.format(Locale.US, "set label at %s %f, %d '%s' center front offset 0,0.3\n", // front
|
final String label = String.format(Locale.US, "set label at %s %f, %d '%s' center front offset 0,0.3\n", // front
|
||||||
xAxis == GnuplotAxis.X1 ? "first" : "second", //
|
xAxis == GnuplotAxis.X1 ? "first" : "second", //
|
||||||
offset + getIndex() * SPACE_BETWEEN_BARS + 0.5, // x-axis position of the label
|
offset + getIndex() * SPACE_BETWEEN_BARS + 0.5, // x-axis position of the label
|
||||||
@@ -141,6 +142,7 @@ public class BarChartAggregatorForIntervals implements CustomAggregator, Indexed
|
|||||||
String.format(Locale.US, "%,d", count));
|
String.format(Locale.US, "%,d", count));
|
||||||
|
|
||||||
result.append(label);
|
result.append(label);
|
||||||
|
}
|
||||||
offset += numberOfDataSeries;
|
offset += numberOfDataSeries;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user