Options
All
  • Public
  • Public/Protected
  • All
Menu

An instance of a cedar chart that will be rendered at a given DOM node (container) based on a definition.

  // initialize the chart
  var chart = new Chart(elementId, definition);
  // fetch chart data and render the chart
  chart.show();

Hierarchy

  • Chart

Index

Constructors

constructor

  • Parameters

    • container: any

      The DOM node where the chart will be rendered

    • Optional definition: IDefinition

      Defines how the data will be rendered in the chart

    Returns Chart

Methods

data

  • data(): any[]
  • Get the internal copy of the data used to render the chart

    Returns any[]

dataset

  • dataset(datasetName: string): IDataset
  • Get a dataset from the definition by name

    Parameters

    • datasetName: string

      The name of the dataset to get

    Returns IDataset

datasets

definition

legend

overrides

  • overrides(newOverrides: __type): Chart
  • overrides(): __type
  • Override specification properties

    Parameters

    • newOverrides: __type

    Returns Chart

  • Get the specification overrides

    Returns __type

query

  • query(): Promise<any>
  • Query data for all non-inline datasets

    Returns Promise<any>

render

  • render(): this
  • Re-draw the chart based on the current data and definition

    Returns this

series

show

  • show(): Promise<this>
  • Execute the query(), updateData(), and render() functions

    Returns Promise<this>

specification

  • specification(newSpecification: __type): Chart
  • specification(): __type
  • Set the chart's specification

    Parameters

    • newSpecification: __type

    Returns Chart

  • Get the chart's specification

    Returns __type

style

type

  • type(newType: string): Chart
  • type(): string

updateData

  • updateData(datasetsData: any): this
  • Parameters

    • datasetsData: any

    Returns this

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc