Documentation Vision Library+ Documentation

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

Gantt Chart+ with batch bars in four department rows, colored by shift

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

  1. 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.
  2. Set the display time range so that it contains the events, for example four days.
  3. Right-click the symbol and select Events Search Criteria.... Set Event Type to Batch and select Apply. See Choose which event frames to show.
  4. Right-click the symbol and select Configure Gantt Chart....
  5. Under Measures > Series, set Property to the attribute you dragged in step 1, here |Shift.
  6. 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.
Gantt Chart+ with batches in four rows and Night, Afternoon and Day colors

Common tasks

Choose which event frames to show

Use this first, because the chart shows exactly the event frames the search finds.

  1. Right-click the symbol and select Events Search Criteria....
  2. Keep Time Range (1) on Timebar Duration so the chart follows the display time range.
  3. Under Event Type and Attribute Value, set Event Type (2) to the template, here Batch.
  4. Narrow the search with Asset Name, Event State or Event Duration if you need to.
  5. Select Apply (3).
Events Search Criteria pane with Time Range, Event Type and Apply marked

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.

  1. Right-click the symbol and select Configure Gantt Chart....
  2. Under Measures > Argument, set Value (1) to |Shift.
  3. Set Sort by (2) to |Shift as well.
  4. Decide the order with Descending (3).
  5. Under Series, set Property to Asset, so the bars are colored by department.
Argument group with Value and Sort by set to Shift

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.

One row per shift, with bars colored by department

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.

  1. Right-click the symbol and select Configure Gantt Chart....
  2. Under Measures > Series, set Property (1) to the attribute or event frame property, here |Shift.
  3. Under Bars, check that Color Mode is Series.
Series group with Property set to Shift

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.

Bars colored by shift, labeled with the department and the shift

Color the bars by duration ranges

Use this to spot events that ran too short or too long.

  1. Right-click the symbol and select Configure Gantt Chart....
  2. Under Measures > Series, set Property (1) to Duration.
  3. Set Custom Colors (2) to ON.
  4. Select the first rule (3). Set Operator to <, Value to a duration such as 2h, and choose a Color.
  5. Select + Add Color (4) for each further range, such as < 18h.
Series group with Duration, Custom Colors and the first rule open

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.

Bars colored by duration: under 2 hours, under 18 hours and the default

Label the bars

Use this to show start time, duration or another property on each bar.

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

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

Bars labeled with the start time and the duration

Read the start, end and duration of events

Use the tooltip for one event and the measurement for any span.

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

The tooltip of one event looks like this:

Tooltip of a batch with name, asset, severity, start, end and shift

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

Gantt Chart+ with six numbered callouts
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

SettingWhat it does
TitleShows a title and a subtitle, each with its text.
StyleTheme, Surface, Container Style and Apply to all symbols. Foreground, Background and Font Size are available when the theme is Custom Theme.
LegendEnabled shows the legend. Position, Placement (Outside or Inside), Alignment and Color (Marker or Text) place and style it.
TooltipShow 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.
GridShow, Lines (None, Horizontal, Vertical, Both, named by the direction on screen), Bands and Border (Axes, Frame, None).
ToolbarShow Toolbar shows the button strip. Reveal is On Hover or Always. Always keeps a band of the plot free for it.
BarsColor 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 LabelsShow, Position (Auto, Inside, Inside Left, Inside Right), Name, Background, Font Size, the Property list, Hide Overflowing and Vertical Alignment. See Label the bars.

Interactivity

SettingWhat it does
Enable ZoomTurns 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 modePan, Box zoom or Select: the drag action when the display opens. See Read the start, end and duration of events.
Show Zoom Bar XShows the zoom bar below the chart.
Row Sizing ModeFit 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 SelectThe click action: Event Details, Open Dialog or Apply Time Range.
EditingAvailable 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.
FilteringFilter Indicator (Compact, Full, Hidden), Ignore Master and Linked Inputs, which map named filter channels to event frame properties.

Measures

SettingWhat it does
Argument > Event HierarchyON makes each event frame a row, with child events below their parent. OFF groups the events by Value.
Argument > ValueThe 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, DescendingOrder the rows.
Series > PropertyThe property that colors and groups the bars. See Color the bars by shift.
Series > OverlapON draws bars of different series over each other. OFF places them side by side in the row.
Series > ModeValues 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 ColorsAvailable 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

SettingWhat it does
Axis XThe time axis: Labels, Scale, Range, Show, Position (Bottom or Top) and Title.
Axis YThe row axis: Show, Position (Left or Right), Invert Scale and Title.
AttributesThe 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 BarGives the symbol its own event search range. See Time Bar.
NumbersThe number format for numeric values.
Export DataFile 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

SymptomCauseWhat 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.