Interface AxisUnitConverter


  • public interface AxisUnitConverter
    All linked AxisHandlers must use common units for linking to work correctly. However, by setting an AxisUnitConverter on an AxisPainter, the AxisPainter can display tick marks and labels in different units than the AxisHandler.

    By default, AxisPainters have an identity AxisUnitConverter.
    Author:
    ulman
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double fromAxisUnits​(double value)
      Converts from AxisPainter display units to AxisHandler units.
      double toAxisUnits​(double value)
      Converts from AxisHandler units to AxisPainter display units.
    • Method Detail

      • fromAxisUnits

        double fromAxisUnits​(double value)
        Converts from AxisPainter display units to AxisHandler units. Axes which wish to display non-system units must override this method to provide a new mapping.
        Parameters:
        value - a value in system units.
        Returns:
        the corresponding value in axis units.
      • toAxisUnits

        double toAxisUnits​(double value)
        Converts from AxisHandler units to AxisPainter display units. Axes which wish to display non-system units must override this method to provide a new mapping.
        Parameters:
        value - a value in system units.
        Returns:
        the corresponding value in axis units.