Update Analytics Panel
Set what a panel shows: its sources and their SQL, the transform, the display type and its settings, columns, formats, click wiring and its place on the grid. Send only what changes.
Path
The page id, from List Analytics Pages.
The panel id, from Get Analytics Page or Create Analytics Panel.
Headers
Required. The revision you last read: the revision from its read (Get Workflow Definition for a workflow, Get Analytics Page Definition for an Analytics page, Get Analytics Data Source Table for a fixed source's table), or meta.revision from your last change to it. The ETag header of either answer is the same value, ready to send back. The change applies only if nobody changed it since: otherwise it answers 412 with the current revision in error.details.revision. Send it as a strong entity tag ("r_..."): a weak one (W/"...") never matches and answers 412. Without it the request answers 428.
Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. Here a key acts in another organization only as one of its members: with "Use this key across all of your organizations" on, in an organization its creator belongs to with a role. Child organizations and MindCloud staff access do not reach this endpoint. Every response's X-Company-Id header names the organization it acted in. See Organizations.
Body
The panel's title.
The panel's title. Setting it turns off automatic renaming for this panel.
The subhead of its drill-down view.
The line under the title when the panel opens as a full-page drill-down view. An empty string clears it.
page or drill.
page puts the panel on the grid; drill takes it off the grid, to open when another panel drills into it.
pagedrill
The sources feeding it, with their SQL.
Every data source feeding the panel, in order. Replaces the list.
dataSourceIdstringrequiredThe data source, from List Analytics Data Sources.
aliasstringThe name the query and transform code use for the source's rows. Made from the source's name when left out.
querystringDuckDB SQL over the source's rows, with the alias as the table name: filter, group, sort and limit here. An empty string shows every row.
followPageDatebooleanfalse keeps the page's date filter off this source (an all-time figure).
Code combining the sources, when SQL cannot.
JavaScript function body receiving each source as a named input ({ alias }) and returning the rows to show. Use it only for what SQL cannot do. Saving it runs it; read the result with Get Analytics Panel Output. An empty string removes it.
How it draws its rows.
How the panel draws its rows. One of: table, bar, line, combo, pareto, bump, scatter, bubble, quadrant, pie, treemap, heatmap, pivot, cohort, statusgrid, activity, funnel, waterfall, sankey, chord, statetimeline, timeline, stat, trend, progress, gauge, bullet, report, document, workbook, html, map, region, tabs, group.
tablebarlinecomboparetobumpscatterbubblequadrantpietreemapheatmappivotcohortstatusgridactivityfunnelwaterfallsankeychordstatetimelinetimelinestattrendprogressgaugebulletreportdocumentworkbookhtmlmapregiontabsgroup
Table columns, in order.
Table panels: the columns shown, in order. Replaces the list; an empty list lets the panel pick its columns from the rows.
keystringrequiredThe row key to show (dot paths allowed). A button column takes an identifier you choose, which names its click event "button:<key>".
typestringHow the value is formatted: string, number, percent, ratio, currency, duration, rank, boolean, date, object, list, html, button.
stringnumberpercentratiocurrencydurationrankbooleandateobjectlisthtmlbutton
labelstringButton columns: the text on the button.
tooltipstringButton columns: one sentence shown on hover.
widthnumber or stringThe width in pixels, 64-800. An empty string returns it to the width of its content.
Value formats by column.
How each column's values are formatted, keyed by column: { "<column>": { "type": "currency" } }. Merged over what is stored; null for a column takes its format off.
Cell links by column.
Table panels: the link each cell of a column opens, keyed by column. Merged over what is stored; null for a column takes its link off.
Colours by series or category.
The color of each series or category, keyed by its name. Merged over what is stored; null for a name takes its color off.
The display type's settings.
The settings of the panel's display type, keyed by block (annotations, tooltip, chart, bump, scatter, pie, treemap, cellGrid, statusGrid, activity, funnel, waterfall, sankey, chord, statetimeline, stat, trend, target, report, document, workbook, html, map, region, tabs, group), as Get Analytics Panel answers them. A block is refused on a type that does not draw it.
annotationsobjectThe annotations settings. A block you send is merged over the stored one: send only the fields you change.
tooltipobjectThe tooltip settings. A block you send is merged over the stored one: send only the fields you change.
chartobjectThe chart settings. A block you send is merged over the stored one: send only the fields you change.
bumpobjectThe bump settings. A block you send is merged over the stored one: send only the fields you change.
scatterobjectThe scatter settings. A block you send is merged over the stored one: send only the fields you change.
pieobjectThe pie settings. A block you send is merged over the stored one: send only the fields you change.
treemapobjectThe treemap settings. A block you send is merged over the stored one: send only the fields you change.
cellGridobjectThe cellGrid settings. A block you send is merged over the stored one: send only the fields you change.
statusGridobjectThe statusGrid settings. A block you send is merged over the stored one: send only the fields you change.
activityobjectThe activity settings. A block you send is merged over the stored one: send only the fields you change.
funnelobjectThe funnel settings. A block you send is merged over the stored one: send only the fields you change.
waterfallobjectThe waterfall settings. A block you send is merged over the stored one: send only the fields you change.
sankeyobjectThe sankey settings. A block you send is merged over the stored one: send only the fields you change.
chordobjectThe chord settings. A block you send is merged over the stored one: send only the fields you change.
statetimelineobjectThe statetimeline settings. A block you send is merged over the stored one: send only the fields you change.
statobjectThe stat settings. A block you send is merged over the stored one: send only the fields you change.
trendobjectThe trend settings. A block you send is merged over the stored one: send only the fields you change.
targetobjectThe target settings. A block you send is merged over the stored one: send only the fields you change.
reportobjectThe report settings. A block you send is merged over the stored one: send only the fields you change.
documentobjectThe document settings. A block you send is merged over the stored one: send only the fields you change.
workbookobjectThe workbook settings. A block you send is merged over the stored one: send only the fields you change.
htmlobjectThe html settings. A block you send is merged over the stored one: send only the fields you change.
mapobjectThe map settings. A block you send is merged over the stored one: send only the fields you change.
regionobjectThe region settings. A block you send is merged over the stored one: send only the fields you change.
tabsobjectThe tabs settings. A block you send is merged over the stored one: send only the fields you change. { items: [panel ids], ... } replaces the child list; null releases every child back to the grid.
groupobjectThe group settings. A block you send is merged over the stored one: send only the fields you change. { items: [panel ids], ... } replaces the child list; null releases every child back to the grid.
Click wiring by event.
What clicking the panel's items does, keyed by event: rowClick, valueClick and the other events the display type fires, or "button:<column key>" for a button column. Replaces every wiring; null clears them all.
Make a stat tile flip a toggle variable.
Stat panels: make the tile a control that flips a toggle page variable. null makes it a normal panel again.
togglesstringrequiredThe toggle page variable the tile flips.
Labels for a drill-down panel's $params.
Drill-down panels: labels for the $params the source SQL reads, keyed by param. Replaces them; null clears them.
Code returning the display settings.
Advanced display: JavaScript function body that returns the display settings from the page variables. It is run when you save. An empty string goes back to the static settings and keeps the code.
A report's AI-written sections.
Report panels: JavaScript function body returning { KEY: { prompt, additionalContext } } for the {{KEY}} tokens the transform writes. An empty string removes it.
Its place on the grid.
The panel's place on the page's 12-column grid.
xnumberrequiredLeftmost column, 0-11.
ynumberrequiredTop row, from 0.
wnumberrequiredWidth in columns, 1-12.
hnumberHeight in rows (about 48px each). Leave it out to keep the current height.
auto to take a fixed height off.
auto takes a fixed height off, so the panel is as tall as what it shows.
auto
Response fields
idstringThe panel id.
pageIdstringThe page the panel is on, from List Analytics Pages.
namestringThe panel's title, shown in its card header.
descriptionstringThe line under the title when the panel opens as a full-page drill-down view.
placementstringWhere the panel shows.
pageOn the page grid.drillOff the grid: it opens when a click on another panel drills into it, narrowed by the clicked row.
displayTypestringHow the panel draws its rows. One of: table, bar, line, combo, pareto, bump, scatter, bubble, quadrant, pie, treemap, heatmap, pivot, cohort, statusgrid, activity, funnel, waterfall, sankey, chord, statetimeline, timeline, stat, trend, progress, gauge, bullet, report, document, workbook, html, map, region, tabs, group.
tableDraws a table panel.barDraws a bar panel.lineDraws a line panel.comboDraws a combo panel.paretoDraws a pareto panel.bumpDraws a bump panel.scatterDraws a scatter panel.bubbleDraws a bubble panel.quadrantDraws a quadrant panel.pieDraws a pie panel.treemapDraws a treemap panel.heatmapDraws a heatmap panel.pivotDraws a pivot panel.cohortDraws a cohort panel.statusgridDraws a statusgrid panel.activityDraws a activity panel.funnelDraws a funnel panel.waterfallDraws a waterfall panel.sankeyDraws a sankey panel.chordDraws a chord panel.statetimelineDraws a statetimeline panel.timelineDraws a timeline panel.statDraws a stat panel.trendDraws a trend panel.progressDraws a progress panel.gaugeDraws a gauge panel.bulletDraws a bullet panel.reportDraws a report panel.documentDraws a document panel.workbookDraws a workbook panel.htmlDraws a html panel.mapDraws a map panel.regionDraws a region panel.tabsDraws a tabs panel.groupDraws a group panel.
dataSourcesarray of objectsThe data sources feeding the panel, in order.
dataSourceIdstringThe data source, from List Analytics Data Sources.
aliasstringThe name the source's query and the transform code use for its rows.
querystringDuckDB SQL over this source's rows, with the alias as the table name. Empty when the panel shows every row as stored.
followPageDatebooleanWhether the page's date filter narrows this source. False for an all-time figure on a date-filtered page.
transformCodestringJavaScript function body that receives each source as a named input and returns the rows to show. Empty when the source queries return the rows directly.
columnsarray of objectsTable panels: the columns shown, in order. Null when the panel picks its columns from the rows.
keystringThe row key the column shows (dot paths allowed). For a button column, the identifier that names its click event.
typestringHow the value is formatted and aligned. Absent for plain text.
stringFormats the value as string.numberFormats the value as number.percentFormats the value as percent.ratioFormats the value as ratio.currencyFormats the value as currency.durationFormats the value as duration.rankFormats the value as rank.booleanFormats the value as boolean.dateFormats the value as date.objectFormats the value as object.listFormats the value as list.htmlFormats the value as html.buttonFormats the value as button.
labelstringButton columns: the text on the button.
tooltipstringButton columns: the sentence shown on hover.
widthnumberThe column width in pixels for everyone. Absent when the column is as wide as its content.
formatobjectHow each column's values are formatted, keyed by column, for any display type: { "<column>": { "type": "currency", ... } }. Null when none is set.
linksobjectTable panels: the link each cell of a column opens, keyed by column. Null when none is set.
styleobjectThe color of each series or category, keyed by its name. Null when none is set.
settingsobjectThe settings of the panel's display type, keyed by block: annotations, tooltip, chart, bump, scatter, pie, treemap, cellGrid, statusGrid, activity, funnel, waterfall, sankey, chord, statetimeline, stat, trend, target, report, document, workbook, html, map, region, tabs, group. Only the blocks the panel stores are present.
onobjectWhat clicking the panel's items does, keyed by event (rowClick, valueClick, "button:<column key>" ...): { "rowClick": { "action": "navigatePage", "pageId": "..." } }. Empty when nothing is wired.
interactionobjectStat panels: the toggle page variable a click on the tile flips. Null for a normal panel.
togglesstringThe toggle page variable.
paramsobjectDrill-down panels: the human label of each $param its SQL reads, keyed by param: { "userId": { "label": "User", "labeledBy": "userName" } }. Null when none is declared.
displayModestringWhether the display comes from the settings or from displayCode.
basicThe display settings above.advanceddisplayCode returns the display settings from the page variables.
displayCodestringJavaScript function body that returns the display settings from the page variables. Kept, but unused, while displayMode is basic.
aiSnippetsCodestringReport panels: JavaScript function body returning the AI-written sections of the report. Empty when it has none.
layoutobjectThe panel's place on the page grid. Null when it was never placed (it then flows full width in creation order), and for a drill-down or a panel inside a container.
xnumberLeftmost column on the 12-column grid, 0-11.
ynumberTop row, from 0.
wnumberWidth in columns, 1-12.
hnumberHeight in rows (one row is about 48px). Null when the panel is as tall as what it shows.
tabIdstringThe page tab the panel sits on, from Get Analytics Page. Null on a page without tabs, and for a drill-down or a panel inside a container.
containedBystringThe container panel (tabs or group) it renders inside, or null when it sits on the grid or is a drill-down.
createdOndateWhen the panel was created. Null on a published version of the page.
updatedOndateWhen the panel last changed. Null on a published version of the page.