NoteChart and EasyNoteChart
The NoteChart module extends Ignition's built-in
Classic Chart and
Easy Chart to mark
the plot with a witness line and text at the location of specific
- Translucent Text
The text of each note is drawn with a partially transparent background,
leaving plot lines and other data visible underneath, but preserving text
- Auto X-Trace
Each annotation element is selectable (at its text), triggering X-Trace
display of plot values at the note's timestamp.
The X-Trace mode itself is altered:
- Data values and the timestamp are drawn with translucent text and partially transparent background,
- Data values are displayed with the number display format from the data's axis,
- X-Axis timestamps are displayed with a user-supplied format selected for the zoom level,
- The selected trace timestamp and the closest sample values are available as a Date property and a Dataset, and
- Both Annotation selection and Independent X-Trace can be triggered by assigning to the appropriate properties.
- Both timestamp and pen values to display may be replaced with user-supplied strings via extension functions.
Can be used to implement differential value displays.
Each note may be supplied with explanatory text that will be displayed
when the mouse hovers over that note's primary text.
- Prioritized display
Each note may be assigned a numeric priority for use when many notes
fall within the plot's timescale. Notes with negative or missing priority
are always displayed. After those are counted, the remaining notes are
grouped by priority, and added to the display list in ascending priority
order. If adding the notes in a given priority would exceed the Priority
Threshold, that group and all remaining are hidden.
Prioritization is computed after any zoom and pan operations
have limited the visible annotations. As the user zooms in, more
annotations can pop into view.
- Jointed trace witness lines
When multiple notes have closely-spaced timestamps such that their
text would overlap, the text positions are shifted and diagonals added
to the witness lines.
- Auto font scaling
After prioritization, given the requested font size, the list of
notes to display could overflow the available space. The font is
then automatically shrunk to fit all of the notes without overlap.
The same rescaling algorithm is applied to X-Trace data values when
many series are present in a plot or subplot.
- Support for EasyNoteChart DB Pen Caching
When installed together with the
Time Series Database Cache Module,
the EasyNoteChart's Database Pens will be drawn from the cache by
default. When the EasyNoteChart's date range selector is visible,
histogram generation will also preload the cache with the outer
- Mouse Event Domain Timestamps
All mouse events (other than the mouse wheel) have been enhanced
to include a domainTS property of type java.util.Date
that corresponds to the x,y coordinates in the event.
The NoteChart and EasyNoteChart components accept two datasets
containing annotations to display, a primary and an alternate. Although
all features are available in both datasets, the primary dataset 'notes'
is expected to contain prioritized annotations from a suitable database
of events, where the alternate dataset 'altNotes' is expected to contain
one or more unprioritized annotations supplied by your gui. (Such as
user-entered annotations that haven't been saved to your database yet.)
Each annotation dataset must supply 't_stamp' and 'text' columns, and
may optionally supply 'priority', 'tooltip', and/or 'color' for each
annotation. For best performance, database bindings should use a WHERE
clause to restrict the time span to the same as the plot, and should use
ORDER BY t_stamp.
|2015-01-31 07:11:32||Sample1||-1||Sample Tip #1|
|2015-01-31 09:11:32||Sample2||-1||Sample Tip #2|
|2015-02-01 07:10:32||Sample3||-1||Sample Tip #3|
|2015-02-01 07:11:32||Sample4||-1||Sample Tip #4|
|2015-02-01 08:11:31||Sample5||-1||Sample Tip #5|
|2015-02-01 08:11:32||Sample6||-1||Sample Tip #6|
As for plot data, the NoteChart component is configured just
like the built-in
but must have a range of dates/times as its x-axis, displayed
as an XYPlot or a Combined Domain XYPlot.
Similarly, the EasyNoteChart component works like the built-in
Warning: although the EasyNoteChart supports the "showLoading"
property, it may cause performance problems when many annotations
Annotation Font||The font used for annotations and XTrace values.|
Annotation Color||The default color used for annotations and their witness
lines when no color is supplied in the dataset (or the supplied color is invalid).|
Annotation Stroke||The line style and weight used for annotation witness
Selected Annotation Color||When a note is selected for XTrace display,
this color is used for the text and witness line.|
Selected Annotation Stroke||When a note is selected for XTrace display,
this line style and weight is used for the witness line.|
X-Trace Large Timestamp Format||Format for the X-Trace Timestamp when
the X-Axis is zoomed out wider than the Threshold.|
X-Trace Small Timestamp Format||Format for the X-Trace Timestamp when
the X-Axis is zoomed in narrower than the Threshold.|
Priority Threshold||The limit on the number of notes to display at once,
before triggering priority filtering.|
X-Trace Timestamp Format Threshold||X-Axis Span that switches the timestamp
format to use, in milliseconds.|
Enable Note Selection||When checked, mouse clicks on the text of an
annotation will trigger XTrace display for that note. And clicks away from a note will deselect any
note. The selectedNote, selectedAltNote, and traceTS properties are updated accordingly.|
Enable Time Series Cache||When checked, and the
Time Series Database Cache Module
is present, Database Pens will use the Time Series Cache instead of direct queries.
(Applies to the EasyNoteChart component only.) Adjust query timing parameters through
the Gateway Configuration Interface under Databases, Time Series Caching.|
Notes||The primary dataset of annotations to display. When
written to while a primary note is selected, the new dataset will be searched for a matching note.
If found, it will be selected.|
Alternate Notes||The alternate dataset of annotations to
display. When written to while an alternate note is selected, the new dataset will be searched
for a matching note. If found, it will be selected.|
Trace Timestamp||The timestamp of the selected note, or of the
unselected XTrace. When written to, any selected note is deselected.|
Pen Value Samples||Read-only dataset of pen values at the trace
timestamp (when visible).|
Selected Note||The row number within the primary dataset of the
selected note, or -1 otherwise. When written to, selectedAltNote and traceTS are reset/updated as
Selected Alternate Note||The row number within the alternate dataset
of the selected note, or -1 otherwise. When written to, selectedNote and traceTS are reset/updated as