Data Source Chart Field

The Data Source Chart draws a chart from a Data Source field (type 605) and shapes the data for you. Unlike the Custom Data Chart, which expects data already in chart shape, the Data Source Chart takes a table of rows and lets you choose which columns become the chart, how rows are combined, and how dates are grouped. Unlike the Chart field, the Data Source Chart does draw for public users. The caveat is the data behind it: the Data Source feeding the chart has to pull from Record Types where either the Public Access or the Collaboration flag is set, because the DMGET variables reach only that data when a public user runs them. A Data Source pointed at anything else returns nothing and the chart has nothing to draw.


How it gets data

You add a Data Source (605) field to the form, point it at a server expression that returns rows, and then bind this chart to it. The bound Data Source should resolve to one of:

  • JSON rows (preferred) — an array of objects, for example [{"Vendor":"ACME","Total":1200,"Month":"Jan"}]. You map the columns by name below.
  • Delimited — chart-shaped label^value^grouping;label2^value2^grouping2. This is already positional, so no column mapping is needed.


Settings

  • Field Name — The internal name of the field.
  • Chart Title — The title shown above the chart.
  • Data Source — The Data Source field on this form that gathers this chart's data. Add a Data Source field to the form first, then bind it here. If the form has no Data Source fields yet, the editor prompts you to add one.
  • Chart Type — Bar, Stacked Bar, Line, Pie, Doughnut or Progress Bars. Progress Bars shows one row per label with the label, a horizontal bar and the value with its share of the total, such as 12,101 (84%), which suits a status summary like Completed, In Progress and Failed. The Chart Fields toolbox has a Progress Bars tile that adds the field already set to it.
  • Aggregation — How to combine multiple rows that share the same Label (and Grouping). For example, many invoices on the same day for the same vendor become a single bar. Options: Sum, Count, Average, Minimum, Maximum, and None (no aggregation). Count ignores the Value column and counts rows. Use None when your data is already summarized and each row should stand alone.
  • Date Bucket — When the Label column holds dates, group them into time buckets before aggregating: None (use the label as-is), Day, Week, Month, Quarter or Year. For example, Month turns daily invoices into one bar or point per month. Buckets are sorted chronologically. Leave at None for non-date labels or data that is already grouped.


Column Mapping

Map the Data Source columns to the chart's three roles by name. Leave any box blank to use the first columns positionally — 1st column = label, 2nd = value, 3rd = grouping.

  • Label Column — The column used for the x-axis category or pie slice. Blank uses the 1st column.
  • Value Column — The column used for the numeric value. Blank uses the 2nd column.
  • Grouping Column — Optional. The column used to split bars or lines into series (the legend). Leave blank for a single series; blank otherwise falls back to the 3rd column.
  • The Grouping Column box is hidden for Progress Bars and for a Pie or Doughnut using Legend with Values. Those show one entry per label, so any grouping in the data is not used.



Filters - Add one line per condition to chart only the rows that match, the same Column, Operator and Value lines as the Stat Tile. The filters apply before the chart groups and totals its rows, so a chart of unpaid invoices by vendor is the same Data Source with the filter Paid Equals NO. With no filters every row is charted.


Click to Field

  • Click to Field — Optional. The field to update when a user clicks a data point. It receives a delimited string of the clicked Label, Value and Grouping — for example ACME^100.00^January.


The Display tab offers Alignment, Show Chart Legend, Chart Colors and Color Transparency, the same as the Chart field. Show Chart Legend is hidden for Progress Bars and Legend with Values, which draw their own list, and Color Transparency is hidden for Progress Bars, whose bars are always solid.


Leave Chart Colors empty to use your branding colors. Added colors are applied in order and reused if there are more bars, slices or groupings than colors, so a single color makes every bar that color.


When the chart has no grouping, each color also has an optional Label. A color with a label goes to the bar, slice or row with that label, whatever order the data arrives in, and capital letters do not matter. The colors without a label cover everything else, in order. This keeps Failed red and Completed green on every refresh.


Legend with Values

A Pie or Doughnut chart can show its legend as a list beside the chart instead of the standard legend. Set Legend Style to Legend with Values to list every label with its color, its value and its share of the total, such as 6,542 (51%). Chart Size (px) sets the size of the chart, and the list moves under the chart when the space is too narrow for both. Clicking a row works the same as clicking its slice.


Progress Bars and Legend with Values options

These settings appear on the Display tab for Progress Bars and for Legend with Values:

  • Bar Length - Progress Bars only. Share of Total makes each bar's length its share of all the values. Share of Largest makes the largest value a full bar. The percent shown is always the share of the total.
  • Show - Value and Percent, Value or Percent.
  • Decimal Places - Leave blank to show whole numbers as whole numbers and other values with 2 places.
  • Format as Currency - Shows the values as money.
  • Sort - As Received keeps the order of the data. Chart Colors Order puts the labels that have a color with a matching Label first, in the order of the Chart Colors list, then the rest. Largest First, Smallest First and Label (A-Z) sort by value or by label.
  • Show Labeled Colors With No Data - On by default. A color with a Label still shows as 0 (0%) when the data has no row for it, so Failed appears even when nothing failed.
  • Bar Height (px) - Progress Bars only. The thickness of the bars.


In the designer, both show sample rows so you can see the layout: the labels of your labeled colors, or Item 1 to Item 4. The real values load when the form is opened. For a card with a heading, place the field inside a Panel and leave Chart Title blank.



How the data is shaped (order of operations)

  1. Read rows from the bound Data Source (JSON rows, or parse delimited data positionally).
  2. Map columns to label/value/grouping by name, or positionally when the mapping boxes are blank.
  3. Bucket dates on the label when a Date Bucket other than None is chosen.
  4. Aggregate rows that share the same label (and grouping) using the chosen Aggregation.
  5. Sort date buckets chronologically, then draw.

Notes

  • Several Data Source Charts can bind to the same Data Source and shape it different ways (different mappings, aggregations or buckets) without re-querying — the Data Source fetches once and all consumers share it.
  • If a chart looks empty, confirm the Data Source actually resolved to rows (check its expression and the Please Wait behavior), and that the mapped column names match the data's column names.