declare module "@univerjs-pro/engine-chart" {
  import type { Nullable } from "@univerjs/core";

  /**
   * The chart types.
   */
  enum ChartTypeBits {
      /**
       * No chart type
       */
      None = 0,
      /**
       *  Line chart
       */
      Line = 2,
      /**
       * column chart
       */
      Column = 4,
      /**
       * Stacked column chart
       */
      ColumnStacked = 1073741828,
      /**
       * Percent stacked column chart
       */
      ColumnPercentStacked = 1610612740,
      /**
       * Bar chart
       */
      Bar = 268435460,
      /**
       * Stacked bar chart
       */
      BarStacked = 1342177284,
      /**
       * Percent stacked bar chart
       */
      BarPercentStacked = 1879048196,
      /** Pie chart */
      Pie = 8,
      /**
       * Doughnut chart
       */
      Doughnut = 264,
      /** Area chart */
      Area = 16,
      /**
       * Stacked area chart
       */
      AreaStacked = 1073741840,
      /**
       * Percent stacked area chart
       */
      AreaPercentStacked = 1610612752,
      /** Radar chart */
      Radar = 32,
      /** Scatter chart */
      Scatter = 64,
      /** Combination chart */
      Combination = 128,
      /** Word cloud chart */
      WordCloud = 512,
      /**funnel */
      Funnel = 1024,
      /** Bubble chart */
      Bubble = 2048,
      /** Relationship diagram */
      Relation = 4096,
      /** Waterfall chart */
      Waterfall = 8192,
      /** Pareto chart */
      Pareto = 16384,
      /** Sankey chart */
      Sankey = 32768,
      Heatmap = 65536,
      Boxplot = 131072
  }

  enum CategoryType {
      Linear = "Linear",
      Text = "Text",
      Date = "Date"
  }

  enum InvalidValueType {
      Zero = "zero",
      Break = "break",
      Link = "link"
  }

  enum LabelAlignEnum {
      Left = "left",
      Right = "right",
      Center = "center"
  }

  enum AxisAlignEnum {
      Start = "start",
      Center = "center",
      End = "end"
  }

  /**
   * The position of the title.
   */
  enum TitlePositionEnum {
      /**
       * The chart title is displayed at the top of the chart.
       */
      Top = "top",
      /**
       * The chart title is displayed at the left of the chart
       */
      Left = "left",
      /**
       * The chart title is displayed at the right of the
       */
      Right = "right",
      /**
       * The chart title is displayed at the bottom of the
       */
      Bottom = "bottom",
      /**
       * The chart title is hidden.
       */
      Hide = "hide"
  }

  /**
   * The position of the legend.
   */
  enum LegendPositionEnum {
      /**
       * The legend is displayed at the top of the chart.
       */
      Top = "top",
      /**
       * The legend is displayed at the left of the chart.
       */
      Left = "left",
      /**
       * The legend is displayed at the right of the chart.
       */
      Right = "right",
      /**
       * The legend is displayed at the bottom of the chart.
       */
      Bottom = "bottom",
      /**
       * The legend is hidden.
       */
      Hide = "hide"
  }

  /**
   * The selection mode of the legend.
   */
  enum SelectModeEnum {
      /**
       * The single selection mode.
       */
      Single = "single",
      /**
       * The multiple selection
       */
      Multiple = "multiple",
      /**
       * The close selection mode.It means the legend can not be selected.
       */
      Close = "close"
  }

  enum SeriesLabelPosition {
      Auto = "auto",
      Top = "top",
      Bottom = "bottom",
      Left = "left",
      Right = "right",
      Inside = "inside",
      Outside = "outside"
  }

  enum PieLabelPosition {
      Inside = "inside",
      Outside = "outside"
  }

  enum RadarShape {
      Polygon = "polygon",
      Circle = "circle"
  }

  /**
   * The border type of the chart series.
   */
  enum ChartBorderDashType {
      /**
       * The solid line.
       */
      Solid = "solid",
      /**
       * The dashed line.
       */
      Dashed = "dashed",
      /**
       * The dotted line.
       */
      Dotted = "dotted"
  }

  /**
   * Enum representing different shapes for line chart data points or radar chart points.
   */
  enum LinePointShape {
      /**
       * The circle shape.
       */
      Circle = "circle",
      /**
       * The square shape.
       */
      Square = "square",
      /**
       * The triangle shape.
       */
      Triangle = "triangle",
      /**
       * The diamond shape.
       */
      Diamond = "diamond",
      /**
       * The rectangle shape.
       */
      Rect = "rect",
      /**
       * The rounded rectangle shape.
       */
      RoundRect = "roundRect",
      /**
       * The pin shape.
       */
      Pin = "pin",
      /**
       * The arrow shape.
       */
      Arrow = "arrow",
      /**
       * No shape.
       */
      None = "none",
      /**
       * The empty circle shape.
       */
      EmptyCircle = "emptyCircle",
      /**
       * The empty square shape.
       */
      EmptySquare = "emptySquare",
      /**
       * The empty triangle shape.
       */
      EmptyTriangle = "emptyTriangle",
      /**
       * The empty diamond shape.
       */
      EmptyDiamond = "emptyDiamond",
      /**
       * The empty rectangle shape.
       */
      EmptyRect = "emptyRect",
      /**
       * The empty rounded rectangle shape.
       */
      EmptyRoundRect = "emptyRoundRect",
      /**
       * The empty pin shape.
       */
      EmptyPin = "emptyPin",
      /**
       * The empty arrow shape.
       */
      EmptyArrow = "emptyArrow"
  }

  enum AreaLineStyle {
      Line = "line",
      Smooth = "smooth",
      Step = "step"
  }

  type OptionDataValue = string | number | Date | null | undefined;

  interface IChartDataCategory {
      index: number;
      name: string;
      type: CategoryType;
      useDateAxis: boolean;
      items: IChartDataItem[];
      keys: string[];
  }

  interface IChartDataSeries {
      index: number;
      name: string;
      items: IChartDataItem[];
  }

  interface IChartDataItem {
      value: OptionDataValue;
      label: string;
  }

  interface ILabelStyle {
      visible: boolean;
      content: string;
      fontSize: number;
      color: string;
      align: LabelAlignEnum;
      bold: boolean;
      family: string;
      strikethrough: boolean;
      italic: boolean;
      underline: boolean;
      padAngle: boolean;
      axisTitleAlign?: AxisAlignEnum | undefined;
      showMaxLabel?: boolean;
      showMinLabel?: boolean;
      rotate?: number;
  }

  interface IGridLineStyle {
      visible: boolean;
      color: string;
      width: number;
  }

  interface IAxisOptions {
      lineVisible: boolean;
      label: Omit<ILabelStyle, 'align' | 'content'>;
      lineStyle: IGridLineStyle;
      gridLine: IGridLineStyle;
      tick: {
          visible: boolean;
          lineWidth: number;
          lineColor: string;
          length: number;
          position: PieLabelPosition;
      };
      reverse?: boolean;
      min?: number | null;
      max?: number | null;
      format?: string;
  }

  interface ISeriesLabelStyle extends ILabelStyle {
      contentType: number;
      position: SeriesLabelPosition;
  }

  interface IPointStyle {
      shape: LinePointShape;
      size: number;
      color: Nullable<string>;
  }

  interface IDataPointStyle extends IPointStyle {
  }

  interface ISeriesStyle {
      chartType?: ChartTypeBits.Line | ChartTypeBits.Column | ChartTypeBits.Area;
      /** Compatibility switch for placing this series on the secondary vertical axis. It does not change the yAxis/rightYAxis option bucket semantics. */
      rightYAxis?: boolean;
      color: Nullable<string>;
      fillOpacity: number;
      border: {
          opacity: number;
          color: Nullable<string>;
          width: number;
          dashType: ChartBorderDashType;
      };
      label: ISeriesLabelStyle;
      point: IPointStyle;
      dataPoints: {
          [index: number]: IDataPointStyle;
      };
      waterfall: {
          positive: ISeriesStyle & {
              name: string;
          };
          negative: ISeriesStyle & {
              name: string;
          };
          subtotal: ISeriesStyle & {
              name: string;
          };
      };
  }

  interface IAllSeriesStyle extends Pick<ISeriesStyle, 'border' | 'label' | 'rightYAxis' | 'point' | 'color' | 'waterfall'> {
  }
}

declare module "@univerjs-pro/sheets-chart" {
  import type { IRange } from "@univerjs/core";

  interface IChartSourceRangeItem {
      range: IRange;
      subUnitId: string;
      unitId: string;
  }

  interface ISheetChartSourceSingleRange {
      rangeInfo: IChartSourceRangeItem;
      isRowDirection?: boolean;
  }
}

declare module "@univerjs-pro/sheets-chart/facade" {
  import type { AreaLineStyle, AxisAlignEnum, ChartBorderDashType, ChartTypeBits, IAllSeriesStyle, IAxisOptions, IChartDataCategory, IChartDataSeries, ISeriesStyle, InvalidValueType, LabelAlignEnum, LegendPositionEnum, LinePointShape, RadarShape, SelectModeEnum, TitlePositionEnum } from "@univerjs-pro/engine-chart";

  import type { ISheetChartSourceSingleRange } from "@univerjs-pro/sheets-chart";

  import type { IRange } from "@univerjs/core";

  /**
   * The chart builder info.
   */
  interface IChartBuilderInfo {
      /**
       * @property {string} unitId The workbook id where the chart is located.
       */
      unitId: string;
      /**
       * @property {string} subUnitId The worksheet id where the chart is located.
       */
      subUnitId: string;
      /**
       * @property {string} chartId The id of the chart.
       */
      chartId: string;
      /**
       * @property {IRange} range The data source range of the chart.
       */
      range: IRange | undefined;
      /**
       * @property {string} sourceSheetName The name of the worksheet which the data source range of the chart belongs to.
       * If not set, the data source range is in the current active worksheet.
       */
      sourceSheetName: string | undefined;
      /**
       * @property {number} x The x-coordinate of the chart.
       */
      x: number;
      /**
       * @property {number} y The y-coordinate of the chart.
       */
      y: number;
      /**
       * @property {number} width The width of the chart.
       */
      width: number;
      /**
       * @property {number} height The height of the chart.
       */
      height: number;
      /**
       * @property {ChartTypeBits} chartType The type of the chart.
       */
      chartType: ChartTypeBits;
      /**
       * @property {IChartBuildOptions} options The options of the chart.
       */
      options: IChartBuildOptions;
      /**
       * @property {boolean} isRowDirection Whether to read the data in the range as row direction.
       */
      isRowDirection: boolean;
  }

  /**
   * The chart text style.
   */
  interface IChartTextStyle {
      /**
       * @property {string} [titleContent] The content of the chart title.
       */
      content?: string;
      /**
       * @property {number} [font] The font family for the chart title.
       */
      font?: number;
      /**
       * @property {number} [fontSize] The font size for the chart title.
       */
      fontSize?: number;
      /**
       * @property {string} [fontColor] The font color for the chart title.
       */
      fontColor?: string;
      /**
       * @property {string} [fontStyle] The font style for the chart title.
       */
      fontStyle?: string;
      /**
       * @property {boolean} [bold] The font is bold.
       */
      bold?: boolean;
      /**
       * @property {AxisAlignEnum} [axisAlignment] The alignment of the chart axis.The possible values are 'start', 'center' & 'end'.
       */
      axisAlignment?: AxisAlignEnum;
  }

  /**
   * The chart build options.
   */
  interface IChartBuildOptions {
      /**
       * @property {string} [title] The title of the chart.
       */
      title?: {
          /**
           * @property {string} [titlePosition] The position of the chart title.
           */
          position?: TitlePositionEnum;
          /**
           * @property {string} [titleAlignment] The alignment of the chart title.The possible values are 'left', 'center' & 'right'.
           */
          titleAlignment: LabelAlignEnum;
      } & IChartTextStyle;
      /**
       * @property {string} [legend] The legend of the chart.
       */
      legend?: {
          /**
           * @property {string} [legendPosition] The position of the legend.The possible values are 'top', 'bottom', 'left', 'right' & 'hide'.
           */
          position?: LegendPositionEnum;
          /**
           * @property {number} [fontSize] The font size of the legend.
           */
          fontSize?: number;
          /**
           * @property {string} [color] The font color of the legend.
           */
          color?: string;
          /**
           * @property {string} [bold] The font style of the legend.
           */
          bold?: boolean;
          /**
           * @property {string} [italic] The font weight of the legend.
           */
          italic?: boolean;
          /**
           * @property {SelectModeEnum} [selectMode] The select mode of the legend.The possible values are 'single', 'multiple' & 'close'.
           */
          selectMode?: SelectModeEnum;
      };
      /**
       * @property {string} [xAxisTitle] The x-axis title of the chart.
       *
       * @example
       * ```ts
       * chartBuilder.setOptions('xAxisTitle.content', 'xAxis Title text')
       * .setOptions('xAxisTitle.font', 1)
       * .setOptions('xAxisTitle.fontSize', 12)
       * .setOptions('xAxisTitle.fontColor', '#ff0000')
       * .build();
       * ```
       */
      xAxisTitle?: IChartTextStyle;
      /**
       * @property {string} [rightYAxisTitle] The right y-axis title of the chart.
       */
      yAxisTitle?: IChartTextStyle;
      /**
       * @property {string} [rightYAxisTitle] The right y-axis title of the chart.
       */
      rightYAxisTitle?: IChartTextStyle;
      /**
       * @property {IAxisOptions} [xAxis] The x-axis option of the chart.
       */
      xAxis?: IAxisOptions;
      /**
       * @property {IAxisOptions} [yAxis] The y-axis option of the chart.
       */
      yAxis?: IAxisOptions;
      /**
       * @property {IAxisOptions} [yRightAxis] The right y-axis option of the chart.
       */
      yRightAxis?: IAxisOptions;
      /**
       * The axis pointer of the chart.
       */
      axisPointer?: {
          /**
           * @property {string} [indicatorLineType] The line type of the axis pointer.
           */
          indicatorLineType?: string;
          /**
           * @property {ChartBorderDashType} [indicatorLineColor] The line color of the axis pointer.The maybe values are 'solid', 'dotted', 'dashed'.
           */
          indicatorLineColor?: ChartBorderDashType;
          /**
           * @property {string} [indicatorLabelColor] The line width of the axis pointer.
           */
          indicatorLabelColor?: string;
          /**
           * @property {string} [indicatorLabelTextColor] The font color of the axis pointer.
           */
          indicatorLabelTextColor?: string;
      };
      /**
       * @property {IAllSeriesStyle} [allSeriesStyle] The style of all series.
       */
      allSeriesStyle?: Partial<IAllSeriesStyle>;
      /**
       * @property {string} [seriesStyleMap] The style of the series.
       */
      seriesStyleMap?: {
          [id: string]: ISeriesStyle;
      };
      /**
       * @property {string} [area] The area of line/area chart.
       */
      area?: {
          lineStyle: AreaLineStyle;
      };
      /**
       * @property {string} [backgroundColor] The background color of the chart.
       */
      backgroundColor?: string;
      /**
       * @property {string} [borderColor] The border color of the chart.
       */
      borderColor?: string;
      /**
       * @property {boolean} [gradientFill] Whether to fill the chart with a gradient.
       */
      gradientFill?: boolean;
      /**
       * @property {string} [theme] The theme of the chart.
       */
      theme?: string;
      /**
       * @property {InvalidValueType} [invalidValueType] The invalid value type of the chart.
       */
      invalidValueType?: InvalidValueType;
      /**
       * @property {RadarShape} [radar] The radar of the chart.
       */
      radar?: {
          /**
           * @property {RadarShape} [shape] The shape of the radar chart.
           */
          shape?: RadarShape;
          /**
           * @property {boolean} [fill] True if the radar chart is filled; false otherwise.
           */
          fill?: boolean;
      };
  }

  /**
   * The base class for chart builder.The chart builder is used to create a chart in the sheet.For line chart , radar chart and pie chart, you use the LineChartBuilder, RadarChartBuilder and PieChartBuilder classes respectively.
   * @ignore
   * @hideconstructor
   */
  class FChartBuilderBase {
      /**
       * @property {string} unitId The workbook id where the chart is located.
       */
      unitId: string;
      /**
       * @property {string} subUnitId The worksheet id where the chart is located.
       */
      subUnitId: string;
      /**
       * @property {string} chartId The id of the chart.
       */
      chartId: string;
      /**
       * @property {IRange} range The data source range of the chart.
       */
      range: IRange | undefined;
      /**
       * @property {string} sourceSheetName The name of the worksheet which the data source range of the chart belongs to.
       * If not set, the data source range is in the current active worksheet.
       */
      sourceSheetName: string | undefined;
      /**
       * @property {number} x The x-coordinate of the chart.
       */
      x: number;
      /**
       * @property {number} y The y-coordinate of the chart.
       */
      y: number;
      /**
       * @property {number} width The width of the chart.
       */
      width: number;
      /**
       * @property {number} height The height of the chart.
       */
      height: number;
      /**
       * @property {ChartTypeBits} chartType The type of the chart.
       */
      chartType: ChartTypeBits;
      /**
       * @property {IChartBuildOptions} options The options of the chart.
       */
      options: IChartBuildOptions;
      /**
       * @property {boolean} transposeRowsAndColumns Whether to read the data in the range as row direction.
       */
      transposeRowsAndColumns: boolean;
      /**
       * Gets the chart type of the chart this builder modifies.
       * @description The chart type of the chart this builder modifies. The chart type (ChartTypeBits) can be found from package @univerjs-pro/sheets-chart.
       * Please pay attention to the type of the chart you are creating,  a Pie chart have a property of Doughnut is donut chart, and a Pie chart have a property of Rose is rose pie chart.But the chart builder will not change the chart type to the corresponding chart type.
       * @returns {ChartTypeBits} ChartType - The chart type of the chart this builder modifies.
       */
      getChartType(): ChartTypeBits;
      /**
       * Adds a range to the chart this builder modifies
       * @param {IRange | string} range The range string or object to add for chart source data.The should be not a single cell.
       * @returns {FChartBuilderBase} -this builder, for chaining
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      addRange(range: IRange | string): this;
      /**
       * Clears the range from the chart this builder modifies
       * @returns {FChartBuilderBase} -this builder, for chaining
       */
      clearRange(): this;
      /**
       * Sets the position, changing where the chart appears on the sheet. anchorRowPos and anchorColPos are 0-indexed.This api can only work in the active sheet.
       * @description The chart's start anchor position is the top left-hand corner of the chart. The rowOffset and columnOffset are the pixel offsets from the anchor position.
       * @param {number} anchorRowPos The chart's top side is anchored in this row.
       * @param {number} anchorColPos The chart's left side is anchored in this column.
       * @param {number} rowOffset The chart's top left-hand corner is offset by this many pixels.
       * @param {number} columnOffset The chart's lower left-hand corner is offset by this many pixels.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6
       * // The starting position is upper-left corner of cell F3 and offset 20 pixels to the right and down.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(2, 5, 20, 20)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setPosition(anchorRowPos: number, anchorColPos: number, rowOffset: number, columnOffset: number): this;
      /**
       * Sets the position, changing where the chart appears on the sheet by pixel.
       * @description The chart's start anchor position is the top left-hand corner of the chart. This api is opposite to setPosition.
       * @param {number} x The x-coordinate of the chart's top left-hand corner.
       * @param {number} y The y-coordinate of the chart's top left-hand corner.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6
       * // The starting position is (100, 200) pixels from the top left-hand corner of the sheet.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setAbsolutePosition(100, 200)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setAbsolutePosition(x: number, y: number): this;
      /**
       * The type of chart to create.
       * @param {ChartTypeBits} chartType The type of chart to create.Which can be found from package @univerjs-pro/sheets-chart.
       * @description The type of chart to create. The following are the possible values: Line,Column,ColumnStacked,ColumnPercentStacked,Bar,BarStacked,BarPercentStacked,Pie,Doughnut,Area,AreaStacked,AreaPercentStacked,Radar,Scatter,Combination
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       *
       * // Get all charts on the active sheet.
       * const charts = fWorksheet.getCharts();
       *
       * // Update the first chart type to line after 3 seconds.
       * setTimeout(() => {
       *   const newChartInfo = fWorksheet.newChart(charts[0])
       *     .setChartType(univerAPI.Enum.ChartType.Line)
       *     .build();
       *   fWorksheet.updateChart(newChartInfo);
       * }, 3000);
       * ```
       */
      setChartType(chartType: ChartTypeBits): this;
      /**
       * Sets the width of the chart in pixels.
       * @param {number} width The width of the chart in pixels.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * // The width of the chart is 600 and the height is 400.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setWidth(600)
       *   .setHeight(400)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setWidth(width: number): this;
      /**
       * Sets the height of the chart in pixels.
       * @param {number} height The height of the chart in pixels.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * // The width of the chart is 600 and the height is 400.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setWidth(600)
       *   .setHeight(400)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setHeight(height: number): this;
      /**
       * The options for the chart. This function will overwrite  existing options and merge new options property.
       * @param {string} optionPath The path of the option to set. A '' path means the root of the options object.
       * @param {object|number|string} optionVal The value to set. Undefined value will be ignore , and null means delete the property.If a path is '', the value must be the whole options object.
       * @returns {FChartBuilderBase} The builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorkSheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorkSheet) return;
       * const chartBuilder = fWorkSheet.newChart().asPieChart();
       * const chartBuilderInfo1 = chartBuilder
       *   .addRange('A1:D6')
       *   .setOptions('title.content', 'Chart Title')
       *   .setOptions('legend.position', 'right')
       *   .setDoughnutHole(0.5)
       *   .setHasPaddingAngle(true)
       *   .setRosePie(true)
       *   .setIsHalfPie(true)
       *   .build();
       * // setOptions can be replaced by setOptions('', { ... })
       * const chartBuilderInfo2 = chartBuilder
       *   .addRange('A1:D6')
       *   .setOptions('', {
       *     "title": {
       *       "content": "Chart Title"
       *     },
       *     "legend": {
       *       "position": "right"
       *     },
       *     "pie": {
       *       "doughnutHole": 0.5,
       *       "hasPaddingAngle": true,
       *       "isHalfPie": true,
       *       "rosePie": true
       *     }
       *   })
       *   .build();
       * await fWorkSheet.insertChart(chartBuilderInfo1);
       * // or they are same effect
       * // await fWorkSheet.insertChart(chartBuilderInfo2);
       * ```
       */
      setOptions(optionPath: string, optionVal: unknown): this;
      /**
       * Sets whether to transpose the rows and columns of the chart.
       * @param {boolean} transposeRowsAndColumns Whether to transpose the rows and columns of the chart.The default value is false.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * // The chart will transpose the rows and columns.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   // the chart will transpose the rows and columns
       *   .setTransposeRowsAndColumns(true)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setTransposeRowsAndColumns(transposeRowsAndColumns: boolean): this;
      /**
       * Sets the theme of the chart. If the theme name not registered, a default theme will be used.
       * @param {string} theme The theme name of the chart.
       * @returns {{FChartBuilderBase}} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // register your theme
       * const theme = { // your theme object
       *   'version': 1,
       *   'themeName': 'myTheme',
       *   'theme': {
       *     // ... Some code is omitted for brevity
       *     color: [
       *       '#893448',
       *       '#d95850',
       *       '#eb8146',
       *       '#ffb248',
       *       '#f2d643',
       *       '#ebdba4'
       *     ],
       *     // ... Some code is omitted for brevity
       *     visualMapColor: [
       *       '#893448',
       *       '#d95850',
       *       '#eb8146',
       *       '#ffb248',
       *       '#f2d643',
       *       'rgb(247,238,173)'
       *     ],
       *     // ... Some code is omitted for brevity
       *     'axes': [
       *       // ... Some code is omitted for brevity
       *     ]
       *     // ... Some code is omitted for brevity
       *   }
       * };
       * fWorksheet.registerChartTheme('myTheme', theme);
       *
       * // use your theme for chart
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setTheme('myTheme')
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setTheme(theme: string): this;
      /**
       * Sets the title of the chart x-axis.
       * @param {string} title The title of the chart x-axis.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * // The x-axis title is 'xAxis Title text'.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setXAxisTitle('xAxis Title text')
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setXAxisTitle(title: string): this;
      /**
       * Sets the title of the chart y-axis.
       * @param {string} title The title of the chart y-axis.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * // The y-axis title is 'yAxis Title text'.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setYAxisTitle('yAxis Title text')
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setYAxisTitle(title: string): this;
      /**
       * Sets the title of the chart right y-axis.
       * @param {string} title The title of the chart right y-axis.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * // The right y-axis title is 'rightYAxis Title text'.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setRightYAxisTitle('rightYAxis Title text')
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setRightYAxisTitle(title: string): this;
      /**
       * Sets the text style for the chart x-axis.
       * @param {IChartTextStyle} textStyle The text style for the chart x-axis.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * // The x-axis style is set.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setXAxisTextStyle({
       *     content: 'xAxis Title text',
       *     fontSize: 12,
       *     fontColor: '#ff0000'
       *   })
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setXAxisTextStyle(textStyle: IChartTextStyle): this;
      /**
       * Sets the text style for the chart y-axis.
       * @param {IChartTextStyle} textStyle The text style for the chart y-axis.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * // The y-axis style is set.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setYAxisTextStyle({
       *     content: 'yAxis Title text',
       *     fontSize: 12,
       *     fontColor: '#ff0000'
       *   })
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setYAxisTextStyle(textStyle: IChartTextStyle): this;
      /**
       * Sets the text style for the chart right y-axis. Only works in charts have right y-axis.
       * @param {IChartTextStyle} textStyle The text style for the chart right y-axis.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * // The right y-axis style is set.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setRightYAxisTextStyle({
       *     content: 'rightYAxis Title text',
       *     fontSize: 12,
       *     fontColor: '#ff0000'
       *   })
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setRightYAxisTextStyle(textStyle: IChartTextStyle): this;
      /**
       * Sets how to handle invalid data in the chart.The possible values are 'zero', 'break' & 'link'.
       * @description The default value is 'zero'. It means that invalid data will be treated as zero. 'break' means that the chart will have a gap where the invalid data is. 'link' means that the chart will connect the data points on either side of the invalid data.
       * @param {InvalidValueType} invalidValueType The type of invalid value to use.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * // The invalid value is set as zero.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setInvalidValueStrategy('zero')
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setInvalidValueStrategy(invalidValueType: InvalidValueType): this;
      /**
       * Sets the axis pointer style
       * @param {IChartBuildOptions['axisPointer']} style The style for the axis pointer.
       * @typedef AxisPointerStyle
       * @property {string} [AxisPointerStyle.indicatorLabelColor] The line color of the axis pointer.
       * @property {string} [AxisPointerStyle.indicatorLabelTextColor] The font color of the axis pointer.
       * @property {ChartBorderDashType} [AxisPointerStyle.indicatorLineType] The line type of the axis pointer.
       * @property {string} [AxisPointerStyle.indicatorLineColor] The line width of the axis pointer.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * // The axis pointer style is set.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setAxisPointerStyle({
       *     indicatorLabelColor: '#ff0000',
       *     indicatorLineType: univerAPI.Enum.ChartBorderDashType.Solid,
       *     indicatorLineColor: '#00ff00',
       *     indicatorLabelTextColor: '#0000ff',
       *   })
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       *
       * // a AxisPointerStyle can be defined like following:
       * const chartInfo = fWorksheet.newChart().setOptions('axisPointer.indicatorLineColor', '#ff0000')
       *   .setOptions('axisPointer.indicatorLineType', univerAPI.Enum.ChartBorderDashType.Solid)
       *   .setOptions('axisPointer.indicatorLineColor', '#00ff00')
       *   .setOptions('axisPointer.indicatorLabelTextColor', '#0000ff')
       *   .build();
       * ```
       */
      setAxisPointerStyle(style: IChartBuildOptions['axisPointer']): this;
      /**
       * Sets styles for all series.
       * @typedef allSeriesStyle
       * @property {ChartTypeBits} [chartType] The chart type of the series.It only works in combination chart, and the value must be one of ChartTypeBits.Line | ChartTypeBits.Column | ChartTypeBits.Area;
       * @property {boolean} [rightYAxis] Use the right y-axis for the series.
       * @property {string} [color] The color of the series.
       * @property {number} [fillOpacity] The opacity of the series fill.
       * @property {object} [border] The border style of the series.
       * @property {string} [border.color] The color of the series border.
       * @property {number} [border.opacity] The opacity of the series border.
       * @property {number} [border.width] The width of the series border.
       * @property {ChartBorderDashType} [border.dashType] The dash type of the series border.
       * @property {ISeriesLabelStyle} [label] The label style of the series.
       * @property {IPointStyle} [point] The point style of the series.
       * @property {IDataPointStyle} [dataPoints] The data point style of the series.Radar chart does not support this property.
       * @param {allSeriesStyle} allSeriesStyle The style for all series.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * // The all series style is set.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setAllSeriesStyle({
       *     rightYAxis: false,
       *     color: '#ff0000',
       *     border: {
       *       color: '#00ff00',
       *       opacity: 0.5,
       *       width: 1,
       *       dashType: univerAPI.Enum.ChartBorderDashType.Solid,
       *     },
       *   })
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setAllSeriesStyle(allSeriesStyle: Partial<IAllSeriesStyle>): this;
      /**
       * Sets the series style by series index.
       * @description Like setALLSeriesStyle, this difference is the style only set for the provide sty
       * @param {number | string} index The index of the series to set the style for.
       * @param {ISeriesStyle} seriesStyle The style for the series.
       * @returns {FChartBuilderBase} -this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .build();
       * const fChart = await fWorksheet.insertChart(chartInfo);
       *
       * // Update the first series style after 3 seconds.
       * setTimeout(() => {
       *   const first = fChart.getSeriesData()[0];
       *   const newChartInfo = fWorksheet.newChart(fChart)
       *     .setSeriesStyle(first.index, {
       *       color: '#ff0000',
       *     })
       *     .build();
       *   fWorksheet.updateChart(newChartInfo);
       * }, 3000);
       * ```
       */
      setSeriesStyle(index: number | string, seriesStyle: ISeriesStyle): this;
      /**
       * Builds the chart to reflect all changes made to it.
       * @description This method does not automatically draw the chart on top of the spreadsheet. A new chart must be inserted via sheet.insertChart(chart), and an existing chart should be updated via sheet.updateChart(chart).
       * @returns {IChartBuilderInfo} -The chart builder info.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6
       * // The starting position is upper-left corner of cell B2.
       * // The width of the chart is 600 and the height is 400.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setWidth(600)
       *   .setHeight(400)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      build(): IChartBuilderInfo;
  }

  /**
   * The builder for creating a line chart.
   * @hideconstructor
   */
  class LineChartBuilder extends FChartBuilderBase {
      /**
       * @property {AreaLineStyle} lineStyle The line style of the line chart.
       */
      lineStyle: AreaLineStyle;
      /**
       * @property {LinePointShape} dataPointShape The shape of the data point in the line chart.
       */
      dataPointShape: LinePointShape;
      /**
       * @property {string} dataPointColor The color of the data point in the line chart.
       */
      dataPointColor: string;
      /**
       * @property {number} dataPointSize The size of the data point in the line chart.
       */
      dataPointSize: number;
      /**
       * The line style of the area chart.
       * @param {AreaLineStyle} lineStyle The line style of the line chart.
       * @returns {LineChartBuilder} - The builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart builder with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The line style is set to the step type.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setLineStyle('step')
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setLineStyle(lineStyle: AreaLineStyle): this;
      /**
       * The shape of the data point in the line chart.
       * @param {LinePointShape} dataPointShape The shape of the data point in the line chart.
       * @returns {LineChartBuilder} - The builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The data point shape is set to circle, color is red, and size is 10.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setDataPointShape(univerAPI.Enum.LinePointShape.Circle)
       *   .setDataPointColor('#ff0000')
       *   .setDataPointSize(10)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setDataPointShape(dataPointShape: LinePointShape): this;
      /**
       * The color of the data point in the line chart.
       * @param {string} dataPointColor The color of the data point in the line chart.
       * @returns {LineChartBuilder}  The builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The data point shape is set to circle, color is red, and size is 10.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setDataPointShape(univerAPI.Enum.LinePointShape.Circle)
       *   .setDataPointColor('#ff0000')
       *   .setDataPointSize(10)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setDataPointColor(dataPointColor: string): this;
      /**
       * The size of the data point in the line chart.
       * @param {number} dataPointSize The size of the data point in the line chart.
       * @returns {LineChartBuilder} The builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The data point shape is set to circle, color is red, and size is 10.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setDataPointShape(univerAPI.Enum.LinePointShape.Circle)
       *   .setDataPointColor('#ff0000')
       *   .setDataPointSize(10)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setDataPointSize(dataPointSize: number): this;
      /**
       * Builds the chart to reflect all changes made to it.
       * @description This method does not automatically draw the chart on top of the spreadsheet. A new chart must be inserted via sheet.insertChart(chart), and an existing chart should be updated via sheet.updateChart(chart).
       * @returns {IChartBuilderInfo} The chart builder info.
       *
       * @example
       * ```ts
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The line style is set to the step type.
       * // The data point shape is set to circle, color is red, and size is 10.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setLineStyle('step')
       *   .setDataPointShape(univerAPI.Enum.LinePointShape.Circle)
       *   .setDataPointColor('#ff0000')
       *   .setDataPointSize(10)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      build(): IChartBuilderInfo;
  }

  /**
   * The builder for creating a pie chart.
   * @hideconstructor
   */
  class PieChartBuilder extends FChartBuilderBase {
      doughnutHole: number;
      borderColor: string;
      hasPaddingAngle: boolean;
      isHalfPie: boolean;
      rosePie: boolean;
      showLabelLine: boolean;
      /**
       * Sets the size of the hole in the center of the pie chart as a percentage of the chart size.The value should be in the range 0-1.
       * @param {number} doughnutHole The size of the hole in the center of the pie chart as a percentage of the chart size.
       * @returns {PieChartBuilder} this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a pie chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The doughnut hole is set to 0.5.
       * const chartInfo = fWorksheet.newChart()
       *   .asPieChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setDoughnutHole(0.5)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setDoughnutHole(doughnutHole: number): this;
      /**
       * Sets the color of the border around the pie chart.
       * @param {string} borderColor The color of the border around the pie chart.
       * @returns {PieChartBuilder} this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a pie chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The border color is set to red.
       * const chartInfo = fWorksheet.newChart()
       *   .asPieChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setBorderColor('#ff0000')
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setBorderColor(borderColor: string): this;
      /**
       * Sets whether the pie chart has a padding angle.
       * @param {boolean} hasPaddingAngle True if the pie chart has a padding angle; false otherwise.
       * @returns {PieChartBuilder} this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a pie chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The pie chart has a padding angle.
       * const chartInfo = fWorksheet.newChart()
       *   .asPieChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setHasPaddingAngle(true)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setHasPaddingAngle(hasPaddingAngle: boolean): this;
      /**
       * Sets whether the pie chart is a half pie chart.
       * @param {boolean} isHalfPie True if the pie chart is a half pie chart; false otherwise.
       * @returns {PieChartBuilder} this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a pie chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The pie chart is a half pie chart.
       * const chartInfo = fWorksheet.newChart()
       *   .asPieChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setIsHalfPie(true)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setIsHalfPie(isHalfPie: boolean): this;
      /**
       * Sets whether the pie chart is a rose pie chart.
       * @param {boolean} rosePie True if the pie chart is a rose pie chart; false otherwise.
       * @returns {PieChartBuilder} this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a pie chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The pie chart is a rose pie chart.
       * const chartInfo = fWorksheet.newChart()
       *   .asPieChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setRosePie(true)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setRosePie(rosePie: boolean): this;
      /**
       * Sets whether the pie chart shows label lines.
       * @param {boolean} showLabelLine True if the pie chart shows label lines; false otherwise.
       * @returns {PieChartBuilder} this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a pie chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The pie chart does not show label lines.
       * const chartInfo = fWorksheet.newChart()
       *   .asPieChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setShowLabelLine(false)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setShowLabelLine(showLabelLine: boolean): this;
      /**
       * Builds the chart to reflect all changes made to it.
       * @description This method does not automatically draw the chart on top of the spreadsheet. A new chart must be inserted via sheet.insertChart(chart), and an existing chart should be updated via sheet.updateChart(chart).
       * @returns {IChartBuilderInfo} The chart builder info.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a pie chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The doughnut hole is set to 0.5.
       * // The border color is set to red.
       * // The pie chart has a padding angle.
       * // The pie chart is a half pie chart.
       * const chartInfo = fWorksheet.newChart()
       *   .asPieChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setDoughnutHole(0.5)
       *   .setBorderColor('#ff0000')
       *   .setHasPaddingAngle(true)
       *   .setIsHalfPie(true)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      build(): IChartBuilderInfo;
  }

  /**
   * The builder for creating a radar chart.
   *  @hideconstructor
   */
  class RadarChartBuilder extends FChartBuilderBase {
      /**
       * @property {RadarShape} shape The shape of the radar chart. The possible values are 'Polygon' and 'Circle'.
       */
      shape: RadarShape;
      /**
       * @property {boolean} fill True if the radar chart is filled; false otherwise.
       */
      fill: boolean;
      /**
       * Sets the shape of the radar chart.
       * @param {RadarShape} shape The shape of the radar chart.
       * @returns {RadarChartBuilder} this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a radar chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The shape of the radar chart is set to polygon and filled with red color.
       * const chartInfo = fWorksheet.newChart()
       *   .asRadarChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setShape(univerAPI.Enum.RadarShape.Polygon)
       *   .setFill(true)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setShape(shape: RadarShape): this;
      /**
       * Sets whether the radar chart is filled.
       * @param {boolean} fill True if the radar chart is filled; false otherwise.
       * @returns {RadarChartBuilder} this builder, for chaining.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a radar chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The shape of the radar chart is set to polygon and filled with red color.
       * const chartInfo = fWorksheet.newChart()
       *   .asRadarChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setShape(univerAPI.Enum.RadarShape.Polygon)
       *   .setFill(true)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      setFill(fill: boolean): this;
      /**
       * Builds the chart to reflect all changes made to it.
       * @description This method does not automatically draw the chart on top of the spreadsheet. A new chart must be inserted via sheet.insertChart(chart), and an existing chart should be updated via sheet.updateChart(chart).
       * @returns {IChartBuilderInfo} The chart builder info.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a radar chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The shape of the radar chart is set to polygon and filled with red color.
       * const chartInfo = fWorksheet.newChart()
       *   .asRadarChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setShape(univerAPI.Enum.RadarShape.Polygon)
       *   .setFill(true)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      build(): IChartBuilderInfo;
  }

  interface IPieChartBuilderMixin {
      asPieChart(): PieChartBuilder;
  }

  interface IRadarChartBuilderMixin {
      asRadarChart(): RadarChartBuilder;
  }

  interface ILineChartBuilderMixin {
      asLineChart(): LineChartBuilder;
  }

  interface IPieChartBuilderInfo {
      pie?: {
          doughnutHole: number;
          borderColor: string;
          hasPaddingAngle: boolean;
          isHalfPie: boolean;
          rosePie: boolean;
          showLabelLine: boolean;
      };
  }

  /**
   * The facade class for the chart.
   * @hideconstructor
   */
  class FChart {
      unitId: string;
      subUnitId: string;
      chartId: string;
      /**
       * Get the chart id.
       * @returns {string} The chart id.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       * const charts = fWorksheet.getCharts();
       * console.log(charts[0]?.getChartId());
       * ```
       */
      getChartId(): string;
      /**
       * Get the range of the chart.
       * @returns {ISheetChartSourceSingleRange|undefined} The range of the chart.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       * const charts = fWorksheet.getCharts();
       * console.log(charts[0]?.getRange());
       * ```
       */
      getRange(): ISheetChartSourceSingleRange | undefined;
      /**
       * Update the range info of the chart. The range info includes the range of the chart and the direction in source.
       * @param {ISheetChartSourceSingleRange} rangeInfo The new range of the chart.
       * @param {IRange} rangeInfo.range.range The new range of the chart.
       * @param {string} rangeInfo.range.subUnitId The new sheet id of the chart.
       * @param {string} rangeInfo.range.unitId The new workbook id of the chart.
       * @param {boolean} [rangeInfo.isRowDirection] Is treat row as category.
       * @returns {Promise<boolean>} Whether the update is successful.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Get all charts on the active sheet.
       * const charts = fWorksheet.getCharts();
       *
       * // Switch chart row direction
       * if (charts.length > 0){
       *   const rangeInfo = { ...charts[0].getRange() };
       *   rangeInfo.isRowDirection = !rangeInfo.isRowDirection;
       *   charts[0].updateRange(rangeInfo);
       * }
       * ```
       */
      updateRange(rangeInfo: ISheetChartSourceSingleRange): Promise<boolean>;
      /**
       * Get the series data list of the chart.
       * @typedef ChartSeriesData
       * @property {string} name The name of the series.
       * @property {number} index The index of the series.
       * @property {ChartSeriesItem[]} items The data of the series.
       * @property {number} items.value The value of the series.
       * @property {string} items.label The label of the series.
       * @returns {IChartDataSeries[]|undefined} The series data list of the chart.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       * const charts = fWorksheet.getCharts();
       * if (charts.length > 0){
       *   const seriesData = charts[0].getSeriesData();
       *   console.log(seriesData);
       * }
       * ```
       */
      getSeriesData(): IChartDataSeries[] | undefined;
      /**
       * Get the category data of the chart.
       * @type ChartCategoryData
       * @property {string} name The name of the category.
       * @property {number} index The index of the category.
       * @property {CategoryType} type The type of the category.
       * @property {string[]} keys The keys of the category.
       * @property {IChartDataItem[]} items The data of the category.
       * @property {number} items.value The value of the category.
       * @property {string} items.label The label of the category.
       * @returns The category data of the chart.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       * const charts = fWorksheet.getCharts();
       * if (charts.length > 0){
       *   const categoryData = charts[0].getCategoryData();
       *   console.log(categoryData);
       * }
       * ```
       */
      getCategoryData(): IChartDataCategory | undefined;
      /**
       * Returns a new FChartBuilderBase instance that modifies this chart.
       * @returns {FChartBuilderBase} The new FChartBuilderBase instance.
       */
      modify(): FChartBuilderBase;
  }

  interface IFWorksheetChartMixin {
      /**
       * Adds a new chart to this sheet.
       * @param {IChartBuilderInfo} chartBuildInfo - The chart builder info.
       * @returns {Promise<FChart>} - The new chart.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      insertChart(chartBuildInfo: IChartBuilderInfo): Promise<FChart>;
      /**
       * Updates the chart on this sheet. This api can not update source range, please use FChart.updateRange.
       * @param {IChartBuilderInfo} chartBuildInfo - The chart builder info.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       *
       * // Get all charts on the active sheet.
       * const charts = fWorksheet.getCharts();
       *
       * // Update the first chart after 3 seconds.
       * setTimeout(() => {
       *   const newChartInfo = fWorksheet.newChart(charts[0])
       *     .asLineChart()
       *     .setOptions('legend.position', univerAPI.Enum.LegendPositionEnum.Right)
       *     .build();
       *   fWorksheet.updateChart(newChartInfo);
       * }, 3000);
       * ```
       */
      updateChart(chartBuildInfo: IChartBuilderInfo): void;
      /**
       * Returns a builder to create a new chart for this sheet.The builder will not automatically create the chart. You must call build() on the returned builder to create the chart by calling insertChart(chartBuilder).
       * @description If the fChart is provided, the builder will be initialized with the existing chart's data.
       * @param {FChart} [fChart] - The chart to update.
       * @returns {FChartBuilderBase} - a new chart builder
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The width of the chart is 600 and the height is 400.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setWidth(600)
       *   .setHeight(400)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      newChart(fChart?: FChart): FChartBuilderBase;
      /**
       * Returns an array of charts on this sheet.
       * @returns {FChart[]} - An array of charts on this sheet.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Get all charts on the active sheet.
       * const charts = fWorksheet.getCharts();
       * console.log(charts);
       * ```
       */
      getCharts(): FChart[];
      /**
       * Removes a chart from the parent sheet.
       * @param {FChart} chart - The chart to remove.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       *
       * // Get all charts on the active sheet.
       * const charts = fWorksheet.getCharts();
       *
       * // Remove the first chart after 3 seconds.
       * setTimeout(async () => {
       *   await fWorksheet.removeChart(charts[0]);
       *   console.log(fWorksheet.getCharts());
       * }, 3000);
       * ```
       */
      removeChart(chart: FChart): Promise<boolean>;
  }

  class FWorksheetChartMixin {
      insertChart(chartBuildInfo: IChartBuilderInfo): Promise<FChart>;
      updateChart(chartBuilder: IChartBuilderInfo): void;
      newChart(fChart?: FChart): FChartBuilderBase;
      getCharts(): FChart[];
      removeChart(chart: FChart): Promise<boolean>;
  }
}

declare module "@univerjs/core/facade" {
  import { AxisAlignEnum, ChartBorderDashType, ChartTypeBits, LegendPositionEnum, LinePointShape, RadarShape, SelectModeEnum, TitlePositionEnum } from "@univerjs-pro/engine-chart";

  interface IFSheetsChartEnumMixin {
      /**
       * Represents the type of the chart. {@link ChartTypeBits}
       * @description This enum is used to specify the type of the chart. Which is binary-like value, each bit represents a type of the chart.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a column chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * const chartInfo = fWorksheet.newChart()
       *   .setChartType(univerAPI.Enum.ChartType.Column)
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      ChartType: typeof ChartTypeBits;
      /**
       * Represents the position of the legend in the chart. {@link LegendPositionEnum}
       * The possible values are: BOTTOM, TOP, LEFT, RIGHT, HIDE.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The legend is positioned at the top of the chart.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setOptions('legend.position', univerAPI.Enum.LegendPositionEnum.Top)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      LegendPositionEnum: typeof LegendPositionEnum;
      /**
       * Represents the selection mode of the chart. {@link SelectModeEnum}
       * The possible values are: SINGLE, MULTIPLE, Close. It used to specify the selection mode of the chart legend.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The legend is in single selection mode.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setOptions('legend.selectMode', univerAPI.Enum.SelectModeEnum.Single)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      SelectModeEnum: typeof SelectModeEnum;
      /**
       * Represents the alignment of the axis. {@link AxisAlignEnum}
       * The possible values are: START, CENTER, END.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The x-axis title is set to 'X Axis Title' with red font color and aligned to the end of the axis.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setOptions('', {
       *     xAxisTitle: {
       *       content: 'X Axis Title',
       *       fontColor: '#ff0000',
       *       axisAlignment: univerAPI.Enum.AxisAlignEnum.End,
       *     }
       *   })
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      AxisAlignEnum: typeof AxisAlignEnum;
      /**
       * Represents the type of the border dash. {@link ChartBorderDashType}
       * The possible values are: SOLID, DOTTED, DASHED.
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The axis pointer style is set.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setAxisPointerStyle({
       *     indicatorLabelColor: '#ff0000',
       *     indicatorLineType: univerAPI.Enum.ChartBorderDashType.Solid,
       *     indicatorLineColor: '#00ff00',
       *     indicatorLabelTextColor: '#0000ff',
       *   })
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      ChartBorderDashType: typeof ChartBorderDashType;
      /**
       * Represents the shape of the data point in the line chart. {@link LinePointShape}
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The data point shape is set to circle, color is red, and size is 10.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setDataPointShape(univerAPI.Enum.LinePointShape.CIRCLE)
       *   .setDataPointColor('#ff0000')
       *   .setDataPointSize(10)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      LinePointShape: typeof LinePointShape;
      /**
       * Represents the position of the title in the chart. {@link TitlePositionEnum}
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a line chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The title is positioned at the top of the chart.
       * const chartInfo = fWorksheet.newChart()
       *   .asLineChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setOptions('', {
       *     title: {
       *       content: 'Chart Title',
       *       position: univerAPI.Enum.TitlePositionEnum.TOP,
       *     },
       *   })
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      TitlePositionEnum: typeof TitlePositionEnum;
      /**
       * Represents the shape of the radar chart. {@link RadarShape}
       *
       * @example
       * ```ts
       * const fWorkbook = univerAPI.getActiveWorkbook();
       * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
       * if (!fWorksheet) return;
       *
       * // Create a radar chart with data source A1:D6.
       * // The starting position is upper-left corner of cell B2.
       * // The shape of the radar chart is set to polygon and filled with red color.
       * const chartInfo = fWorksheet.newChart()
       *   .asRadarChart()
       *   .addRange('A1:D6')
       *   .setPosition(1, 1, 0, 0)
       *   .setShape(univerAPI.Enum.RadarShape.Polygon)
       *   .setFill(true)
       *   .build();
       * await fWorksheet.insertChart(chartInfo);
       * ```
       */
      RadarShape: typeof RadarShape;
  }
}

declare module "@univerjs/core/facade" {
  import { AxisAlignEnum, ChartBorderDashType, ChartTypeBits, LegendPositionEnum, LinePointShape, RadarShape, SelectModeEnum, TitlePositionEnum } from "@univerjs-pro/engine-chart";

  interface FEnum extends IFSheetsChartEnumMixin {
  }
}

declare module "@univerjs/sheets/facade" {
  import type { IFWorksheetChartMixin } from "@univerjs-pro/sheets-chart/facade";

  interface FWorksheet extends IFWorksheetChartMixin {
  }
}

declare module "@univerjs-pro/sheets-chart/facade" {
  import type { AreaLineStyle, AxisAlignEnum, ChartBorderDashType, ChartTypeBits, IAllSeriesStyle, IAxisOptions, IChartDataCategory, IChartDataSeries, ISeriesStyle, InvalidValueType, LabelAlignEnum, LegendPositionEnum, LinePointShape, RadarShape, SelectModeEnum, TitlePositionEnum } from "@univerjs-pro/engine-chart";

  import type { ISheetChartSourceSingleRange } from "@univerjs-pro/sheets-chart";

  import type { IRange } from "@univerjs/core";

  interface FChartBuilderBase extends IPieChartBuilderMixin, IRadarChartBuilderMixin, ILineChartBuilderMixin {
  }

  interface IChartBuildOptions extends IPieChartBuilderInfo {
  }
}
