Package com.xeiam.xchart.internal.chartpart

Examples of com.xeiam.xchart.internal.chartpart.DateFormatter.formatDate()


    double min = 1358108105100L;
    double max = 1358108105900L;
    double span = Math.abs(max - min); // in data space
    long gridStepHint = (long) (span / 1000 * 74);
    long timeUnit = dateFormatter.getTimeUnit(gridStepHint);
    String stringValue = dateFormatter.formatDate(value, timeUnit);
    assertThat(stringValue, equalTo("05.531"));

    // sec
    value = 1358108105000L;
    min = 1358108101000L;
View Full Code Here


    min = 1358108101000L;
    max = 1358108109000L;
    span = Math.abs(max - min); // in data space
    gridStepHint = (long) (span / 1000 * 74);
    timeUnit = dateFormatter.getTimeUnit(gridStepHint);
    stringValue = dateFormatter.formatDate(value, timeUnit);
    assertThat(stringValue, equalTo("05.000"));

    // min
    value = 1358111750000L;
    min = 1358111690000L;
View Full Code Here

    min = 1358111690000L;
    max = 1358111870000L;
    span = Math.abs(max - min); // in data space
    gridStepHint = (long) (span / 1000 * 74);
    timeUnit = dateFormatter.getTimeUnit(gridStepHint);
    stringValue = dateFormatter.formatDate(value, timeUnit);
    assertThat(stringValue, equalTo("15:50"));

    // hour
    value = 1358111870000L;
    min = 1358101070000L;
View Full Code Here

    min = 1358101070000L;
    max = 1358115470000L;
    span = Math.abs(max - min); // in data space
    gridStepHint = (long) (span / 1000 * 74);
    timeUnit = dateFormatter.getTimeUnit(gridStepHint);
    stringValue = dateFormatter.formatDate(value, timeUnit);
    assertThat(stringValue, equalTo("21:17"));

    // day
    value = 1358112317000L;
    min = 1357939517000L;
View Full Code Here

    min = 1357939517000L;
    max = 1358285117000L;
    span = Math.abs(max - min); // in data space
    gridStepHint = (long) (span / 1000 * 74);
    timeUnit = dateFormatter.getTimeUnit(gridStepHint);
    stringValue = dateFormatter.formatDate(value, timeUnit);
    assertThat(stringValue, equalTo("21:25"));

    // week
    value = 1358112317000L;
    min = 1357075517000L;
View Full Code Here

    min = 1357075517000L;
    max = 1359149117000L;
    span = Math.abs(max - min); // in data space
    gridStepHint = (long) (span / 1000 * 74);
    timeUnit = dateFormatter.getTimeUnit(gridStepHint);
    stringValue = dateFormatter.formatDate(value, timeUnit);
    assertThat(stringValue, equalTo("01-13"));

    // month
    value = 1358112838000L;
    min = 1354397638000L;
View Full Code Here

    min = 1354397638000L;
    max = 1361223238000L;
    span = Math.abs(max - min); // in data space
    gridStepHint = (long) (span / 1000 * 74);
    timeUnit = dateFormatter.getTimeUnit(gridStepHint);
    stringValue = dateFormatter.formatDate(value, timeUnit);
    assertThat(stringValue, equalTo("01-13"));

    // year
    value = 1358113402000L;
    min = 1263419002000L;
View Full Code Here

    min = 1263419002000L;
    max = 1421185402000L;
    span = Math.abs(max - min); // in data space
    gridStepHint = (long) (span / 1000 * 74);
    timeUnit = dateFormatter.getTimeUnit(gridStepHint);
    stringValue = dateFormatter.formatDate(value, timeUnit);
    assertThat(stringValue, equalTo("2013-01"));

  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.