LayoutManager interface ... contains all functions to build and modify a layout programmatically

Hierarchy

  • ILayoutManager

Index

Properties

ChartTypes

ChartTypes: TChartType[]

getter only: returns a list of chartTypes available in trueChart like 'table', 'structure'

Layout

Layout: Promise<ILayoutDefinition>

getter only: returns a the internal trueChart layout when trueChart is fully initialized

RootCell

RootCell: Promise<IRootCell>

getter only: return the rootCell of the layout, use this to get the required cell other methods

Methods

addGridColumnBefore

  • addGridColumnBefore(cell: ICell<IGrid>, columnId?: undefined | number): void
  • add a new column to a grid

    throws

    InvalidParameterError - when given cell is not a grid cell

    Parameters

    • cell: ICell<IGrid>
    • Optional columnId: undefined | number

    Returns void

addGridRowBefore

  • addGridRowBefore(cell: ICell<IGrid>, rowId?: undefined | number): void
  • add a new row to a grid

    throws

    InvalidParameterError - when given cell is not a grid cell

    Parameters

    • cell: ICell<IGrid>
    • Optional rowId: undefined | number

    Returns void

changeMeasureRepresentations

  • changes the measures that are declared in the id map, when not defined it will be ignore

    throws

    InvalidParameterError - when given cell is not a valid cell

    Parameters

    Returns void

getCellById

  • getCellById(id: string): ICell | null
  • returns the cell with the given id or null when the cell was not found

    Parameters

    • id: string

    Returns ICell | null

onLayoutUpdated

  • onLayoutUpdated(callBack: function): void
  • shorthand to register a callback, that is triggered every time the layout was changed in trueChart, instead you can listen on the 'layoutUpdated' - event

    Parameters

    • callBack: function

    Returns void

removeGridColumn

  • removeGridColumn(cell: ICell<IGrid>, removeIds: number[]): void
  • removes the columns of the given grid cell

    throws

    InvalidParameterError - when given cell is not a grid cell

    Parameters

    • cell: ICell<IGrid>
    • removeIds: number[]

      collection of ids to remove starting at 0

    Returns void

removeGridRow

  • removeGridRow(cell: ICell<IGrid>, removeIds: number[]): void
  • removes the rows of the given grid cell

    throws

    InvalidParameterError - when given cell is not a grid cell

    Parameters

    • cell: ICell<IGrid>
    • removeIds: number[]

      collection of ids to remove starting at 0

    Returns void

resetLayout

  • resetLayout(): Promise<void>
  • sets the layout to the initial state

    Returns Promise<void>

updateCellSettings

  • changes that were made on the given cell will be applied

    Parameters

    Returns void

updateCellType

  • change the cell type of a specific cell

    throws

    {IInvalidParameterError}

    Parameters

    Returns Promise<void>

updateFirstCellType

  • updateFirstCellType(cellType: TChartType, contextId?: undefined | string): void
  • changing the cell type of the first cell

    throws

    {IInvalidParameterError}

    Parameters

    • cellType: TChartType
    • Optional contextId: undefined | string

    Returns void

updateRootCell

  • updates the root cell and repaints trueChart

    Parameters

    Returns void