Skip to main content

charts

Creates, updates, deletes, gets or lists a charts resource.

Overview​

Namecharts
TypeResource
Idgoogle.contactcenterinsights.charts

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. Chart resource name. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart}
actionobjectOptional action to be taken when the chart is clicked. (id: GoogleCloudContactcenterinsightsV1ChartAction)
chartTypestringOutput only. Chart type. (CHART_TYPE_UNSPECIFIED, SYSTEM_DEFINED, USER_DEFINED)
chartVisualizationTypestringChart visualization type. (CHART_VISUALIZATION_TYPE_UNSPECIFIED, BAR, LINE, AREA, PIE, SCATTER, TABLE, SCORE_CARD, SUNBURST, GAUGE, SANKEY)
createTimestring (google-datetime)Output only. Chart create time.
dataSourceobjectThe request data for visualizing the dataset in the chart. (id: GoogleCloudContactcenterinsightsV1ChartDataSource)
dateRangeConfigobjectDate range config applied to the chart. (id: GoogleCloudContactcenterinsightsV1DateRangeConfig)
descriptionstringChart description
displayNamestringUser provided display name of the chart.
filterstringFilter applied to all charts in the container. Should support scope later.
heightinteger (int32)The height of the chart in grid units.
updateTimestring (google-datetime)Output only. Chart last update time.
widthinteger (int32)The width of the chart in grid units.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, dashboardsId, chartsIdGets a Chart.
listselectprojectsId, locationsId, dashboardsIdLists Charts.
createinsertprojectsId, locationsId, dashboardsIdchartIdCreates a Chart.
patchupdateprojectsId, locationsId, dashboardsId, chartsIdupdateMaskUpdates a Chart.
deletedeleteprojectsId, locationsId, dashboardsId, chartsIdDeletes 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.

NameDatatypeDescription
chartsIdstring
dashboardsIdstring
locationsIdstring
projectsIdstring
chartIdstring
updateMaskstring (google-fieldmask)

SELECT examples​

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
;

INSERT examples​

Creates a Chart.

INSERT INTO google.contactcenterinsights.charts (
data__action,
data__chartVisualizationType,
data__dataSource,
data__dateRangeConfig,
data__description,
data__displayName,
data__filter,
data__height,
data__name,
data__width,
projectsId,
locationsId,
dashboardsId,
chartId
)
SELECT
'{{ action }}',
'{{ chartVisualizationType }}',
'{{ dataSource }}',
'{{ dateRangeConfig }}',
'{{ description }}',
'{{ displayName }}',
'{{ filter }}',
{{ height }},
'{{ name }}',
{{ width }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ dashboardsId }}',
'{{ chartId }}'
RETURNING
name,
action,
chartType,
chartVisualizationType,
createTime,
dataSource,
dateRangeConfig,
description,
displayName,
filter,
height,
updateTime,
width
;

UPDATE examples​

Updates a Chart.

UPDATE google.contactcenterinsights.charts
SET
data__action = '{{ action }}',
data__chartVisualizationType = '{{ chartVisualizationType }}',
data__dataSource = '{{ dataSource }}',
data__dateRangeConfig = '{{ dateRangeConfig }}',
data__description = '{{ description }}',
data__displayName = '{{ displayName }}',
data__filter = '{{ filter }}',
data__height = {{ height }},
data__name = '{{ name }}',
data__width = {{ width }}
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​

Deletes a Chart.

DELETE FROM google.contactcenterinsights.charts
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dashboardsId = '{{ dashboardsId }}' --required
AND chartsId = '{{ chartsId }}' --required
;