charts
Creates, updates, deletes, gets or lists a charts resource.
Overview
| Name | charts |
| Type | Resource |
| Id | google.contactcenterinsights.charts |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Chart resource name. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart} |
action | object | Optional action to be taken when the chart is clicked. (id: GoogleCloudContactcenterinsightsV1ChartAction) |
chartType | string | Output only. Chart type. (CHART_TYPE_UNSPECIFIED, SYSTEM_DEFINED, USER_DEFINED) |
chartVisualizationType | string | Chart visualization type. (CHART_VISUALIZATION_TYPE_UNSPECIFIED, BAR, LINE, AREA, PIE, SCATTER, TABLE, SCORE_CARD, SUNBURST, GAUGE, SANKEY) |
createTime | string (google-datetime) | Output only. Chart create time. |
dataSource | object | The request data for visualizing the dataset in the chart. (id: GoogleCloudContactcenterinsightsV1ChartDataSource) |
dateRangeConfig | object | Date range config applied to the chart. (id: GoogleCloudContactcenterinsightsV1DateRangeConfig) |
description | string | Chart description |
displayName | string | User provided display name of the chart. |
filter | string | Filter applied to all charts in the container. Should support scope later. |
height | integer (int32) | The height of the chart in grid units. |
updateTime | string (google-datetime) | Output only. Chart last update time. |
width | integer (int32) | The width of the chart in grid units. |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Chart resource name. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart} |
action | object | Optional action to be taken when the chart is clicked. (id: GoogleCloudContactcenterinsightsV1ChartAction) |
chartType | string | Output only. Chart type. (CHART_TYPE_UNSPECIFIED, SYSTEM_DEFINED, USER_DEFINED) |
chartVisualizationType | string | Chart visualization type. (CHART_VISUALIZATION_TYPE_UNSPECIFIED, BAR, LINE, AREA, PIE, SCATTER, TABLE, SCORE_CARD, SUNBURST, GAUGE, SANKEY) |
createTime | string (google-datetime) | Output only. Chart create time. |
dataSource | object | The request data for visualizing the dataset in the chart. (id: GoogleCloudContactcenterinsightsV1ChartDataSource) |
dateRangeConfig | object | Date range config applied to the chart. (id: GoogleCloudContactcenterinsightsV1DateRangeConfig) |
description | string | Chart description |
displayName | string | User provided display name of the chart. |
filter | string | Filter applied to all charts in the container. Should support scope later. |
height | integer (int32) | The height of the chart in grid units. |
updateTime | string (google-datetime) | Output only. Chart last update time. |
width | integer (int32) | The width of the chart in grid units. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, dashboardsId, chartsId | Gets a Chart. | |
list | select | projectsId, locationsId, dashboardsId | Lists Charts. | |
create | insert | projectsId, locationsId, dashboardsId | chartId | Creates a Chart. |
patch | update | projectsId, locationsId, dashboardsId, chartsId | updateMask | Updates a Chart. |
delete | delete | projectsId, locationsId, dashboardsId, chartsId | Deletes a Chart. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
chartsId | string | |
dashboardsId | string | |
locationsId | string | |
projectsId | string | |
chartId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets a Chart.
SELECT
name,
action,
chartType,
chartVisualizationType,
createTime,
dataSource,
dateRangeConfig,
description,
displayName,
filter,
height,
updateTime,
width
FROM google.contactcenterinsights.charts
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dashboardsId = '{{ dashboardsId }}' -- required
AND chartsId = '{{ chartsId }}' -- required
;
Lists Charts.
SELECT
name,
action,
chartType,
chartVisualizationType,
createTime,
dataSource,
dateRangeConfig,
description,
displayName,
filter,
height,
updateTime,
width
FROM google.contactcenterinsights.charts
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dashboardsId = '{{ dashboardsId }}' -- required
;
INSERT examples
- create
- Manifest
Creates a Chart.
INSERT INTO google.contactcenterinsights.charts (
data__description,
data__height,
data__action,
data__width,
data__dataSource,
data__filter,
data__name,
data__dateRangeConfig,
data__displayName,
data__chartVisualizationType,
projectsId,
locationsId,
dashboardsId,
chartId
)
SELECT
'{{ description }}',
{{ height }},
'{{ action }}',
{{ width }},
'{{ dataSource }}',
'{{ filter }}',
'{{ name }}',
'{{ dateRangeConfig }}',
'{{ displayName }}',
'{{ chartVisualizationType }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ dashboardsId }}',
'{{ chartId }}'
RETURNING
name,
action,
chartType,
chartVisualizationType,
createTime,
dataSource,
dateRangeConfig,
description,
displayName,
filter,
height,
updateTime,
width
;
# Description fields are for documentation purposes
- name: charts
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the charts resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the charts resource.
- name: dashboardsId
value: "{{ dashboardsId }}"
description: Required parameter for the charts resource.
- name: description
value: "{{ description }}"
description: |
Chart description
- name: height
value: {{ height }}
description: |
The height of the chart in grid units.
- name: action
description: |
Optional action to be taken when the chart is clicked.
value:
conversationFilter: "{{ conversationFilter }}"
redirectAction:
relativePath: "{{ relativePath }}"
queryParams: "{{ queryParams }}"
- name: width
value: {{ width }}
description: |
The width of the chart in grid units.
- name: dataSource
description: |
The request data for visualizing the dataset in the chart.
value:
generativeInsights:
chartSpec: "{{ chartSpec }}"
sqlQuery: "{{ sqlQuery }}"
chartCheckpoint:
sessionId: "{{ sessionId }}"
revisionId: "{{ revisionId }}"
chartConversations:
- messages: "{{ messages }}"
updateTime: "{{ updateTime }}"
conversationId: "{{ conversationId }}"
createTime: "{{ createTime }}"
request: "{{ request }}"
sqlComparisonKey: "{{ sqlComparisonKey }}"
queryMetrics:
request: "{{ request }}"
- name: filter
value: "{{ filter }}"
description: |
Filter applied to all charts in the container. Should support scope later.
- name: name
value: "{{ name }}"
description: |
Identifier. Chart resource name. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart}
- name: dateRangeConfig
description: |
Date range config applied to the chart.
value:
absoluteDateRange:
startTime: "{{ startTime }}"
endTime: "{{ endTime }}"
relativeDateRange:
quantity: "{{ quantity }}"
unit: "{{ unit }}"
- name: displayName
value: "{{ displayName }}"
description: |
User provided display name of the chart.
- name: chartVisualizationType
value: "{{ chartVisualizationType }}"
description: |
Chart visualization type.
valid_values: ['CHART_VISUALIZATION_TYPE_UNSPECIFIED', 'BAR', 'LINE', 'AREA', 'PIE', 'SCATTER', 'TABLE', 'SCORE_CARD', 'SUNBURST', 'GAUGE', 'SANKEY']
- name: chartId
value: "{{ chartId }}"
UPDATE examples
- patch
Updates a Chart.
UPDATE google.contactcenterinsights.charts
SET
data__description = '{{ description }}',
data__height = {{ height }},
data__action = '{{ action }}',
data__width = {{ width }},
data__dataSource = '{{ dataSource }}',
data__filter = '{{ filter }}',
data__name = '{{ name }}',
data__dateRangeConfig = '{{ dateRangeConfig }}',
data__displayName = '{{ displayName }}',
data__chartVisualizationType = '{{ chartVisualizationType }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dashboardsId = '{{ dashboardsId }}' --required
AND chartsId = '{{ chartsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
action,
chartType,
chartVisualizationType,
createTime,
dataSource,
dateRangeConfig,
description,
displayName,
filter,
height,
updateTime,
width;
DELETE examples
- delete
Deletes a Chart.
DELETE FROM google.contactcenterinsights.charts
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dashboardsId = '{{ dashboardsId }}' --required
AND chartsId = '{{ chartsId }}' --required
;