Get Chart
Retrieve a single chart by board and chart ID. Returns the chart type, SQL query, visualization settings, and display configuration.
Authorizations
Response
Chart details
A saved chart attached to a board.
Chart spec v1: query says what the chart computes, view how it is drawn (a Vega-Lite subset; channels name result columns and never compute). SQL charts: number = {mark:"text", encoding:{}} (1 row, 1 column), or encoding.text {field?, format?} to pick and format a column of the one row; table = {mark:"x-table"}; bar/line/area/point need encoding.x and encoding.y. Several y columns: transform [{fold:[cols], as:["series","value"]}] with y = value and color = series (bar also xOffset = series; area also y.stack true). One y column split by a column: line + color = one line per value; bar + color + xOffset (same column) = grouped bars; bar or area + color + y.stack true = stacked, y.stack "normalize" = 100% stacked (shares). Horizontal bars: bar with y {field, type:"nominal"} (the category) and x {field, type:"quantitative"} (the value), grouped with yOffset. Number format: axis {format} on the value channel (d3-format: "$,.2f" money, ".1%" fractions as percent, ".3~s" compact). Scatter = {mark:"point"} with numeric x and y, optional color. Pie = {mark:"arc", encoding:{theta:{field, aggregate:"sum"}, color:{field}}}. Layered view {layer:[...], resolve?}: a chart plus goal lines {mark:"rule", encoding:{y:{datum:}}}, or combo = one bar layer + one line layer on the same x with one y each, resolve.scale.y "independent" for a second axis; a goal on that right (line) axis nests the line and its rule: {layer:[, {layer:[, ]}], resolve:{scale:{y:"independent"}}} (a top-level rule is on the left axis). Only these combinations are valid: a view must draw exactly as written. Funnel, retention and paths queries are drawn with x-funnel, x-retention and x-sankey.