Output · Reports

Chart

Draws a chart from its input: bar, line, scatter, pie, histogram, box, heat map, KPI, treemap, funnel, waterfall and more. Set it up in the Chart tab, then place it in a report.

Also known as: Graph, plot, visualize

How it works

Wire the table in, then open the Chart tab in the dock under the canvas; that is where the chart itself is set up, and the Attributes panel only holds the Heading and the optional Commentary printed under the chart, with a Generate comment button for the commentary that reads Improve comment once there is text. In the Chart tab you pick the chart type, the x and y columns, the aggregate for category charts (sum of y by default, or a row count when y is empty), a colour series column to split the measure by a second dimension, and for a line chart a dashed second measure and a shaded band between a lower and an upper column. The output is a section that Report Assembly places in the layout; the report image is rendered from the same spec and the same query as the preview, so the two never differ.

Inputs and outputs

Inputs

  • input_0 — Table

Outputs

  • section — File

Settings

The Attributes panel of Chart, as in the app: the controls work, but nothing runs — there is no data behind it.

The same settings, as the Assistant writes them
{
  heading: string
  commentary?: string
  chart: { chartType: "bar"|"line"|"scatter"|"area"|"pie"|"histogram"|"box"|"heatmap"|"combo"|"kpi"|"treemap"|"funnel"|"waterfall", x: string, y: string, aggregate?: "count"|"sum"|"avg"|"min"|"max", color?: string, dashedY?: string, bandLower?: string, bandUpper?: string }
}

x is the category (or the numeric x for scatter), y the measure; aggregate applies to the category charts (bar/pie/area/…) and defaults to sum of y — set y to the measure column, or leave y empty for a row count. color is the series column: on a bar it draws one bar per color value side by side within each x category (x: "origin", color: "scenario" = one bar per scenario per origin), on line/area one line per value, on scatter the point colour. Set color whenever the goal splits the measure by a second dimension ("per scenario", "by year") — without it those rows are summed into one bar. Chart the output of an Aggregate step (grouped by x and color), not raw rows. Line only: dashedY draws a second measure dashed in the same colour, and bandLower + bandUpper shade an interval behind the line — to chart a Forecast step use x = its date column, y = its value column, dashedY: "forecast", bandLower: "lower", bandUpper: "upper".

Example

Monthly revenue per scenario. Feed an Aggregate grouped by month and scenario, pick a bar chart with x month, y revenue and colour scenario, so each month shows one bar per scenario side by side. For a Forecast, use a line with x as the date, y as the value, the dashed measure forecast and the band from lower to upper.