Vision Library+ / Event Frames
Custom Event Visualization+
Custom Event Visualization+ shows a visualization that you let an AI write as one HTML document, fed with the event frames that match the symbol's search and the attributes you pick. A timeline per asset, downtime cards or a Pareto chart of stop reasons becomes display content without a dedicated symbol.
Overview
Custom Event Visualization+ shows a visualization that you let an AI write as one HTML document, fed with the event frames that match the symbol's search and the attributes you pick. A timeline per asset, downtime cards or a Pareto chart of stop reasons becomes display content without a dedicated symbol.

When to use it
Use this symbol when you need to:
- Show event frames in a form no other event symbol offers, such as a timeline per asset or a card per line.
- Rank or group event frames by an attribute, such as downtime hours by reason.
- Have an AI write the visualization from a description, without programming skills.
- Let operators narrow the view with an Event Filter+, or click an event frame to filter an Events Table+.
Choose Events Table+ to review or edit individual event frames, and an Event Analytics symbol such as Event Analytics Chart+ when a ready-made chart of the figures is enough. For live values or AF tables, choose Custom Visualization+ or Custom SQL Visualization+.
Before you begin
- The administrator has installed the
framesfolder and can limit code editing. See "Install the Vision Library+ Files" and "Configure Custom Visualization+" in the installation and administration guide. - The event frames exist in an AF database, and their template has the attributes you want to show.
- You have access to an AI that your company allows. The prompt you paste there holds the search, the column names and, only when you ask for it, five sample event frames.
Add and set up the symbol
- In the PI Vision navigation bar, open Events, select Edit Search Criteria, and search for the event frames, for example Event Type
Downtimewith Asset NameLine 7. - In the symbol list of the Events pane, select Custom Event Visualization+.
- Drag an attribute of a listed event frame, such as Reason, onto the display. The symbol takes over the search of the Events pane.
- If the symbol says "No event frames match the search.", right-click it, select Search Criteria..., and set Asset Name to Specify Name with the asset, here
Line 7. Check Event Type as well, and select Apply. - To add more attributes, drag them from the Events pane onto the symbol.
The symbol shows a starting example: the count of event frames in the display time range, then one row per event frame, newest first, with its asset, start, duration and the first two attributes. An event frame that is still open is marked "(in progress)".

Next, replace the starting example with your own document, as the second task shows.
Common tasks
Choose which event frames and attributes the document gets
Use this when the document needs another asset, template, time range or attribute.
- Right-click the symbol and select Configure Custom Event Visualization+....
- Under Events, read the current search in one line (1): template, assets and time range.
- Select Search criteria (2). PI Vision's own Search Criteria editor opens, the same one as Search Criteria... in the context menu.
- Change the database, time range, event name, severity, Event Type and Attribute Value, Asset Name or Update Rate, and select Apply.
- To add an attribute, drag it from the Events pane onto the symbol. Under Attributes (3), reorder or remove attributes with the buttons below the list.
- Save the display.

The document reloads the event frames at once. Each attribute reaches the document as a column named with a leading |, such as |Reason.
Get a document from an AI
Use this when you can describe the view in words and the search finds the event frames you want.
- Right-click the symbol, select Configure Custom Event Visualization+..., and under Code select Edit code.
- To show the AI what the event frames look like, turn on Include sample rows (1). The next copy sends five event frames to the AI, and the box is off again after that copy.
- Select Copy AI prompt (2).
- Paste the copied text into your AI chat and add your request, for example "A Pareto chart of the total downtime hours per
|Reason, the longest first, with a cumulative line. A click on a bar selects its event frames." - Paste the AI's answer into the code area and select Run (3). The preview shows the draft on the current event frames, and Output lists errors.
- Select Apply (4), close the pane and save the display.

The prompt lists the search, every column with its type, and the attributes, so add the attributes before you copy. Once the code area holds your own document, the button splits into Copy AI prompt (change) and Copy AI prompt (new); use (change) to ask for one change at a time. For advice on the request, see Write a request that gets a good result.
Compare a few figures with an Events Table+ on the same search before operators rely on the document.
Filter the event frames with Event Filter+
Use this when operators narrow the view by clicking a value in an Event Filter+ on the display.
- Add an Event Filter+ over the same event frames, for example with the argument |Reason.
- In your request to the AI, ask it to show the filter state, for example "Show how many event frames of the total are shown, and say so when none match."
- Click a value in Event Filter+.
Every Custom Event Visualization+ on the display receives only the matching event frames, without a new search. After a click on Mechanical Failure|Jam (1), the timeline (2), the cards (3) and the Pareto chart (4) show only Jam stops. Clear the selection to see every event frame again.

To keep one symbol on all event frames, for example to show selected against total, turn Ignore Master on (1) under Events for that symbol.

Let a click filter an Events Table+
Use this when operators click an event frame in the document to see its details in an Events Table+.
- In your request to the AI, ask for the click, for example "A click on a bar selects that event frame by its Id. A second click or Clear selection clears it."
- Right-click the symbol, select Configure Custom Event Visualization+..., expand Filtering, and select + Add Output. Enter a Channel name (1) and select the document's selection as Source (2).
- In the Events Table+, add a Linked Input on the same channel with the property Id, as described in "Configure a Linked receiver" in Filtering dashboards.
- Save the display.

In view mode, a click on an event frame (1) selects it, the document offers Clear selection (2), and the Events Table+ shows only that event frame (3). The table shows only event frames that its own search also finds.

Who owns the code: you own a generated document and its correctness on live operations. Software Athlete supports the symbol and its document functions.
Use the symbol
What an operator sees and can do is defined by the document. The timeline below was written by an AI from the copied prompt.

| What it shows | |
|---|---|
| (1) | The legend, one color per event frame template, from the symbol's theme. |
| (2) | An event frame that is still open, drawn up to now. Its duration grows with every reload. |
| (3) | The event frame under the pointer. Its tooltip shows the name, asset, template, times, duration and attributes. |
- Hover, click and keys do what the document provides. See Use the symbol in the Custom Visualization+ guide.
- Event frames reload when the display opens, when the search, the attributes, the display time range or the display asset changes, and every 60 seconds or at the search's Update Rate while the search ends now or an event frame is still open.
- Event Filter+ selections narrow the event frames at once, without a new search, unless Ignore Master is on.
- Writes: the symbol reads event frames only. It changes nothing in AF.
Configure the symbol
Right-click the symbol and select Configure Custom Event Visualization+.... The pane has the groups Events, Code, Parameters, Filtering and Style.
Events
| Setting | What it does |
|---|---|
| Search summary | The template, assets and time range of the search, read only. |
| Search criteria | Opens PI Vision's Search Criteria editor for the symbol's search: database, time range, severity, event name, event type and attribute values, asset name and type, state, category, acknowledgment, comments, duration, number of results, search mode, update rate and Return All Descendants. Search Criteria... in the context menu does the same. See Choose which event frames and attributes the document gets. |
| Attributes | The attributes the document receives, in order. Add them by dragging from the Events pane onto the symbol; reorder or remove them with the buttons below the list. The list keeps at least one attribute. |
| Ignore Master | On: the symbol ignores Event Filter+ selections and delivers every event frame of the search. Off by default. See Filter the event frames with Event Filter+. |
Code
Code source, Code attribute, Relative to the display asset, Edit code and Allow time range work as in Code of the Custom Visualization+ guide. The symbol has no Allow writes.
Code editor
The controls work as in Code editor of the Custom Visualization+ guide. Include sample rows adds five event frames to the next copy of the prompt, then the box is off again.
Parameters
One row per setting the document declares. See Parameters in the Custom Visualization+ guide.
Filtering
Channels for the selections and filters the document declares. See Filtering in the Custom Visualization+ guide and Let a click filter an Events Table+.
Style
Theme, Surface and Container Style. See Style in the Custom Visualization+ guide.
Document API
A document has the functions of the Custom Visualization+ document reference except vlp.history, vlp.summary and vlp.write, and the payload has no sources. It receives the event frames as one row set. Copy AI prompt gives the AI this text for this symbol.
| Member | What it does | |||||
|---|---|---|---|---|---|---|
vlp.onRows(fn) | Calls fn with the row set named events once it has loaded, then whenever a reload or an Event Filter+ selection changed it. Rows can arrive before or after the first vlp.onData. | |||||
rowset.columns | The columns in order, each with name and type: first the event frame properties Id, ParentId, WebId, Path, Name, Description, TemplateName, Asset, Severity, StartTime, EndTime, InProgress, Duration, RangeDuration, MergedRangeDuration, StateType, StateDuration, Acknowledged, AcknowledgedTime, AcknowledgedBy, HasChildren, IsHierarchyContext, then one column per attribute, such as ` | Reason, and | Reason | Level1, | Reason | Level2` for the levels of a digital value. |
rowset.rows | One object per event frame, oldest start first, keyed by column name, such as `row[" | Reason"]. Times are ISO 8601 UTC text, durations are milliseconds, and an open event frame has InProgress true and EndTime null. null` means no value. | ||||
rowset.rowCount | The event frames that match the Event Filter+ selection; with no selection, the event frames of the search. | |||||
rowset.totalCount | The event frames of the search before the selection. | |||||
rowset.truncated | true when the search found at least 10,000 event frames, or its own Number of Results: rows then holds the newest ones. | |||||
rowset.loadedAt | When the delivered event frames were read. | |||||
rowset.error | null, or a short text saying why the last load failed. No matching event frames is not an error. | |||||
vlp.select(name, values) | Publishes a selection from a click or key. Publish the Id values of the clicked event frames for an Events Table+ to filter by. | |||||
vlp.showEvent(id) | Opens the event frame details dialog for the event frame with this Id, from a click or key, such as a double-click. The viewer can also edit the event frame there; after a save the symbol reads its search again. |
Troubleshooting and limitations
| Symptom | Cause | What to do |
|---|---|---|
| The symbol stays empty, even with the starting example. | The frames folder is missing on the PI Vision server. | Ask the administrator to copy it as described in the installation and administration guide. |
| "No event frames match the search." right after the symbol was added. | Asset Name is set to Assets on Display, and the display shows no asset. | Select Search Criteria... and set Asset Name to the asset, or to Any. |
| The document shows a different set of event frames than the Events pane. | The symbol keeps its own search after it was added. | Check Event Type and Asset Name under Search Criteria.... |
| An attribute your document needs is missing. | The attribute was not added, or no event frame found has it. | Drag the attribute onto the symbol; check that the template of the event frames has it. |
| The view shows too few event frames, or none. | An Event Filter+ selection, or the document's own filter. | Clear the selection, or turn Ignore Master on. Otherwise select Run, read Output, and ask for a fix with Copy AI prompt (change). |
| A click does not filter the Events Table+. | No Linked Output on the symbol, the Linked Input does not use Id, or the event frame is outside the table's own search. | Map the selection to a channel under Filtering, set the table's Linked Input property to Id, and widen the table's search. |
| A code or time range problem. | See the other guide. | See Troubleshooting and limitations in the Custom Visualization+ guide. |
Limitation: A symbol delivers at most 10,000 event frames, the newest ones.
Limitation: The symbol reads event frames only. A document cannot acknowledge, annotate or change event frames, and it reads no PI Point or AF attribute history.
Limitation: The symbol cannot be converted to a collection.
Limitation: Software Athlete supports the symbol and its document functions. You own the code of generated documents and its correctness on live operations.
