Class Scale

  • All Implemented Interfaces:
    HasLabels, IsDefaultScale
    Direct Known Subclasses:
    ExtendedScale

    public class Scale
    extends AbstractScale
    Scales are an integral part of a chart.
    They are used to determine how data maps to a pixel value on the chart.
    • linear
    • logarithmic
    • category
    • time
    • time series
    • radial linear

    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • Scale

        protected Scale​(IsDefaultScale defaultValues,
                        NativeObject nativeObject)
        Creates the object only with default provider and native object.
        This is used when the scale is read by Scales.
        Parameters:
        defaultValues - default provider instance.
        nativeObject - native object to store properties.
      • Scale

        protected Scale​(AxisType type,
                        IsDefaultScale defaultValues,
                        NativeObject nativeObject)
        Creates the object only with aixs type, default provider and native object.
        This is used when the default scale is read by Defaults.getScale(AxisType).
        Parameters:
        type - scale type
        defaultValues - default provider instance.
        nativeObject - native object to store properties.
    • Method Detail

      • getId

        public final ScaleId getId()
        Returns the id of scale.
        It is usually used to link data sets and scale axes together.
        This is especially needed if multi-axes charts are used.
        Returns:
        The ID is used to link data sets and scale axes together or DefaultScaleId.UNKNOWN if not set
      • getType

        public final AxisType getType()
        Returns the type of axis.
        Returns:
        the type of axis.
      • getAxis

        public final AxisKind getAxis()
        Which kind of axis this is.
        Possible values are: ''x', 'y' or 'r'.
        Returns:
        the kind of axis.