# Class: FlowCoreChart
Core functionality for Flo.w charts. This class is wrapped by the <flow-chart> web component.
Charts are defined using Vega/Vega-Lite (opens new window) chart specifications.
# Hierarchy
EventEmitter
↳ FlowCoreChart
# Constructors
# constructor
+ new FlowCoreChart(id: string, contextId: string): FlowCoreChart
Constructs a new FlowCoreChart instance.
# Parameters:
| Name | Type | Description |
|---|---|---|
id | string | Chart ID. |
contextId | string | Associated Flo.w context ID. |
Returns: FlowCoreChart
# Properties
# contextId
• Readonly contextId: string
Associated Flo.w context ID.
# id
• Readonly id: string
Chart ID.
# Accessors
# initialized
• get initialized(): boolean
Returns true if the chart has been initialized.
Returns: boolean
# Methods
# initialize
▸ initialize(options: FlowCoreChartOptions): void
Initialize the chart.
This method is called internally by the <flow-chart> web component.
# Parameters:
| Name | Type | Description |
|---|---|---|
options | FlowCoreChartOptions | Chart options. |
Returns: void
# resize
▸ resize(): Promise<View>
Trigger a resize of the chart.
Returns: Promise<View>
# setData
▸ setData(name: string, vals: any, xProp?: string, yProp?: string, run?: boolean): Promise<void>
Set chart data.
This method is called internally by the <flow-chart> web component.
# Parameters:
| Name | Type | Default value | Description |
|---|---|---|---|
name | string | - | Data name. |
vals | any | - | Data values. |
xProp? | string | - | Name of X property in data. |
yProp? | string | - | Name of Y property in data. |
run | boolean | true | Run update immediately. |
Returns: Promise<void>
# setSignal
▸ setSignal(signal: string, value: string, run?: boolean): Promise<void>
Set a Vega chart signal.
# Parameters:
| Name | Type | Default value | Description |
|---|---|---|---|
signal | string | - | Signal name. |
value | string | - | Signal value. |
run | boolean | true | Run chart update immediately. |
Returns: Promise<void>
# uninitialize
▸ uninitialize(): void
Uninitialize the chart.
This method is called internally by the <flow-chart> component. If instantiated programmatically,
calling this method is the responsibility of the developer.
Returns: void