Skip to Content
ClassesFEnum

Class: FEnum

Extends

  • IFSheetsEnum.IFSheetsFilterEnumMixin.IFSheetsConditionalFormattingEnum.IPivotEnumMixin.IFSparklineEnumMixin.IFUIEnumMixin.IFDrawingEnumMixin.FWatermarkEnum.ISheetPrintEnum.IChartEnumMixin

Properties

PropertyTypeDescription

AxisAlignEnum

any

Represents the alignment of the axis. AxisAlignEnum The possible values are: START, CENTER, END.

Example

const fWorkbook = univerAPI.getActiveWorkbook(); const fWorksheet = fWorkbook.getActiveSheet(); // 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);

ChartBorderDashType

any

Represents the type of the border dash. ChartBorderDashType The possible values are: SOLID, DOTTED, DASHED.

Example

const fWorkbook = univerAPI.getActiveWorkbook(); const fWorksheet = fWorkbook.getActiveSheet(); // 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);

ChartType

any

Represents the type of the chart. 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

const fWorkbook = univerAPI.getActiveWorkbook(); const fWorksheet = fWorkbook.getActiveSheet(); // 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);

ConditionFormatNumberOperatorEnum

any

Conditional formatting number operator

ConditionFormatTimePeriodOperatorEnum

any

Conditional formatting time period operator

CustomFilterOperator

any

Please refer to CustomFilterOperator.

DrawingType

typeof DrawingTypeEnum

Please refer to DrawingTypeEnum.

ImageSourceType

Omit<any, "UUID">

Please refer to ImageSourceType.

LegendPositionEnum

any

Represents the position of the legend in the chart. LegendPositionEnum The possible values are: BOTTOM, TOP, LEFT, RIGHT, HIDE.

Example

const fWorkbook = univerAPI.getActiveWorkbook(); const fWorksheet = fWorkbook.getActiveSheet(); // 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);

LinePointShape

any

Represents the shape of the data point in the line chart. LinePointShape

Example

const fWorkbook = univerAPI.getActiveWorkbook(); const fWorksheet = fWorkbook.getActiveSheet(); // 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);

PivotDataFieldDataTypeEnum

any

Represents the data type of the pivot data field. PivotDataFieldDataTypeEnum

Description

This is enum is used to specify the data type of the pivot source field.

PivotDataFieldSortOperatorEnum

any

Represents the sort operator of the pivot data field. PivotDataFieldSortOperatorEnum

PivotDataFieldSortTypeEnum

any

Represents the sort type of the pivot data field. PivotDataFieldSortTypeEnum

PivotFilterOperatorEnum

any

Represents the filter operator of the pivot filter. ST_PivotFilterOperatorEnum

PivotFilterTypeEnum

any

Represents the filter type of the pivot table. PivotFilterTypeEnum

PivotSubtotalTypeEnum

any

Represents the subtotal type of the pivot table. PivotSubtotalTypeEnum

PivotTableChangeTypeEnum

any

Represents the change type of the pivot table. PivotTableChangeTypeEnum

PivotTableFiledAreaEnum

any

Represents the field area of the pivot table. PivotTableFiledAreaEnum

PivotTableValuePositionEnum

any

Represents the value position of the pivot table. PivotTableValuePositionEnum

Description

In excel pivot table, the value position can be placed in the row, column area, but only there are more than one value field it will be placed.

PositionTypeEnum

any

Represents the position type of the pivot table. PositionType

PrintAlign

any

Print alignment settings for content positioning

PrintArea

any

Print area setting that determines which part of the spreadsheet to print

PrintDirection

any

Page orientation setting (Portrait/Landscape)

PrintFreeze

any

Freeze pane settings for printing

PrintHeaderFooter

any

Header and footer content options

PrintHeaderFooterSymbol

any

Special symbols/placeholders available for headers and footers

PrintPaperMargin

any

Margin presets for the printed page

PrintPaperSize

any

Paper size options for printing (e.g., A4, Letter)

PrintScale

any

Print scaling options to fit content to page

RadarShape

any

Represents the shape of the radar chart. RadarShape

Example

const fWorkbook = univerAPI.getActiveWorkbook(); const fWorksheet = fWorkbook.getActiveSheet(); // 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);

SelectModeEnum

any

Represents the selection mode of the chart. SelectModeEnum The possible values are: SINGLE, MULTIPLE, Close. It used to specify the selection mode of the chart legend.

Example

const fWorkbook = univerAPI.getActiveWorkbook(); const fWorksheet = fWorkbook.getActiveSheet(); // 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);

SheetDrawingAnchorType

any

Please refer to SheetDrawingAnchorType.

SheetSkeletonChangeType

any

Sheet skeleton change command types. These commands affect the structure of the worksheet. Includes operations like changing row/column dimensions, visibility, and grid properties.

SheetValueChangeType

any

Sheet value change command types. These commands affect the content or style of cells. Includes operations like setting cell values, moving ranges, merging cells, and applying styles.

SparklineTypeEnum

any

SplitDelimiterType

any

Split delimiter types.

TitlePositionEnum

any

Represents the position of the title in the chart. TitlePositionEnum

Example

const fWorkbook = univerAPI.getActiveWorkbook(); const fWorksheet = fWorkbook.getActiveSheet(); // 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);

Accessors

AutoFillSeries

Get Signature

get AutoFillSeries(): any

Auto fill series types

Example
console.log(univerAPI.Enum.AutoFillSeries.ALTERNATE_SERIES);
Returns

any


BaselineOffset

Get Signature

get BaselineOffset(): typeof BaselineOffset

Different baseline offsets for text baseline positioning

Example
console.log(univerAPI.Enum.BaselineOffset.SUPERSCRIPT);
Returns

typeof BaselineOffset


BooleanNumber

Get Signature

get BooleanNumber(): typeof BooleanNumber

Boolean number representations

Example
console.log(univerAPI.Enum.BooleanNumber.TRUE);
Returns

typeof BooleanNumber


BorderStyleTypes

Get Signature

get BorderStyleTypes(): typeof BorderStyleTypes

Different border style types

Example
console.log(univerAPI.Enum.BorderStyleTypes.NONE);
Returns

typeof BorderStyleTypes


BorderType

Get Signature

get BorderType(): any

Different border types

Example
console.log(univerAPI.Enum.BorderType.OUTSIDE);
Returns

any


BuiltInUIPart

Get Signature

get BuiltInUIPart(): any

Built-in UI parts.

Returns

any


ColorType

Get Signature

get ColorType(): any

Color types

Example
console.log(univerAPI.Enum.ColorType.RGB);
Returns

any


CommandType

Get Signature

get CommandType(): any

Different types of commands

Example
console.log(univerAPI.Enum.CommandType.COMMAND);
Returns

any


CommonHideTypes

Get Signature

get CommonHideTypes(): any

Common hide types

Example
console.log(univerAPI.Enum.CommonHideTypes.ON);
Returns

any


CopyPasteType

Get Signature

get CopyPasteType(): any

Copy paste types

Example
console.log(univerAPI.Enum.CopyPasteType.PASTE_VALUES);
Returns

any


DataValidationErrorStyle

Get Signature

get DataValidationErrorStyle(): any

Different error display styles

Example
console.log(univerAPI.Enum.DataValidationErrorStyle.WARNING);
Returns

any


DataValidationOperator

Get Signature

get DataValidationOperator(): any

Different validation operators

Example
console.log(univerAPI.Enum.DataValidationOperator.BETWEEN);
Returns

any


DataValidationRenderMode

Get Signature

get DataValidationRenderMode(): any

Different validation rendering modes

Example
console.log(univerAPI.Enum.DataValidationRenderMode.TEXT);
Returns

any


DataValidationStatus

Get Signature

get DataValidationStatus(): any

Different validation states

Example
console.log(univerAPI.Enum.DataValidationStatus.VALID);
Returns

any


DataValidationType

Get Signature

get DataValidationType(): any

Different types of data validation

Example
console.log(univerAPI.Enum.DataValidationType.LIST);
Returns

any


DeleteDirection

Get Signature

get DeleteDirection(): any

Delete direction types

Example
console.log(univerAPI.Enum.DeleteDirection.LEFT);
Returns

any


DeveloperMetadataVisibility

Get Signature

get DeveloperMetadataVisibility(): any

Developer metadata visibility types

Example
console.log(univerAPI.Enum.DeveloperMetadataVisibility.DOCUMENT);
Returns

any


Dimension

Get Signature

get Dimension(): any

Dimension types

Example
console.log(univerAPI.Enum.Dimension.ROWS);
Returns

any


Direction

Get Signature

get Direction(): any

Direction types

Example
console.log(univerAPI.Enum.Direction.UP);
Returns

any


HorizontalAlign

Get Signature

get HorizontalAlign(): typeof HorizontalAlign

Different horizontal text alignment options

Example
console.log(univerAPI.Enum.HorizontalAlign.CENTER);
Returns

typeof HorizontalAlign


InterpolationPointType

Get Signature

get InterpolationPointType(): any

Interpolation point types

Example
console.log(univerAPI.Enum.InterpolationPointType.NUMBER);
Returns

any


IWatermarkTypeEnum

Get Signature

get IWatermarkTypeEnum(): any
Returns

any

Inherited from

FWatermarkEnum.IWatermarkTypeEnum


KeyCode

Get Signature

get KeyCode(): any

Key codes.

Returns

any


LifecycleStages

Get Signature

get LifecycleStages(): any

Represents different stages in the lifecycle

Example
console.log(univerAPI.Enum.LifecycleStages.Rendered);
Returns

any


LocaleType

Get Signature

get LocaleType(): typeof LocaleType

Locale types

Example
console.log(univerAPI.Enum.LocaleType.EN_US);
Returns

typeof LocaleType


MentionType

Get Signature

get MentionType(): any

Mention types

Example
console.log(univerAPI.Enum.MentionType.PERSON);
Returns

any


ProtectionType

Get Signature

get ProtectionType(): any

Protection types

Example
console.log(univerAPI.Enum.ProtectionType.RANGE);
Returns

any


RelativeDate

Get Signature

get RelativeDate(): any

Relative date types

Example
console.log(univerAPI.Enum.RelativeDate.TODAY);
Returns

any


SheetTypes

Get Signature

get SheetTypes(): any

Sheet types

Example
console.log(univerAPI.Enum.SheetTypes.GRID);
Returns

any


TextDecoration

Get Signature

get TextDecoration(): typeof TextDecoration

Different text decoration styles

Example
console.log(univerAPI.Enum.TextDecoration.DOUBLE);
Returns

typeof TextDecoration


TextDirection

Get Signature

get TextDirection(): typeof TextDirection

Different text direction options

Example
console.log(univerAPI.Enum.TextDirection.LEFT_TO_RIGHT);
Returns

typeof TextDirection


ThemeColorType

Get Signature

get ThemeColorType(): typeof ThemeColorType

Theme color types

Example
console.log(univerAPI.Enum.ThemeColorType.ACCENT1);
Returns

typeof ThemeColorType


UniverInstanceType

Get Signature

get UniverInstanceType(): any

Defines different types of Univer instances

Example
console.log(univerAPI.Enum.UniverInstanceType.UNIVER_SHEET);
Returns

any


VerticalAlign

Get Signature

get VerticalAlign(): typeof VerticalAlign

Different vertical text alignment options

Example
console.log(univerAPI.Enum.VerticalAlign.MIDDLE);
Returns

typeof VerticalAlign


WrapStrategy

Get Signature

get WrapStrategy(): typeof WrapStrategy

Different wrap strategy options

Example
console.log(univerAPI.Enum.WrapStrategy.WRAP);
Returns

typeof WrapStrategy

Methods

get()

static get(): FEnum

Returns

FEnum