Skip to content

Commit b807779

Browse files
committed
Filter out zero values in getData() method
1 parent edd1f5c commit b807779

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/org/faststats/chart/SimpleLineChart.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ public SimpleLineChart(@ChartId String id, Callable<@Nullable Number> callable)
1414

1515
@Override
1616
public Optional<JsonElement> getData() throws Exception {
17-
return compute().map(JsonPrimitive::new);
17+
return compute().filter(number -> number.doubleValue() != 0).map(JsonPrimitive::new);
1818
}
1919
}

0 commit comments

Comments
 (0)