Skip to content

GoogleChartProvider class

Chart provider for Google Charts.

ChartProvider


Checks that appropriate charting script is loaded.

▸ canDraw(): boolean

Returns boolean - true or false


Draws the chart.

▸ draw(slot: HTMLElement): void

  • slot: HTMLElement - The [[HTMLElement]] to draw the chart within.

Returns void


Returns the type of chart provider.

▸ getProviderType(): string

Returns string - the type of chart provider.


Returns supported chart types

▸ getSupportedChartTypes(): ChartType[]

Returns ChartType[] - array of supported chart types.


Initializes chart provider

▸ init(dataTable: EqDataTable,defaultType: ChartType,labelColumnIndex: number,dataColumnIndexes: number[]): void

  • dataTable: EqDataTable - The [[EqDataTable]] to build chart on.
  • defaultType: ChartType - The default [[ChartType]].
  • labelColumnIndex: number - The index of the columns to be used for labels.
  • dataColumnIndexes: number[] - The array of column indexes to be used for chart data.

Returns void


Sets the chart type

▸ setChartType(newChartType: ChartType): void

  • newChartType: ChartType - The [[ChartType]].

Returns void


Sets the columns to be used for chart data.

▸ setDataColumns(dataColumnsIndexes: number[]): void

  • dataColumnsIndexes: number[] - The array of column indexes.

Returns void


Sets the column to be used for labels.

▸ setLabelColumn(labelColumnIndex: number): void

  • labelColumnIndex: number - The column index.

Returns void


Fills the internal arrays with data from data table.

▸ updateChartColumns(): void

Returns void