A builder for a dashboard panel object. For an example of how to use DashboardPanelBuilder
, refer to DashboardPanel
.
For more details, see the Gviz documentation.
Methods
Method | Return type | Brief description |
---|---|---|
bind(control, chart) | DashboardPanelBuilder | Binds a control to a chart, so that the chart is redrawn whenever the control collects a user interaction that affects the data managed by the dashboard. |
bind(controls, charts) | DashboardPanelBuilder | Binds multiple controls to multiple charts, so that the charts are redrawn whenever the controls collect a user interaction that affects the data managed by the dashboard. |
build() | DashboardPanel | Builds a dashboard. |
setDataTable(tableBuilder) | DashboardPanelBuilder | Sets the data table to use for the dashboard using a DataTableBuilder. |
setDataTable(source) | DashboardPanelBuilder | Sets the dashboard's data table, which is the control's underlying data model. |
Detailed documentation
bind(control, chart)
Binds a control to a chart, so that the chart is redrawn whenever the control collects a user interaction that affects the data managed by the dashboard.
For example, when binding a range selector to a chart, a user interaction is sliding the range selector to the desired range. The effect on the data is to keep only the data that's in the chosen range.
Parameters
Name | Type | Description |
---|---|---|
control | Control | A control to bind. |
chart | Chart | A chart to bind. |
Return
DashboardPanelBuilder
— This builder, useful for chaining.
bind(controls, charts)
Binds multiple controls to multiple charts, so that the charts are redrawn whenever the controls collect a user interaction that affects the data managed by the dashboard. When binding multiple controls to a chart (or multiple charts), the data that's displayed in the chart is that which passes the filters of all of the controls (of this specific binding).
For more information about object binding see the Gviz documentation.
Parameters
Name | Type | Description |
---|---|---|
controls | Control[] | An array of controls to bind. |
charts | Chart[] | An array charts to bind. |
Return
DashboardPanelBuilder
— This builder, useful for chaining.
build()
setDataTable(tableBuilder)
Sets the data table to use for the dashboard using a DataTableBuilder. This is a convenience
method for setting the data table without needing to call build()
.
Parameters
Name | Type | Description |
---|---|---|
tableBuilder | DataTableBuilder | A data table builder. A new data table is created instantly as part of this call, so any further updates to the builder aren't reflected in the dashboard. |
Return
DashboardPanelBuilder
— This builder, useful for chaining.
setDataTable(source)
Sets the dashboard's data table, which is the control's underlying data model.
Parameters
Name | Type | Description |
---|---|---|
source | DataTableSource | The data source to use for the dashboard. |
Return
DashboardPanelBuilder
— This builder, useful for chaining.