GoogleChartWidget class

Extends

ChartWidget

Index

Constructors

Public Properties

Protected Properties

Protected Accessors

Public Methods

Protected Methods

Static Methods

Constructors


constructor

The default constructor. ⊕ new GoogleChartWidget(slot: HTMLElement): GoogleChartWidget

Parameters:

  • slot: HTMLElement - The html element.

Public Properties


id

● id: string


Protected Properties


chartDiv

● chartDiv: HTMLElement


chartType

● chartType: ChartType = ChartType.Pie


context

● context: EqContext


dataColumns

● dataColumns: number[] = []


dataTable

● dataTable: EasyDataTable = null


element

● element: HTMLElement


googleDataView

● googleDataView: any


group

● group: WidgetGroup


hasChartTypes

● hasChartTypes: ChartType[] = [ ChartType.Column, ChartType.Bar, ChartType.Combo, ChartType.Area, ChartType.Line, ChartType.Pie ]


labelColumn

● labelColumn: number = -1


potentialDataColumns

● potentialDataColumns: ChartColumn[] = []


potentialLabelColumns

● potentialLabelColumns: ChartColumn[] = []


settingsDiv

● settingsDiv: HTMLElement


slot

● slot: HTMLElement


supportedChartTypes

● supportedChartTypes: ChartType[] = []


Protected Accessors


cssPrefix

⇄ get cssPrefix(): string

Returns string


Public Methods


belongsToGroup

Returns true if the widget belongs to one of the groups specified in the parameter

▸ belongsToGroup(groups?: WidgetGroup): boolean

Parameters:

Returns boolean


clear

Clears chart.

▸ clear(): void

Returns void


destroy

▸ destroy(): void

Returns void


drawChart

Draws chart with delay.

▸ drawChart(delay: number): void

Parameters:

  • delay: number - The delay.

Returns void


getChartTypeName

▸ getChartTypeName(ct: ChartType): string

Parameters:

Returns string


getContext

Returns current context (the one this widget belongs to)

▸ getContext(): EqContext

Returns EqContext


getCurrentChartType

▸ getCurrentChartType(): ChartType

Returns ChartType


getDataColumnIndex

▸ getDataColumnIndex(): number

Returns number


getLabelColumnIndex

▸ getLabelColumnIndex(): number

Returns number


getOptions

▸ getOptions(): ChartWidgetOptions

Returns ChartWidgetOptions


getPotentialDataColumns

▸ getPotentialDataColumns(): ChartColumn[]

Returns ChartColumn[]


getPotentialLabelColumns

▸ getPotentialLabelColumns(): ChartColumn[]

Returns ChartColumn[]


getSupportedChartTypes

▸ getSupportedChartTypes(): ChartType[]

Returns ChartType[]


getWidgetType

▸ getWidgetType(): string

Returns string


hasColumnsForChart

Checks, if there ara colums for chart

▸ hasColumnsForChart(): boolean

Returns boolean - true if there are columns, otherwise - false.


hasData

Checks, if widget has data.

▸ hasData(): boolean

Returns boolean - true if has data, otherwise - false.


init

Initialize widget.

▸ init(context: EqContext,options?: ChartWidgetOptions): void

Parameters:

Returns void


initSettingsDiv

Inititialize settings div.

▸ initSettingsDiv(): void

Returns void


onProcessEnd

This function is called on the end of some process this widget participates in. For example, some widgets should be updated on model loading or after the execution of the current query

▸ onProcessEnd(): void

Returns void


onProcessStart

This function is called on the start of some process this widget participates in. For example, some widgets can show a spinner or a progress bar at the beginning of some long process (e.g. model loading).

▸ onProcessStart(): void

Returns void


prepareChartData

Prepares data for chart.

▸ prepareChartData(): void

Returns void


refresh

Refreshes the widget's content

▸ refresh(): void

Returns void


toggleSettings

Toggles settings.

▸ toggleSettings(callback?: () => void): void

Parameters:

  • callback: () => void, Optional - The callback.

Returns void


updateSettings

▸ updateSettings(settings: any): void

Parameters:

  • settings: any

Returns void


Protected Methods


canDraw

▸ canDraw(): boolean

Returns boolean


convertToGoogleFormat

▸ convertToGoogleFormat(): any

Returns any


createChart

▸ createChart(slot: HTMLElement): any

Parameters:

  • slot: HTMLElement

Returns any


destroyCore

▸ destroyCore(): void

Returns void


drawCore

▸ drawCore(): void

Returns void


initChart

▸ initChart(): void

Returns void


onProcessEndCore

This function is called from onProcessEnd function. It does nothing in the base Widget class but can be overridden in derived classes to implement the functionality specific for a particular widget.

▸ onProcessEndCore(): void

Returns void


onProcessStartCore

This function is called from onProcessStart function. It does nothing in the base Widget class but can be overridden in derived classes to implement the functionality specific for a particular widget.

▸ onProcessStartCore(): void

Returns void


refreshCore

Refresh widget implementation

▸ refreshCore(): void

Returns void


updateChartColumns

▸ updateChartColumns(): void

Returns void


Static Methods


hasGoogleCharts

▸ hasGoogleCharts(): boolean

Returns boolean