REST Resource: projects.locations.dashboards.charts

Resource: Chart

Configurable dashboard's widget that displays data as a chart.

JSON representation
{
  "name": string,
  "displayName": string,
  "description": string,
  "chartVisualizationType": enum (ChartVisualizationType),
  "createTime": string,
  "updateTime": string,
  "chartType": enum (ChartType),
  "dataSource": {
    object (ChartDataSource)
  },
  "width": integer,
  "height": integer,
  "filter": string,
  "dateRangeConfig": {
    object (DateRangeConfig)
  },
  "action": {
    object (ChartAction)
  }
}
Fields
name

string

Identifier. Chart resource name. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart}

displayName

string

User provided display name of the chart.

description

string

Chart description

chartVisualizationType

enum (ChartVisualizationType)

Chart visualization type.

createTime

string (Timestamp format)

Output only. Chart create time.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. Chart last update time.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

chartType

enum (ChartType)

Output only. Chart type.

dataSource

object (ChartDataSource)

width

integer

The width of the chart in grid units.

height

integer

The height of the chart in grid units.

filter

string

Filter applied to all charts in the container. Should support scope later.

dateRangeConfig

object (DateRangeConfig)

Date range config applied to the chart.

action

object (ChartAction)

Optional action to be taken when the chart is clicked.

ChartVisualizationType

This enum represents the different types of charts that can be created.

Enums
CHART_VISUALIZATION_TYPE_UNSPECIFIED Unspecified chart visualization type.
BAR Bar chart.
LINE Line chart.
AREA Area chart.
PIE Pie chart.
SCATTER Scatter chart.
TABLE Table chart.
SCORE_CARD Score card chart.
SUNBURST Sunburst chart.
GAUGE Gauge chart.
SANKEY Sankey chart.

ChartType

Chart type enum.

Enums
CHART_TYPE_UNSPECIFIED Unspecified chart type.
SYSTEM_DEFINED Pre-defined chart type.
USER_DEFINED Configurable chart type.

ChartDataSource

The request data for visualizing the dataset in the chart.

JSON representation
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "generativeInsights": {
    object (GenerativeInsights)
  },
  "queryMetrics": {
    object (QueryMetrics)
  }
  // End of mutually exclusive fields.
}
Fields
The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
generativeInsights

object (GenerativeInsights)

Use natural language query to generate the chart.

queryMetrics

object (QueryMetrics)

Use the existing QueryMetrics to generate the chart.

End of mutually exclusive fields.

GenerativeInsights

Request that use natural language query to generate the chart.

JSON representation
{
  "request": {
    "@type": string,
    field1: ...,
    ...
  },
  "chartSpec": {
    object
  },
  "sqlQuery": string,
  "sqlComparisonKey": string,
  "chartConversations": [
    {
      object (ChartConversation)
    }
  ],
  "chartCheckpoint": {
    object (ChartCheckpoint)
  }
}
Fields
request

object

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

chartSpec

object (Struct format)

Chart spec for the chart.

sqlQuery

string

SQL query used to generate the chart.

sqlComparisonKey

string

Optional. For charts with comparison, this key will determine the metric that will be compared between the current and another dataset.

chartConversations[]
(deprecated)

object (ChartConversation)

Output only. The chart conversations used to generate the chart.

chartCheckpoint

object (ChartCheckpoint)

The chart checkpoint used to generate the chart.

ChartConversation

The conversation used to generate the chart.

JSON representation
{
  "conversationId": string,
  "createTime": string,
  "updateTime": string,
  "messages": [
    {
      object (Message)
    }
  ]
}
Fields
conversationId

string

The conversation id of the chart.

createTime

string (Timestamp format)

The create time of the conversation.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

The update time of the conversation.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

messages[]

object (Message)

Ordered list of messages, including user inputs and system responses.

Message

The message in the conversation.

JSON representation
{
  "messageId": string,
  "createTime": string,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "userMessage": {
    object (UserMessage)
  },
  "systemMessage": {
    object (SystemMessage)
  }
  // End of mutually exclusive fields.
}
Fields
messageId

string

The message id of the message.

createTime

string (Timestamp format)

For user messages, this is the time at which the system received the message. For system messages, this is the time at which the system generated the message.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

The kind of message, can be user or system message. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
userMessage

object (UserMessage)

A message from the user that is interacting with the system.

systemMessage

object (SystemMessage)

A message from the system in response to the user.

End of mutually exclusive fields.

UserMessage

The user message.

JSON representation
{
  "text": string
}
Fields
text

string

A message from the user that is interacting with the system.

SystemMessage

A message from the system in response to the user. This message can also be a message from the user as historical context for multiturn conversations with the system.

JSON representation
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "textOutput": {
    object (TextOutput)
  },
  "generatedSqlQuery": string,
  "chartSpec": {
    object
  }
  // End of mutually exclusive fields.
}
Fields
The kind of content in the system message. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
textOutput

object (TextOutput)

A direct natural language response to the user message.

generatedSqlQuery

string

Raw SQL from LLM, before templatization

chartSpec

object (Struct format)

Chart spec from LLM

End of mutually exclusive fields.

TextOutput

A text output message from the system.

JSON representation
{
  "texts": [
    string
  ],
  "type": enum (Type)
}
Fields
texts[]

string

The parts of the message.

type

enum (Type)

The type of the text message.

Type

The type of the text message.

Enums
TYPE_UNSPECIFIED The default text type.
THOUGHT The text is a thinking plan generated by the thinking tool.
FINAL_RESPONSE The text is a final response to the user question.
PROGRESS The text is an informational message about the agent's progress, such as a tool being invoked. This is distinct from the agent's internal thought process (THOUGHT) and the final answer to the user (FINAL_RESPONSE). These messages provide insight into the agent's actions.

ChartCheckpoint

The current chart checkpoint state.

JSON representation
{
  "sessionId": string,
  "revisionId": string
}
Fields
sessionId

string

The session id of the chart.

revisionId

string

The revision id of the chart.

QueryMetrics

Request data that use the existing QueryMetrics.

JSON representation
{
  "request": {
    "@type": string,
    field1: ...,
    ...
  }
}
Fields
request

object

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

ChartAction

The action to be taken when the chart is clicked.

JSON representation
{
  "conversationFilter": string,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "redirectAction": {
    object (RedirectAction)
  }
  // End of mutually exclusive fields.
}
Fields
conversationFilter

string

The conversation filter string.

The type of action to be taken when the chart is clicked. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
redirectAction

object (RedirectAction)

Redirect action.

End of mutually exclusive fields.

RedirectAction

The redirect action to be taken when the chart is clicked.

JSON representation
{
  "relativePath": string,
  "queryParams": {
    string: string,
    ...
  }
}
Fields
relativePath

string

The relative path to redirect to.

queryParams

map (key: string, value: string)

The query params to be added to the redirect path.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Methods

create

Creates a Chart.

delete

Deletes a Chart.

get

Gets a Chart.

list

Lists Charts.

patch

Updates a Chart.