add interval for seconds for bar charts
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user