org.moxieapps.gwt.highcharts.client
Class DateTimeLabelFormats

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.Configurable<DateTimeLabelFormats>
      extended by org.moxieapps.gwt.highcharts.client.DateTimeLabelFormats

public class DateTimeLabelFormats
extends Configurable<DateTimeLabelFormats>

Represents the configuration options available for controlling the way date and time information will be displayed. For a datetime axis, the scale will automatically adjust to the appropriate unit. This configuration class controls the default string format representations used for each unit. Defaults to:

Available replacement codes for the day of date are: Available replacement codes for the month of the date are: Available replacement codes for the year of the date are: Available replacement codes for the time portions are: Example usage:
   axis.setDateTimeLabelFormats(
     new DateTimeLabelFormats()
       .setHour("%I %p")
       .setMinute("%I:%M %p")
   );
 

Since:
1.6.0
Author:
squinn@moxiegroup.com (Shawn Quinn)

Constructor Summary
DateTimeLabelFormats()
           
 
Method Summary
 DateTimeLabelFormats setDay(String day)
          Convenience method for setting the 'day' format.
 DateTimeLabelFormats setDay(String singleUnit, String startDate, String endDate)
          Convenience method for setting the 'day' format.
 DateTimeLabelFormats setHour(String hour)
          Convenience method for setting the 'hour' format.
 DateTimeLabelFormats setHour(String singleUnit, String startDate, String endDate)
          Convenience method for setting the 'hour' format.
 DateTimeLabelFormats setMillisecond(String millisecond)
          Convenience method for setting the 'millisecond' format.
 DateTimeLabelFormats setMillisecond(String singleUnit, String startDate, String endDate)
          Convenience method for setting the 'millisecond' format.
 DateTimeLabelFormats setMinute(String minute)
          Convenience method for setting the 'minute' format.
 DateTimeLabelFormats setMinute(String singleUnit, String startDate, String endDate)
          Convenience method for setting the 'minute' format.
 DateTimeLabelFormats setMonth(String month)
          Convenience method for setting the 'month' format.
 DateTimeLabelFormats setMonth(String singleUnit, String startDate, String endDate)
          Convenience method for setting the 'month' format.
 DateTimeLabelFormats setSecond(String second)
          Convenience method for setting the 'second' format.
 DateTimeLabelFormats setSecond(String singleUnit, String startDate, String endDate)
          Convenience method for setting the 'second' format.
 DateTimeLabelFormats setWeek(String week)
          Convenience method for setting the 'week' format.
 DateTimeLabelFormats setWeek(String singleUnit, String startDate, String endDate)
          Convenience method for setting the 'week' format.
 DateTimeLabelFormats setYear(String year)
          Convenience method for setting the 'year' format.
 DateTimeLabelFormats setYear(String singleUnit, String startDate, String endDate)
          Convenience method for setting the 'year' format.
 
Methods inherited from class org.moxieapps.gwt.highcharts.client.Configurable
getOptions, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTimeLabelFormats

public DateTimeLabelFormats()
Method Detail

setMillisecond

public DateTimeLabelFormats setMillisecond(String millisecond)
Convenience method for setting the 'millisecond' format. Equivalent to:

     dateTimeLabelFormats.setOption("millisecond", "%H:%M:%S.%L");
 

Parameters:
millisecond - The format to use when displaying labels in units of milliseconds.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.
Since:
1.5.0

setMillisecond

public DateTimeLabelFormats setMillisecond(String singleUnit,
                                           String startDate,
                                           String endDate)
Convenience method for setting the 'millisecond' format. Note that this option is intended for use with stock charts that require custom date formats for each data grouping. See the DataGrouping.setDateTimeLabelFormats(DateTimeLabelFormats) method for more detail.

For each of these array definitions, the first item is the format used when the active time span is one unit. For instance, if the current data applies to one week, the first item of the week array is used. The second and third items are used when the active time span is more than two units. For instance, if the current data applies to two weeks, the second and third item of the week array are used, and applied to the start and end date of the time span.

Parameters:
singleUnit - The format to use when the active time span is one unit.
startDate - The format to use for the start date when the active time span is more than one unit.
endDate - The format to use for the end date when the active time span is more than one unit.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.
Since:
1.6.0

setSecond

public DateTimeLabelFormats setSecond(String second)
Convenience method for setting the 'second' format. Equivalent to:

     dateTimeLabelFormats.setOption("second", "%H:%M:%S");
 

Parameters:
second - The format to use when displaying labels in units of seconds.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.

setSecond

public DateTimeLabelFormats setSecond(String singleUnit,
                                      String startDate,
                                      String endDate)
Convenience method for setting the 'second' format. Note that this option is intended for use with stock charts that require custom date formats for each data grouping. See the DataGrouping.setDateTimeLabelFormats(DateTimeLabelFormats) method for more detail.

For each of these array definitions, the first item is the format used when the active time span is one unit. For instance, if the current data applies to one week, the first item of the week array is used. The second and third items are used when the active time span is more than two units. For instance, if the current data applies to two weeks, the second and third item of the week array are used, and applied to the start and end date of the time span.

Parameters:
singleUnit - The format to use when the active time span is one unit.
startDate - The format to use for the start date when the active time span is more than one unit.
endDate - The format to use for the end date when the active time span is more than one unit.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.
Since:
1.6.0

setMinute

public DateTimeLabelFormats setMinute(String minute)
Convenience method for setting the 'minute' format. Equivalent to:

     dateTimeLabelFormats.setOption("minute", "%H:%M");
 

Parameters:
minute - The format to use when displaying labels in units of minutes.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.

setMinute

public DateTimeLabelFormats setMinute(String singleUnit,
                                      String startDate,
                                      String endDate)
Convenience method for setting the 'minute' format. Note that this option is intended for use with stock charts that require custom date formats for each data grouping. See the DataGrouping.setDateTimeLabelFormats(DateTimeLabelFormats) method for more detail.

For each of these array definitions, the first item is the format used when the active time span is one unit. For instance, if the current data applies to one week, the first item of the week array is used. The second and third items are used when the active time span is more than two units. For instance, if the current data applies to two weeks, the second and third item of the week array are used, and applied to the start and end date of the time span.

Parameters:
singleUnit - The format to use when the active time span is one unit.
startDate - The format to use for the start date when the active time span is more than one unit.
endDate - The format to use for the end date when the active time span is more than one unit.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.
Since:
1.6.0

setHour

public DateTimeLabelFormats setHour(String hour)
Convenience method for setting the 'hour' format. Equivalent to:

     dateTimeLabelFormats.setOption("hour", "%H:%M");
 

Parameters:
hour - The format to use when displaying labels in units of hours.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.

setHour

public DateTimeLabelFormats setHour(String singleUnit,
                                    String startDate,
                                    String endDate)
Convenience method for setting the 'hour' format. Note that this option is intended for use with stock charts that require custom date formats for each data grouping. See the DataGrouping.setDateTimeLabelFormats(DateTimeLabelFormats) method for more detail.

For each of these array definitions, the first item is the format used when the active time span is one unit. For instance, if the current data applies to one week, the first item of the week array is used. The second and third items are used when the active time span is more than two units. For instance, if the current data applies to two weeks, the second and third item of the week array are used, and applied to the start and end date of the time span.

Parameters:
singleUnit - The format to use when the active time span is one unit.
startDate - The format to use for the start date when the active time span is more than one unit.
endDate - The format to use for the end date when the active time span is more than one unit.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.
Since:
1.6.0

setDay

public DateTimeLabelFormats setDay(String day)
Convenience method for setting the 'day' format. Equivalent to:

     dateTimeLabelFormats.setOption("day", "%e. %b");
 

Parameters:
day - The format to use when displaying labels in units of days.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.

setDay

public DateTimeLabelFormats setDay(String singleUnit,
                                   String startDate,
                                   String endDate)
Convenience method for setting the 'day' format. Note that this option is intended for use with stock charts that require custom date formats for each data grouping. See the DataGrouping.setDateTimeLabelFormats(DateTimeLabelFormats) method for more detail.

For each of these array definitions, the first item is the format used when the active time span is one unit. For instance, if the current data applies to one week, the first item of the week array is used. The second and third items are used when the active time span is more than two units. For instance, if the current data applies to two weeks, the second and third item of the week array are used, and applied to the start and end date of the time span.

Parameters:
singleUnit - The format to use when the active time span is one unit.
startDate - The format to use for the start date when the active time span is more than one unit.
endDate - The format to use for the end date when the active time span is more than one unit.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.
Since:
1.6.0

setWeek

public DateTimeLabelFormats setWeek(String week)
Convenience method for setting the 'week' format. Equivalent to:

     dateTimeLabelFormats.setOption("week", "%e. %b");
 

Parameters:
week - The format to use when displaying labels in units of weeks.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.

setWeek

public DateTimeLabelFormats setWeek(String singleUnit,
                                    String startDate,
                                    String endDate)
Convenience method for setting the 'week' format. ENote that this option is intended for use with stock charts that require custom date formats for each data grouping. See the DataGrouping.setDateTimeLabelFormats(DateTimeLabelFormats) method for more detail.

For each of these array definitions, the first item is the format used when the active time span is one unit. For instance, if the current data applies to one week, the first item of the week array is used. The second and third items are used when the active time span is more than two units. For instance, if the current data applies to two weeks, the second and third item of the week array are used, and applied to the start and end date of the time span.

Parameters:
singleUnit - The format to use when the active time span is one unit.
startDate - The format to use for the start date when the active time span is more than one unit.
endDate - The format to use for the end date when the active time span is more than one unit.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.
Since:
1.6.0

setMonth

public DateTimeLabelFormats setMonth(String month)
Convenience method for setting the 'month' format. Equivalent to:

     dateTimeLabelFormats.setOption("month", "%b \'%y");
 

Parameters:
month - The format to use when displaying labels in units of month.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.

setMonth

public DateTimeLabelFormats setMonth(String singleUnit,
                                     String startDate,
                                     String endDate)
Convenience method for setting the 'month' format. Note that this option is intended for use with stock charts that require custom date formats for each data grouping. See the DataGrouping.setDateTimeLabelFormats(DateTimeLabelFormats) method for more detail.

For each of these array definitions, the first item is the format used when the active time span is one unit. For instance, if the current data applies to one week, the first item of the week array is used. The second and third items are used when the active time span is more than two units. For instance, if the current data applies to two weeks, the second and third item of the week array are used, and applied to the start and end date of the time span.

Parameters:
singleUnit - The format to use when the active time span is one unit.
startDate - The format to use for the start date when the active time span is more than one unit.
endDate - The format to use for the end date when the active time span is more than one unit.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.
Since:
1.6.0

setYear

public DateTimeLabelFormats setYear(String year)
Convenience method for setting the 'year' format. Equivalent to:

     dateTimeLabelFormats.setOption("year", "%Y");
 

Parameters:
year - The format to use when displaying labels in units of year.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.

setYear

public DateTimeLabelFormats setYear(String singleUnit,
                                    String startDate,
                                    String endDate)
Convenience method for setting the 'year' format. Note that this option is intended for use with stock charts that require custom date formats for each data grouping. See the DataGrouping.setDateTimeLabelFormats(DateTimeLabelFormats) method for more detail.

For each of these array definitions, the first item is the format used when the active time span is one unit. For instance, if the current data applies to one week, the first item of the week array is used. The second and third items are used when the active time span is more than two units. For instance, if the current data applies to two weeks, the second and third item of the week array are used, and applied to the start and end date of the time span.

Parameters:
singleUnit - The format to use when the active time span is one unit.
startDate - The format to use for the start date when the active time span is more than one unit.
endDate - The format to use for the end date when the active time span is more than one unit.
Returns:
A reference to this DateTimeLabelFormats instance for convenient method chaining.
Since:
1.6.0


Copyright © 2015. All Rights Reserved.