[]
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);
doubledoublevoidsetCustomMaxScaleValue(double value) voidsetCustomMinScaleValue(double value) voidsetMaxScaleType(SparkScale value) voidsetMinScaleType(SparkScale value) 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();
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);
value - The custom maximum value for the sparkline vertical axis.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();
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);
value - The custom minimum value for the sparkline vertical axis.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();
SparkScale value that specifies how the maximum value of the sparkline vertical axis is scaled for 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);
value - The maximum vertical axis scaling type.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();
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);
value - The minimum vertical axis scaling type.