NoteChart Module by Automation Professionals
E-Mail Support

NoteChart and EasyNoteChart

Note Chart Sample

Overview

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 time-stamped events.

As of version 2.0, an alternative to the Reporting Module's Timeseries Chart is available to produce printable charts with timestamped annotations. See the Reporting section below. The ReportNoteChart component may be used even if the Vision module is not installed.

Features

Configuration

The NoteChart and EasyNoteChart components for Vision 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.

t_stamptextprioritytooltipcolor
2015-01-31 07:11:32Sample1-1Sample Tip #1color(0,0,0)
2015-01-31 09:11:32Sample2-1Sample Tip #2color(0,255,0)
2015-02-01 07:10:32Sample3-1Sample Tip #3color(0,0,255)
2015-02-01 07:11:32Sample4-1Sample Tip #4color(0,255,0)
2015-02-01 08:11:31Sample5-1Sample Tip #5color(0,0,255)
2015-02-01 08:11:32Sample6-1Sample Tip #6color(0,0,0)

As for plot data, the NoteChart component is configured just like the built-in Classic Chart, 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 Easy Chart. Warning: although the EasyNoteChart supports the "showLoading" property, it may cause performance problems when many annotations are displayed.

Appearance Properties

Annotation FontThe font used for annotations and XTrace values.
Script NamenoteFont
Data TypeFont
Annotation ColorThe default color used for annotations and their witness lines when no color is supplied in the dataset (or the supplied color is invalid).
Script NamenoteColor
Data TypeColor
Annotation StrokeThe line style and weight used for annotation witness lines.
Script NamenoteStroke
Data TypeStroke
Selected Annotation ColorWhen a note is selected for XTrace display, this color is used for the text and witness line.
Script NameselNoteColor
Data TypeColor
Selected Annotation StrokeWhen a note is selected for XTrace display, this line style and weight is used for the witness line.
Script NameselNoteStroke
Data TypeStroke
X-Trace Large Timestamp FormatFormat for the X-Trace Timestamp when the X-Axis is zoomed out wider than the Threshold.
Script NamexTraceLargeTSFormat
Data TypeString
X-Trace Small Timestamp FormatFormat for the X-Trace Timestamp when the X-Axis is zoomed in narrower than the Threshold.
Script NamexTraceSmallTSFormat
Data TypeString

Behavior Properties

Priority ThresholdThe limit on the number of notes to display at once, before triggering priority filtering.
Script NameprioThreshold
Data TypeInteger
X-Trace Timestamp Format ThresholdX-Axis Span that switches the timestamp format to use, in milliseconds.
Script NamexTraceTSFormatThreshold
Data TypeLong
Enable Note SelectionWhen 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.
Script NameenableNoteSelect
Data TypeBoolean
Enable Time Series CacheWhen 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.
Script NameenableTSCache
Data TypeBoolean

Data Properties

NotesThe 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.
Script Namenotes
Data TypeDataset
Alternate NotesThe 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.
Script NamealtNotes
Data TypeDataset
Trace TimestampThe timestamp of the selected note, or of the unselected XTrace. When written to, any selected note is deselected.
Script NametraceTS
Data TypeDate
Pen Value SamplesRead-only dataset of pen values at the trace timestamp (when visible).
Script Namesamples
Data TypeDataset
Selected NoteThe row number within the primary dataset of the selected note, or -1 otherwise. When written to, selectedAltNote and traceTS are reset/updated as needed.
Script NameselectedNote
Data TypeInteger
Selected Alternate NoteThe row number within the alternate dataset of the selected note, or -1 otherwise. When written to, selectedNote and traceTS are reset/updated as needed.
Script NameselectedAltNote
Data TypeInteger

Extension Methods

formatTraceTS(self, chart, traceTS, textFmt)

Allows overriding the displayed timestamp in X-Trace mode. Return the string or None for the default.

ArgumentData TypeDescription
selfNoteChart or
EasyNoteChart
Calling Component.
chartJFreeChartRefer to the JFreeChart documentation for API details.
traceTSDateThe timestamp to format.
textFmtStringA string with the date formatting pattern that would be used by default.

formatTraceValue(self, chart, subPlot, plotDS, penIdx, v, rangeAxis, penName)

Allows overriding the displayed pen name and value in X-Trace mode. Return the string or None for the default.

ArgumentData TypeDescription
selfNoteChart or
EasyNoteChart
Calling Component.
chartJFreeChartRefer to the JFreeChart documentation for API details.
subPlotIntegerThe subplot index within the chart.
plotDSIntegerThe plot dataset index within the subplot.
penIdxIntegerThe pen index within the plot dataset.
vDoubleThe (interpolated) pen value to format.
rangeAxisValueAxisThe axis object that would normally supply the number format. Refer to the JFreeChart documentation for API details.
penNameStringThe name of the pen. *Not* automatically prepended to your result string.

Reporting

ReportNoteChart Sample

The ReportNoteChart component for the Reporting Module has all of the base functionality of the Timeseries Chart plus accepts a data key containing annotations to display. This key supplies timestamped annotations as described above for the notes dataset property on the Vision components. The datakey must have nested keys (columns) named t_stamp and text. As the reporting module targets static display, any tooltip key is ignored. Keys for priority and color are optional.

ReportNoteChart Options

As seen in the example above, the component supports a static X-Trace using the Selected Note property of the chart. With the exception of the properties related to the alternate notes dataset, the trace values dataset, and the witness stroke settings, the balance of the properties are as described above.

ReportNoteChart Properties