Gantt Chart+
Gantt Chart+ draws AF event frames, such as batches, shifts or downtime, as bars on a time axis, one row per asset. You see at a glance when each event ran, how long it lasted and how events overlap.
Overview

Watch the demo
See Gantt Chart+ in a practical PI Vision workflow.
When to use it
Use this symbol when you need to:
- Show the batches, shifts or downtime of several assets on one timeline.
- Compare how long events ran and which ones overlap.
- Color the bars by a property, such as a shift or a duration range.
- Label each bar with its start time, duration or any other event frame property.
- Measure the time between two points, or read the start and end of one event.
Choose Events Table+ to list event frames without a timeline. Choose Combo Chart+ to trend values over time.
Before you begin
- The PI System has AF event frames with a template, for example Batch.
- To color or label bars with an attribute, such as a shift, the attribute must be a PI Vision display item. Drag it onto the display so that it appears in the Attributes section.
- Configure PI Web API for Vision Library+. See the installation guide.
- You can read the event frames in AF.
Add and set up the symbol
- In the PI Vision Events pane, search for the event frames, then drag one of their attributes onto the display and select Gantt Chart+. The symbol takes over the search of the Events pane.
- Set the display time range so that it contains the events, for example four days.
- Right-click the symbol and select Events Search Criteria.... Set Event Type to Batch and select Apply. See Choose which event frames to show.
- Right-click the symbol and select Configure Gantt Chart....
- Under Measures > Series, set Property to the attribute you dragged in step 1, here |Shift.
- Close the pane. Each asset is a row, and each event frame is a bar that starts and ends at its own times. The legend names the colors.

Common tasks
Choose which event frames to show
Use this first, because the chart shows exactly the event frames the search finds.
- Right-click the symbol and select Events Search Criteria....
- Keep Time Range (1) on Timebar Duration so the chart follows the display time range.
- Under Event Type and Attribute Value, set Event Type (2) to the template, here Batch.
- Narrow the search with Asset Name, Event State or Event Duration if you need to.
- Select Apply (3).

The chart reloads with the matching event frames. An event frame is found when it was active in the time range, so a long batch that began earlier still appears.
Group the rows by shift
Use this when you want one row per value of a property instead of one row per asset.
- Right-click the symbol and select Configure Gantt Chart....
- Under Measures > Argument, set Value (1) to |Shift.
- Set Sort by (2) to |Shift as well.
- Decide the order with Descending (3).
- Under Series, set Property to Asset, so the bars are colored by department.

There is now one row per shift, and the legend names the departments. With Descending off the rows run from the last value at the top to the first at the bottom, here Night, Day, Afternoon. Turn it on to read from the first value at the top.

Other values, such as Severity, Template or Duration, work the same way. Event Hierarchy makes each event frame its own row, with its child events below it.
Color the bars by shift
Use this when the color should tell you which shift, severity or other property an event belongs to.
- Right-click the symbol and select Configure Gantt Chart....
- Under Measures > Series, set Property (1) to the attribute or event frame property, here |Shift.
- Under Bars, check that Color Mode is Series.

Every value gets one color, and the legend names the colors. Select Single under Bars > Color Mode to draw all bars in one color instead.

Color the bars by duration ranges
Use this to spot events that ran too short or too long.
- Right-click the symbol and select Configure Gantt Chart....
- Under Measures > Series, set Property (1) to Duration.
- Set Custom Colors (2) to ON.
- Select the first rule (3). Set Operator to <, Value to a duration such as 2h, and choose a Color.
- Select + Add Color (4) for each further range, such as < 18h.

A bar takes the color of the first rule it satisfies. The Default rule colors every bar that matches none, here batches of 18 hours or longer. An invalid Value is flagged in the pane.

Label the bars
Use this to show start time, duration or another property on each bar.
- Right-click the symbol and select Configure Gantt Chart....
- Under Trend Options > Data Labels, check that Show is ON.
- In the Property list (1), select Remove for each property you do not want.
- Select a property in the drop-down list (2) and select + Add. Repeat for each property, here Start Time and Duration.
- Set Name (3) to ON to print the property name before its value.
- With Hide Overflowing (4) ON, a label that does not fit a bar is shortened.

Each property is one line in the bar. Position and Vertical Alignment place the lines inside the bar.

Read the start, end and duration of events
Use the tooltip for one event and the measurement for any span.
- Point at a bar. The tooltip shows the event name, asset, severity, whether it is acknowledged, the start and end time, and the attributes.
- To choose what the tooltip shows, use the check boxes under Trend Options > Tooltip: Description, Asset, Severity, Acknowledged, Start- and Endtimes and Attributes.
- To read the duration on the bar, add Duration as a label (see Label the bars).
- To measure a span, set Interactivity > General > Drag mode (1) to Select.
- Drag across the chart. Labels show the start (1), the duration (2) and the end (3) of the span.


The tooltip of one event looks like this:

The saved Drag mode is where the display starts. A viewer can switch between Pan, Box zoom and Select with the toolbar without changing the saved value.
Use the symbol

| What it shows | |
|---|---|
| (1) | The legend. Each entry is a color from the Series property. |
| (2) | The row label, here the asset. One row per Argument value. |
| (3) | An event frame. It starts and ends where the event did. Overlapping events share a row and sit one below the other. |
| (4) | The time axis. |
| (5) | The toolbar, with Pan, Box zoom, Select, Zoom In, Zoom Out, Reset Zoom, Fullscreen and Download. |
| (6) | The zoom bar. Drag its handles to zoom. |
Interactions
- Hover a bar to see its tooltip.
- Click a bar to run the Event Select action: Event Details goes to the event details page, Open Dialog opens the event details dialog, and Apply Time Range sets the display time range to the event.
- Zoom with the mouse wheel, the zoom bar or the toolbar. Drag pans, zooms to a box or measures, depending on the drag mode.
- Download in the toolbar offers PNG, SVG and PDF pictures and CSV, JSON and XLSX files of the event frames the chart shows.
- A Master or Linked filter from another symbol narrows the event frames. This symbol receives filters and does not publish any. See Filtering dashboards.
- With a Time Bar, the symbol has its own event search range.
The toolbar appears at the top right when the pointer enters the chart. Set Toolbar > Reveal to Always to keep it visible. On a touch device it is always shown.
Viewing, zooming and measuring do not change the event frames. In the details dialog, Open Dialog with Editing on lets people acknowledge and edit event frames, and those changes are written to AF.
Configure the symbol
The pane has the sections Trend Options, Interactivity, Measures, Axes, Attributes, Time Bar, Numbers and Export Data, then the common sections such as Web API. The event search is set with Events Search Criteria... in the context menu.
Trend Options
| Setting | What it does |
|---|---|
| Title | Shows a title and a subtitle, each with its text. |
| Style | Theme, Surface, Container Style and Apply to all symbols. Foreground, Background and Font Size are available when the theme is Custom Theme. |
| Legend | Enabled shows the legend. Position, Placement (Outside or Inside), Alignment and Color (Marker or Text) place and style it. |
| Tooltip | Show turns the tooltip on. Pointer is None or Argument and draws a guide line on the time axis. The check boxes choose the contents. See Read the start, end and duration of events. |
| Grid | Show, Lines (None, Horizontal, Vertical, Both, named by the direction on screen), Bands and Border (Axes, Frame, None). |
| Toolbar | Show Toolbar shows the button strip. Reveal is On Hover or Always. Always keeps a band of the plot free for it. |
| Bars | Color Mode is Single (one Color) or Series (colors from the Series group). Bar Style is Modern, Classic or Card. Radius rounds the corners. Bar Height sets the share of the row a bar fills. |
| Data Labels | Show, Position (Auto, Inside, Inside Left, Inside Right), Name, Background, Font Size, the Property list, Hide Overflowing and Vertical Alignment. See Label the bars. |
Interactivity
| Setting | What it does |
|---|---|
| Enable Zoom | Turns the wheel zoom, the zoom box and the zoom buttons on or off. Drag mode, Show Zoom Bar X and the zoom buttons are not offered when it is off. |
| Drag mode | Pan, Box zoom or Select: the drag action when the display opens. See Read the start, end and duration of events. |
| Show Zoom Bar X | Shows the zoom bar below the chart. |
| Row Sizing Mode | Fit scales all rows to the chart height. Fixed gives each row at least Minimum Row Height (px) and adds a scroll bar when the rows do not fit. |
| Event Select | The click action: Event Details, Open Dialog or Apply Time Range. |
| Editing | Available when Event Select is Open Dialog. Lets people edit event frames in the dialog, with the Assets choices On Display, Current symbol or Related and a Default asset for new event frames. Edits are written to AF. |
| Filtering | Filter Indicator (Compact, Full, Hidden), Ignore Master and Linked Inputs, which map named filter channels to event frame properties. |
Measures
| Setting | What it does |
|---|---|
| Argument > Event Hierarchy | ON makes each event frame a row, with child events below their parent. OFF groups the events by Value. |
| Argument > Value | The property that defines the rows: an event frame property, or an attribute from the Attributes list. Available when Event Hierarchy is OFF. See Group the rows by shift. |
| Argument > Sort by, Descending | Order the rows. |
| Series > Property | The property that colors and groups the bars. See Color the bars by shift. |
| Series > Overlap | ON draws bars of different series over each other. OFF places them side by side in the row. |
| Series > Mode | Values colors by value. Multistates colors by the multi-state limits of an attribute. Available when Property is an attribute. Right-click the symbol, select Add Multi-State... and set the limits and colors for that attribute first. |
| Series > Custom Colors | Available when Bars > Color Mode is Series and Mode is Values. Assigns your colors to values, or to duration ranges when Property is Duration. The reload button reads the current values. See Color the bars by duration ranges. |
Axes, attributes and common sections
| Setting | What it does |
|---|---|
| Axis X | The time axis: Labels, Scale, Range, Show, Position (Bottom or Top) and Title. |
| Axis Y | The row axis: Show, Position (Left or Right), Invert Scale and Title. |
| Attributes | The event frame attributes the symbol can use for rows, colors, labels and the tooltip. Drag an attribute onto the display to add it. Use the buttons below the list to reorder or remove. |
| Time Bar | Gives the symbol its own event search range. See Time Bar. |
| Numbers | The number format for numeric values. |
| Export Data | File Format (csv, json, xlsx) and Download write the event frames the chart shows, one row each. An event in progress has an empty EndTime. |
Troubleshooting and limitations
| Symptom | Cause | What to do |
|---|---|---|
| The chart has no bars. | The search finds no event frames, because Event Type, Event State or the time range do not match. | Right-click the symbol, select Events Search Criteria..., widen the Time Range and select Apply. |
| An attribute is missing from Property or Value. | The attribute is not in the Attributes list. | Drag the attribute onto the display. |
| Multistates cannot be selected. | Series > Property is not an attribute. | Choose an attribute, then set up multi-state limits with Add Multi-State.... |
| The rows are in the opposite order. | Descending is off, which puts the last value at the top. | Switch Descending on. |
| A bar shows a shortened label. | The bar is too narrow for the text. | Zoom in, use fewer Data Labels properties or a smaller Font Size. |
| A duration rule is flagged as invalid. | Value is not a duration. | Enter a duration such as 2h or 1d. |
Limitation: Dense or long event searches make the timeline hard to read. Narrow the search or zoom in.
Limitation: Zooming changes the chart only. It does not change the display time range. Use Apply Time Range on click to set the display range from an event.
