[]
Use this interface to access horizontal axis settings for a sparkline group, such as the axis color, whether the axis uses date-based values, and whether points are plotted in right-to-left order. Instances are typically obtained from ISparkAxes.getHorizontal().
worksheet.getRange("A1:C1").setValue(new Object[] {1, 3, 2});
ISparklineGroup sparklineGroup = worksheet.getRange("D1").getSparklineGroups().add(SparkType.Line, "A1:C1");
ISparkHorizontalAxis horizontalAxis = sparklineGroup.getAxes().getHorizontal();
ISparkColor axisColor = horizontalAxis.getAxis();
horizontalAxis.setRightToLeftPlotOrder(true);
getAxis()ISparkColor object that specifies the color and visibility of the horizontal axis of the sparkline.booleanbooleanvoidsetRightToLeftPlotOrder(boolean value) ISparkColor object that specifies the color and visibility of the horizontal axis of the sparkline. Use the returned ISparkColor object to access and modify the horizontal axis color and visibility settings for the sparkline group.
worksheet.getRange("A1:A4").setValue(new Object[][] {{1}, {3}, {2}, {4}});
ISparklineGroup group = worksheet.getRange("B1").getSparklineGroups().add(SparkType.Line, "A1:A4");
ISparkHorizontalAxis horizontalAxis = group.getAxes().getHorizontal();
ISparkColor axisColor = horizontalAxis.getAxis();
axisColor.getColor().setColor(Color.GetRed());
axisColor.setVisible(true);
ISparkColor object that specifies the color and visibility of the horizontal axis of the sparkline.Returns true when the sparkline group uses a date range for its horizontal axis.
worksheet.getRange("A1:A4").setValue(new Object[][] {{2}, {5}, {3}, {6}});
worksheet.getRange("C1:C4").setValue(new Object[][] {{"2024/1/1"}, {"2024/1/3"}, {"2024/1/6"}, {"2024/1/10"}});
ISparklineGroup group = worksheet.getRange("B1").getSparklineGroups().add(SparkType.Line, "A1:A4");
group.setDateRange("C1:C4");
ISparkHorizontalAxis horizontalAxis = group.getAxes().getHorizontal();
boolean isDateAxis = horizontalAxis.getIsDateAxis();
true if the horizontal axis of the sparkline is based on date values; otherwise, false.Returns true when points on the sparkline horizontal axis are plotted from right to left instead of the default left-to-right order.
worksheet.getRange("A1:A4").setValue(new Object[][] {{1}, {3}, {2}, {4}});
ISparklineGroup group = worksheet.getRange("B1").getSparklineGroups().add(SparkType.Line, "A1:A4");
ISparkHorizontalAxis horizontalAxis = group.getAxes().getHorizontal();
boolean rightToLeft = horizontalAxis.getRightToLeftPlotOrder();
true if the points on the horizontal axis are plotted in right-to-left order; otherwise, false.Set value to true to plot points on the sparkline horizontal axis from right to left instead of the default left-to-right order.
worksheet.getRange("A1:A4").setValue(new Object[][] {{1}, {3}, {2}, {4}});
ISparklineGroup group = worksheet.getRange("B1").getSparklineGroups().add(SparkType.Line, "A1:A4");
ISparkHorizontalAxis horizontalAxis = group.getAxes().getHorizontal();
horizontalAxis.setRightToLeftPlotOrder(true);
value - true if the points on the horizontal axis are plotted in right-to-left order; otherwise, false.