import type { ChartModelBase } from "../../chart-model/chart-model-base.js";

/** Adds support for configuring whether negative values stack against the baseline. */
export abstract class WithNegativeValuesStackedToBaseline extends ChartModelBase {
  /**
   * Specify how negative values are treated in stacked series.
   *
   * **Note:** If true, negative values will be stacked on the base line. If false, negative values will be stacked in relation to their previous values in the stack.
   *
   * @param seriesIndex - The index of the series.
   */
  isNegativeValuesStackedToBaseline(seriesIndex: number): boolean;
  /**
   * Specify how negative values are treated in stacked series.
   *
   * **Note:** If true, negative values will be stacked on the base line. If false, negative values will be stacked in relation to their previous values in the stack.
   *
   * @param stackNegativeValuesToBaseline - `true` if negative values should be stacked on the base line, `false` otherwise.
   * @param seriesIndex - The index of the series.
   */
  setNegativeValuesStackedToBaseline(stackNegativeValuesToBaseline: boolean, seriesIndex: number): void;
}