Class AxisTransformBusinessCalendar

java.lang.Object
io.deephaven.plot.axistransformations.AxisTransformBusinessCalendar
All Implemented Interfaces:
AxisTransform, Serializable

public class AxisTransformBusinessCalendar extends Object implements AxisTransform, Serializable
AxisTransform into business time. Useful for plotting time series data with large gaps in non-business hours.

The forward transform takes a data value from standard epoch time and translates it into the cumulative business time for the dataset. The inverse transform takes it back to standard epoch time.

Data values outside of business hours are not visible.

See Also:
  • Constructor Details

    • AxisTransformBusinessCalendar

      public AxisTransformBusinessCalendar(BusinessCalendar busCal)
      Creates an AxisTransformBusinessCalendar instance with the specified BusinessCalendar.
      Parameters:
      busCal - business calendar
      Throws:
      RequirementFailure - busCal can not be null
  • Method Details

    • getBusinessCalendar

      public BusinessCalendar getBusinessCalendar()
    • isVisible

      public boolean isVisible(double timeNanos)
      Description copied from interface: AxisTransform
      Gets whether a data point is visible in the plot.
      Specified by:
      isVisible in interface AxisTransform
      Parameters:
      timeNanos - data point
      Returns:
      whether dataValue is visible in the plot
    • inverseTransform

      public double inverseTransform(double value)
      Description copied from interface: AxisTransform
      Transforms a point in Axis space to dataset space.
      Specified by:
      inverseTransform in interface AxisTransform
      Parameters:
      value - Axis space data point
      Returns:
      corresponding value in dataset space
    • transform

      public double transform(double timeNanos)
      Description copied from interface: AxisTransform
      Transforms a data point to Axis space.
      Specified by:
      transform in interface AxisTransform
      Parameters:
      timeNanos - data point
      Returns:
      corresponding value in Axis space