Options
All
  • Public
  • Public/Protected
  • All
Menu

Class default

Class representing a single chart in Vizzu.

Hierarchy

  • default

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • Creates a new chart and connects it to the div or canvas HTML element specified by its ID or DOM object. The new chart is empty by default, but can be set to an initial state in the second optional parameter.

    Parameters

    Returns default

Properties

config

config: Readonly<Chart>

Property for read-only access to chart parameter object.

initializing

initializing: Promise<default>

Promise representing the initialization will resolve when initialization is finished. Any API call will potentially cause an error before this promise is resolved.

styles

styles: Readonly<Chart>

Property for read-only access to style object.

Accessors

animation

Methods

animate

  • Initiates the animation to the new chart state passed as the first argument. If there is a currently running animation, all subsequent calls will schedule the corresponding animation after the end of the previous one.

    The new chart state can be a full state specifier object with data, config and style, or a single chart config object. It accepts also a chart snapshot acquired from a previous state using the store() method.

    The optional second parameter specifies the animation options. This second option can be a scalar value, setting the overall animation duration.

    The animation will be initiated in the next cycle of the JS event loop. The method returns a promise, which will resolve when the animation is finished.

    Parameters

    Returns Promise<default>

feature

  • feature(name: "tooltip", enabled: boolean): void
  • Enable/disable additional features.

    Parameters

    • name: "tooltip"
    • enabled: boolean

    Returns void

off

  • off(eventName: Type, handler: (event: Object) => void): void
  • Uninstalls the provided event handler from the event specified by name.

    Parameters

    • eventName: Type
    • handler: (event: Object) => void
        • Parameters

          Returns void

    Returns void

on

  • on(eventName: Type, handler: (event: Object) => void): void
  • Installs the provided event handler to the event specified by name.

    Parameters

    • eventName: Type
    • handler: (event: Object) => void
        • Parameters

          Returns void

    Returns void

store

  • store(): number
  • Returns a reference to the actual chart state for further reuse. This reference includes the chart config and style parameters but does not include the data parameter and the animation options.

    Returns number

version

  • version(): string
  • Returns the version number of the library.

    Returns string

Generated using TypeDoc