Components Interactions Examples Tutorials API FAQ
Options
Menu

Class Drawer

Hierarchy

Index

Constructors

constructor

  • A Drawer draws svg elements based on the input Dataset.

    constructor

    Parameters

    • dataset: Dataset

      The dataset associated with this Drawer

    Returns Drawer

Properties

Private _cachedSelection

_cachedSelection: any

Private _cachedSelectionValid

_cachedSelectionValid: any

Protected _className

_className: string

Private _dataset

_dataset: any

Private _renderArea

_renderArea: any

Protected _svgElementName

_svgElementName: string

Methods

Private _appliedProjectors

  • _appliedProjectors(attrToProjector: any): any

Protected _applyDefaultAttributes

  • _applyDefaultAttributes(selection: Selection<any>): void

Private _bindSelectionData

  • _bindSelectionData(data: any): any
  • Binds data to selection

    Parameters

    • data: any

      The data to be drawn

    Returns any

Private _drawStep

  • _drawStep(step: any): any
  • Draws data using one step

    Parameters

    • step: any

      The step, how data should be drawn.

    Returns any

draw

  • draw(data: any[], drawSteps: DrawStep[])
  • Draws the data into the renderArea using the spefic steps and metadata

    Parameters

    • data: any[]

      The data to be drawn

    • drawSteps: DrawStep[]

      The list of steps, which needs to be drawn

remove

  • remove(): void

renderArea

selection

selectionForIndex

  • selectionForIndex(index: number): Selection<any>
  • Returns the D3 selection corresponding to the datum with the specified index.

    Parameters

    • index: number

    Returns Selection<any>

selector

  • selector(): string
  • Returns the CSS selector for this Drawer's visual elements.

    Returns string

totalDrawTime

  • totalDrawTime(data: any[], drawSteps: DrawStep[]): number
  • Calculates the total time it takes to use the input drawSteps to draw the input data

    Parameters

    • data: any[]

      The data that would have been drawn

    • drawSteps: DrawStep[]

      The DrawSteps to use

    Returns number

    The total time it takes to draw

Generated using TypeDoc