DocMgt E-forms can draw live charts directly on a form. Charts are built from a small family of related fields, all variations of the Chart field. This overview explains how the pieces fit together; each field has its own detailed topic.


Charts and public users

The Chart field is for internal users only. On a form opened by someone who is not signed in it shows "Field Not Available for Public" in place of the chart, whichever mode it is in. There is no setting that changes this, so on a form that is also used publicly, either hide the field from public users with a condition or use a Data Source Chart instead.


The Data Source Chart does draw for public users, with a caveat: the Data Source feeding it has to pull from Record Types where either the Public Access or the Collaboration flag is set. All the DMGET variables are built to reach only that data when they are used by a public user, so a Data Source pointed at anything else comes back empty and the chart has nothing to draw.


The fields

Chart — The original chart field. It draws either from a saved Search (the Search Results Chart) or from a value you supply yourself (the Custom Data Chart). Use it when the data is already in chart shape, comes straight from a search, or can be produced by a single expression. Internal users only. See Search Chart Field.


Data Source Chart — A chart that binds to a Data Source field and shapes the data for you: pick which columns are the label, value and grouping, choose how to combine rows (aggregation), and optionally bucket dates into day/week/month/quarter/year. Use it when your data is a table of rows (JSON or query results) that needs mapping, summarizing or date grouping before it can be charted. See Data Source Chart Fields.


Data Source — An invisible "feeder" field. It runs a server expression when the form loads and holds the resulting data so that charts (and calendars, maps and tables) can consume it. It draws nothing itself. A Data Source Chart points at a Data Source; a Custom Data Chart can also read one by name. See Data Source Field.


The toolbox shows five tiles in the Chart Fields section rather than three. The first is the Chart field; Bar Chart, Line Chart, Pie Chart and Stacked Bar Chart are all the same Data Source Chart, dropped onto the form with that chart type already chosen. Pick whichever tile matches the chart you want and change the Chart Type afterwards if you change your mind - they are the same field, so nothing is lost by starting from the wrong one.


How they relate

The simplest chart is a stand-alone Chart in Custom Data mode with its data typed or expressed inline, or in Search Results mode pointed at a saved search.


The richer pattern separates getting the data from drawing it: a Data Source fetches a table of rows once, and one or more Data Source Charts bind to it and shape it different ways. Because the Data Source is fetched once and shared, you can drive several charts (and other consumers) from a single query without repeating it.


Chart types

All chart fields offer the same five chart types: Bar, Stacked Bar, Line, Pie and Doughnut. Stacked Bar uses the grouping to stack series within each bar; Pie and Doughnut show one slice per label.


Shared display options

Chart and Data Source Chart share the same display settings: Alignment, Show Chart Legend, Chart Colors and Color Transparency. Leave Chart Colors empty to use your site's branding colors; add colors to override them (they are applied in order and reused if there are more groupings than colors). Color presets are available from the color list menu.


The data shape

Charts ultimately work from three roles per data point: a label (the x-axis category or pie slice), a value (the number), and an optional grouping (which series/legend entry it belongs to). The fields differ only in how they get to that shape:

Custom Data Chart expects the data already in chart shape — either delimited label^value^grouping;... or a JSON array of {label, value, grouping} objects.


Data Source Chart takes arbitrary JSON rows (or chart-shaped delimited data) from a Data Source and maps/aggregates them into that shape for you.


Clicking a chart

Both chart fields can react to clicks. A Search Results Chart can let users click a data point to search that subset of records (optionally in a new tab). A Custom Data Chart or Data Source Chart can push the clicked point's label, value and grouping into another field via Click to Field, so the rest of the form can respond.



Also needed: one paragraph in the Data Source Chart Fields topic

The contradiction cannot be fixed on this page alone. The Data Source Chart Fields topic opens with a sentence that is the opposite of what the field actually does. Its current opening paragraph ends:

Charts render for INTERNAL users only — on a form that is also used by Public users, set this field (and its Data Source) to display for internal users only.

Replace that sentence with:

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.

The Search Chart Field topic's equivalent sentence - "Charts render for INTERNAL users only" - is correct for that field and should be left alone.