Skip to content

Proposal: add load function to google-chart-loader #244

Closed
@rslawik

Description

@rslawik

Add the following function to the google-chart-loader module:

export function load(settings) {
  /* supply default values for settings and ... */
  /* delegate to Google Charts loader */
}

The options can specify:

  • language - what language should be used by Google Charts library, default: lang attribute of the document or English if no attribute
  • packages - which packages to load, default: ['corechart']
  • version - what version of Google Charts library to load, default: 'current', other possible values
  • mapsApiKey - used for queries from geocharts

The function returns a promise that resolves when the selected packages are loaded.

Use cases:

  • preload certain packages
  • show loading indicator while waiting for Google Charts library to be loaded
  • support testing (e.g. await load() before constructing a test DataTable)

This is a part extracter from PR #204.

@wesalvaro, WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions