Skip to main content
PATCH
Update a chart

Authorizations

next-auth.session-token
string
cookie
required

NextAuth session JWT cookie. Development: often next-auth.session-token. Production (HTTPS): often __Secure-next-auth.session-token. Send the cookie your browser receives after sign-in.

Path Parameters

chartId
string<cuid2>
required

Chart identifier.

Body

application/json

Send at least one field. config replaces the display settings whole. A chart's Feedback Dataset and workspace are fixed: datasetId or workspaceId in the body is refused with 400 (read_only_field) — create a new chart to chart another dataset.

name
string
Required string length: 1 - 255
type
enum<string>
Available options:
area,
bar,
pie,
big_number,
matrix
query
object

What a chart computes, in Cube's query format (ADR 0001): measures, dimensions, time dimensions, filters, order and limit over its Feedback Dataset's fields. Every field must come from the field catalog (GET /api/v3/charts/fields), named with its data-source prefix. Display settings are separate (config).

Refused with 422 (invalid_params names each problem): a field that is not in the catalog; Cube options the app does not use (ungrouped, segments, renewQuery, joinHints, total, compareDateRange); a timezone (every range is read in the organization's display time zone); more than 15 fields across measures, dimensions and timeDimensions; more than 25 filter conditions or filters nested deeper than three levels; a date range that is not a preset, all-time or two ISO calendar dates; on a chart grouped by time alone, a date range that spans more than 10,000 buckets of its granularity (code limit_exceeded).

config
object

Display settings, kept apart from the chart query. Every key is optional; each applies to the chart types named in its description and is ignored by the others.

Response

The updated chart

data
object
required

A chart: one saved visualisation of one Feedback Dataset. It belongs to a workspace and can sit on any number of dashboards — dashboards lists them, so a caller can see what an edit or a delete would affect.