Charts

Update a chart

Updates a chart. Content changes (name, SQL query, chart type, axes, etc.) create a new chart version behind the scenes so the version history is preserved. Placement changes (dashboardId, dashboardTabId, layout) move or resize the chart without creating a version. Requires admin access to the organization.

patch/api/public/organizations/{orgId}/charts/{id}

Request

  • Base URL
    https://charts.basedash.com
  • Auth
    HTTP bearer

Path parameters

orgIdstring required

Organization ID

idstring required

Chart ID

Request body

dashboardIdstring

ID of the dashboard to move the chart to

dashboardTabIdstring

ID of the dashboard tab to move the chart to

namestring

Name of the chart

descriptionstring nullable

Description of the chart

sqlQuerystring

SQL query powering the chart

drilldownSqlQuerystring nullable

SQL query used for chart drill-downs

databaseConnectionIdstring nullable

ID of the data source the SQL query runs against

xAxisPropertystring nullable

Result column used for the x-axis

xAxisSecondaryPropertystring nullable

Result column used to break down the x-axis into segments

yAxisPropertystring nullable

Result column used for the y-axis

staticContentstring nullable

Static content for DASHBOARD_HEADER and DASHBOARD_TEXT chart types

currencyCodestring nullable

ISO 4217 currency code (for example USD or EUR) used when numericalFormat is CURRENCY. Null uses USD.

showFullNumbersboolean

Show full numbers (1,234,567) instead of abbreviated ones (1.2M).

metricLabelstring nullable

NUMBER charts: label shown with the value. Null uses the chart name.

showLegendboolean

Show the series legend (LINE, VERTICAL_BAR, HORIZONTAL_BAR, PIE, FUNNEL and SCATTER charts).

goalLineValuenumber nullable

Value of the target (goal) line on LINE, VERTICAL_BAR and SCATTER charts. Null hides it.

yAxisMinimumnumber nullable

Lower bound of the y-axis. Null picks it from the data.

yAxisMaximumnumber nullable

Upper bound of the y-axis. Null picks it from the data.

xAxisMinimumnumber nullable

SCATTER charts: lower bound of the x-axis. Null picks it from the data.

xAxisMaximumnumber nullable

SCATTER charts: upper bound of the x-axis. Null picks it from the data.

colorByCategoryboolean

Give each bar its own color by category on a single-series HORIZONTAL_BAR, categorical VERTICAL_BAR or FUNNEL chart. segmentColors are then keyed by category (xAxisProperty) value. Ignored while the chart has a breakdown.

seriesColor'NEUTRAL' | 'BLUE' | 'ORANGE' | 'PURPLE' | 'RED' | 'TEAL' | 'GREEN' | 'YELLOW' | 'PINK'

A color from the chart palette. NEUTRAL is near-black in light mode and near-white in dark mode.

segmentColorsobject nullable

Colors of segments, keyed by segment value: breakdown values on LINE, VERTICAL_BAR, HORIZONTAL_BAR, FUNNEL and SCATTER charts, slices on PIE charts, nodes on SANKEY charts, or categories with colorByCategory. Segments left out are colored automatically. Merged by key: null for a segment resets it to automatic; null for the whole field resets every segment.

imagePropertystring nullable

IMAGE charts: result column holding the image URL.

imageGrowToFitboolean

IMAGE charts: grow the image to fill the card.

textPropertystring nullable

TEXT charts: result column holding the text to show.

tableColumnsobject nullable

TABLE charts: column widths and pins, keyed by result column name. Columns left out use the defaults. Merged by column: a column given replaces that column's settings, null resets it; null for the whole field resets every column.

Response

Chart updated successfully

Changes

No recorded changes to this operation across all 1 revision of this API.