[]
        
(Showing Draft Content)

ISparkVerticalAxis

Interface ISparkVerticalAxis


public interface ISparkVerticalAxis
Represents the settings for the vertical axes of a group of sparklines.

Use this interface to configure the minimum and maximum scale behavior for sparkline vertical axes, including custom axis bounds and scaling options relative to other sparklines in the same group.


 worksheet.getRange("A1:A3").setValue(new Object[][] {{10}, {-5}, {20}});
 ISparklineGroup sparklineGroup = worksheet.getRange("B1:B3").getSparklineGroups().add(SparkType.Line, "A1:A3");
 ISparkVerticalAxis verticalAxis = sparklineGroup.getAxes().getVertical();
 verticalAxis.setCustomMinScaleValue(-10);
 verticalAxis.setCustomMaxScaleValue(25);
 
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Gets the custom maximum value for the vertical axis of a sparkline.
    double
    Gets the custom minimum value for the vertical axis of a sparkline.
    Gets how the maximum value of the vertical axis of the sparkline is scaled relative to other sparklines in the group.
    Gets how the minimum value of the vertical axis of the sparkline is scaled relative to other sparklines in the group.
    void
    setCustomMaxScaleValue(double value)
    Sets the custom maximum value for the vertical axis of a sparkline.
    void
    setCustomMinScaleValue(double value)
    Sets the custom minimum value for the vertical axis of a sparkline.
    void
    Sets how the maximum value of the vertical axis of the sparkline is scaled relative to other sparklines in the group.
    void
    Sets how the minimum value of the vertical axis of the sparkline is scaled relative to other sparklines in the group.
  • Method Details

    • getCustomMaxScaleValue

      double getCustomMaxScaleValue()
      Gets the custom maximum value for the vertical axis of a sparkline.

      Use this method to retrieve the manual maximum axis value after the maximum scale type has been set to SparkScale.SparkScaleCustom.

      
       worksheet.getRange("A1:A4").setValue(new Object[][] {{2}, {5}, {3}, {7}});
       ISparklineGroup group = worksheet.getRange("B1").getSparklineGroups().add(SparkType.Line, "A1:A4");
       ISparkVerticalAxis verticalAxis = group.getAxes().getVertical();
       verticalAxis.setMaxScaleType(SparkScale.SparkScaleCustom);
       verticalAxis.setCustomMaxScaleValue(10);
       double maxScaleValue = verticalAxis.getCustomMaxScaleValue();
       
      Returns:
      The custom maximum value for the sparkline vertical axis.
    • setCustomMaxScaleValue

      void setCustomMaxScaleValue(double value)
      Sets the custom maximum value for the vertical axis of a sparkline.

      Use this method to set the manual maximum axis value after the maximum scale type has been set to SparkScale.SparkScaleCustom.

      
       worksheet.getRange("A1:A4").setValue(new Object[][] {{2}, {5}, {3}, {7}});
       ISparklineGroup group = worksheet.getRange("B1").getSparklineGroups().add(SparkType.Line, "A1:A4");
       ISparkVerticalAxis verticalAxis = group.getAxes().getVertical();
       verticalAxis.setMaxScaleType(SparkScale.SparkScaleCustom);
       verticalAxis.setCustomMaxScaleValue(10);
       
      Parameters:
      value - The custom maximum value for the sparkline vertical axis.
    • getCustomMinScaleValue

      double getCustomMinScaleValue()
      Gets the custom minimum value for the vertical axis of a sparkline.

      Use this method to retrieve the manual minimum axis value after the minimum scale type has been set to SparkScale.SparkScaleCustom.

      
       worksheet.getRange("A1:A4").setValue(new Object[][] {{2}, {5}, {3}, {7}});
       ISparklineGroup group = worksheet.getRange("B1").getSparklineGroups().add(SparkType.Line, "A1:A4");
       ISparkVerticalAxis verticalAxis = group.getAxes().getVertical();
       verticalAxis.setMinScaleType(SparkScale.SparkScaleCustom);
       verticalAxis.setCustomMinScaleValue(1);
       double minScaleValue = verticalAxis.getCustomMinScaleValue();
       
      Returns:
      The custom minimum value for the sparkline vertical axis.
    • setCustomMinScaleValue

      void setCustomMinScaleValue(double value)
      Sets the custom minimum value for the vertical axis of a sparkline.

      Use this method to set the manual minimum axis value after the minimum scale type has been set to SparkScale.SparkScaleCustom.

      
       worksheet.getRange("A1:A4").setValue(new Object[][] {{2}, {5}, {3}, {7}});
       ISparklineGroup group = worksheet.getRange("B1").getSparklineGroups().add(SparkType.Line, "A1:A4");
       ISparkVerticalAxis verticalAxis = group.getAxes().getVertical();
       verticalAxis.setMinScaleType(SparkScale.SparkScaleCustom);
       verticalAxis.setCustomMinScaleValue(1);
       
      Parameters:
      value - The custom minimum value for the sparkline vertical axis.
    • getMaxScaleType

      SparkScale getMaxScaleType()
      Gets how the maximum value of the vertical axis of the sparkline is scaled relative to other sparklines in the group.

      Use this method to determine whether the sparkline group's vertical axis maximum is calculated per sparkline, shared across the group, or defined by a custom value through setCustomMaxScaleValue(double).

      
       worksheet.getRange("A1:A4").setValue(new Object[][] {{2}, {5}, {3}, {7}});
       ISparklineGroup group = worksheet.getRange("B1").getSparklineGroups().add(SparkType.Line, "A1:A4");
       ISparkVerticalAxis verticalAxis = group.getAxes().getVertical();
       verticalAxis.setMaxScaleType(SparkScale.SparkScaleGroup);
       SparkScale maxScaleType = verticalAxis.getMaxScaleType();
       
      Returns:
      The SparkScale value that specifies how the maximum value of the sparkline vertical axis is scaled for the group.
    • setMaxScaleType

      void setMaxScaleType(SparkScale value)
      Sets how the maximum value of the vertical axis of the sparkline is scaled relative to other sparklines in the group.

      Use SparkScale.SparkScaleGroup, SparkScale.SparkScaleSingle, or SparkScale.SparkScaleCustom to control whether the maximum axis value is shared by the sparkline group, calculated for each sparkline, or defined by a custom value.

      
       worksheet.getRange("A1:A4").setValue(new Object[][] {{2}, {5}, {3}, {7}});
       ISparklineGroup group = worksheet.getRange("B1").getSparklineGroups().add(SparkType.Line, "A1:A4");
       ISparkVerticalAxis verticalAxis = group.getAxes().getVertical();
       verticalAxis.setMaxScaleType(SparkScale.SparkScaleGroup);
       
      Parameters:
      value - The maximum vertical axis scaling type.
    • getMinScaleType

      SparkScale getMinScaleType()
      Gets how the minimum value of the vertical axis of the sparkline is scaled relative to other sparklines in the group.

      The returned SparkScale value indicates whether the minimum axis value is shared by the sparkline group, calculated for each sparkline, or defined by a custom value.

      
       worksheet.getRange("A1:A4").setValue(new Object[][] {{2}, {5}, {3}, {7}});
       ISparklineGroup group = worksheet.getRange("B1").getSparklineGroups().add(SparkType.Line, "A1:A4");
       ISparkVerticalAxis verticalAxis = group.getAxes().getVertical();
       verticalAxis.setMinScaleType(SparkScale.SparkScaleGroup);
       SparkScale minScaleType = verticalAxis.getMinScaleType();
       
      Returns:
      The minimum vertical axis scaling type.
    • setMinScaleType

      void setMinScaleType(SparkScale value)
      Sets how the minimum value of the vertical axis of the sparkline is scaled relative to other sparklines in the group.

      Use SparkScale.SparkScaleGroup, SparkScale.SparkScaleSingle, or SparkScale.SparkScaleCustom to control whether the minimum axis value is shared by the sparkline group, calculated for each sparkline, or defined by a custom value.

      
       worksheet.getRange("A1:A4").setValue(new Object[][] {{2}, {5}, {3}, {7}});
       ISparklineGroup group = worksheet.getRange("B1").getSparklineGroups().add(SparkType.Line, "A1:A4");
       ISparkVerticalAxis verticalAxis = group.getAxes().getVertical();
       verticalAxis.setMinScaleType(SparkScale.SparkScaleGroup);
       
      Parameters:
      value - The minimum vertical axis scaling type.