Options
All
  • Public
  • Public/Protected
  • All
Menu

@chart-parts/scenegraph

Index

Functions

buildMark

  • buildMark(markType: MarkType): MarkBuilder
  • Parameters

    • markType: MarkType

    Returns MarkBuilder

createItem

  • createItem(itemType: MarkType, props?: {}): SGItem
  • Parameters

    • itemType: MarkType
    • props: {} = {}
      • [key: string]: any

    Returns SGItem

createMark

  • createMark(markType: MarkType, items: SGItem[]): Mark<Item>
  • Parameters

    • markType: MarkType

      The type of mark item to create

    • items: SGItem[]

    Returns Mark<Item>

parseScene

  • parseScene(json: string | Record<string, any>): SGMark<any>
  • Parameters

    • json: string | Record<string, any>

    Returns SGMark<any>

registerItemType

  • registerItemType(ctor: ItemConstructor): void
  • Registers an item type for use in parsing scene-graphs.

    Parameters

    • ctor: ItemConstructor

      The item class representing the item type

    Returns void

sceneToJSON

  • sceneToJSON(scene: Mark<any>, indent?: string | number): string
  • Parameters

    • scene: Mark<any>
    • Optional indent: string | number

    Returns string