add interval for seconds for bar charts

This commit is contained in:
2020-09-27 17:15:02 +02:00
parent 10155f9cdb
commit 2f4d1f701b
6 changed files with 15 additions and 3 deletions

View File

@@ -28,6 +28,8 @@ public class Interval {
private String toDateFormatForBucketer(final IntervalTimeUnit intervalTimeUnit) {
switch (intervalTimeUnit) {
case SECOND:
return "yyyy-MM-dd'\\n'HH:mm:ss";
case MINUTE:
return "yyyy-MM-dd'\\n'HH:mm";
case HOUR:

View File

@@ -3,7 +3,7 @@ package org.lucares.pdb.plot.api;
import org.lucares.utils.DateBucketUnit;
public enum IntervalTimeUnit {
MINUTE, HOUR, DAY, WEEK, MONTH, YEAR;
SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR;
public static boolean isValid(final String value) {
for (final IntervalTimeUnit e : values()) {
@@ -16,6 +16,8 @@ public enum IntervalTimeUnit {
public DateBucketUnit toChronoUnit() {
switch (this) {
case SECOND:
return DateBucketUnit.SECOND;
case MINUTE:
return DateBucketUnit.MINUTE;
case HOUR: