Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


GLOSSARY


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL USER MANUAL VERSIONS

Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata
General

Component Palette Icon:


Description

The Status Chart component allows you to visualize the status of one or more discrete datapoints over a time range. The X-axis is always a timeseries axis, and the Y-axis is a category axis, with one entry per data series. The chart is populated with a single dataset, the first column of which must be a datetime column. 

Wide vs Tall Datasets 

In Wide format, all of the columns but the first must be numeric. These "series" columns' headers will be used as the names on the y-axis. In Tall format, there should be exactly 3 columns. The first is the timestamp, the second is the series name, and the third is the value. For example:

Wide Format


t_stamp

Valve1

Valve2

2010-01-13 8:00:00

0

2

2010-01-13 8:02:00

0

2

2010-01-13 8:04:00

1

2

2010-01-13 8:06:00

1

1

2010-01-13 8:08:00

0

1

Tall Format

t_stamp

Name

Value

2010-01-13 8:00:00

Valve1

0

2010-01-13 8:00:00

Valve2

2

2010-01-13 8:02:00

Valve1

0

2010-01-13 8:02:00

Valve2

2

2010-01-13 8:04:00

Valve1

1

2010-01-13 8:04:00

Valve2

2

2010-01-13 8:06:00

Valve1

1

2010-01-13 8:06:00

Valve2

1

2010-01-13 8:08:00

Valve1

0

2010-01-13 8:08:00

Valve2

1

Color Mapping 

Apart from getting the data into the series chart, the only other commonly configured option is the mapping of discrete values to colors. This is done in the Status Chart Customizer. Each named series can have its own mapping of colors, if desired. These mappings are stored in the expert-level dataset property Series Properties Data so they can be altered at runtime.

Properties
NameDescriptionProperty TypeScriptingCategory
Background ColorThe background color of the component. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.Color.backgroundAppearance
Border

The border surrounding this component. Options are: No border, Etched (Lowered), Etched (Raised), Bevel (Lowered), Bevel (Raised), Bevel (Double), Button Border, Field Border, Line Border, and Other Border.

The border is unaffected by rotation.

Border.borderCommon
Chart TitleTitle of this chart.String.chartTitleAppearance
CursorThe mouse cursor to use when hovering over this component. Options are: Default, Crosshair, Text, Wait, Hand, Move, SW Resize, or SE Resize.int.cursorCodeCommon
Data FormatFormat of the incoming data. In "wide" format, the first column of the dataset needs to be a timestamp, and every subsequent column represents one series in the chart. In "tall" format, the first column is a timestamp, the second column is a series name.int.dataFormatData
Date StyleThe style to display dates in. For international support.int.dateStyleAppearance
Domain Axis ColorColor used on the domain axis. See Color Selector.Color.domainAxisColorDomain Axis
Domain Axis FontFont used on the domain axis.Font.domainAxisFontDomain Axis
Domain Axis LabelLabel on the domain axis.String.domainAxisLabelDomain Axis
Domain Axis LocationLocation of the domain axis.int.domainAxisLocationDomain Axis
LegendMaps chart colors to descriptions.dataset.legendAppearance
Mouseover TextThe text that is displayed in the tooltip which pops up on mouseover of this component.String.toolTipTextCommon
NameThe name of this component.String.nameCommon
Properties LoadingThe number of properties currently being loaded. (Read only. Usable in bindings and scripting.)int.propertiesLoadingUncategorized
QualityThe data quality code for any Tag bindings on this component.QualityCode.qualityData
Range Axis ColorColor used on the range axis. See Color Selector.Color.rangeAxisColorRange Axis
Range Axis FontFont used on the range axis.Font.rangeAxisFontRange Axis
Range Axis LabelLabel on the range axis.String.rangeAxisLabelRange Axis
Range Axis LocationLocation of the range axis.int.rangeAxisLocationRange Axis
Range Axis Lower MarginLower margin of the range axis.double.rangeAxisLowerMarginRange Axis
Range Axis Upper MarginUpper margin of the range axis.double.rangeAxisUpperMarginRange Axis
Series DataData about each series. Data can be in either "wide" or "tall" format.Dataset.dataData
Series Properties DataProperties for each series.Dataset.propertiesData
Series SpacingAffects the amount of spacing between series. Can be between 0.0 and 1.0. The series present on this chart are given equal space to display themselves. Series spacing is the percentage of that space that they use to do so.double.seriesSpacingAppearance
Show Domain AxisSets whether or not the domain axis is visible.boolean.domainAxisVisibleDomain Axis
Show Range AxisSets whether or not the range axis is visible.boolean.rangeAxisVisibleRange Axis
Time StyleThe style to display times of day. For international support.int.timeStyleAppearance
Title ColorColor of the chart title. See Color Selector.Color.titleColorAppearance
Title FontFont on the chart title.Font.titleFontAppearance
VisibleIf disabled, the component will be hidden.boolean.visibleCommon
Deprecated Properties
Data QualityThe data quality code for any Tag bindings on this component.int.dataQualityDeprecated
Scripting

This component does not have scripting functions associated with it.


Extension Functions
 configureChart

The following feature is new in Ignition version 8.0.16
Click here to check out the other new features

  • Description

Provides an opportunity to perform further chart configuration via scripting.

  • Parameters

Component self- A reference to the component that is invoking this function.

JFreeChart chart- A JFreeChart object. Refer to the JFreeChart documentation for API details.

  • Return

Nothing

  • Scope

Client

 getToolTip
  • Description

Return a formatted tool tip String

  • Parameters

Component self- A reference to the component that is invoking this function.

int seriesIndex-The series index corresponding to the column in the series dataset.

int selectedTimeStamp-The time stamp corresponding to the x value of the displayed tooltip. The time stamp is the number of seconds since the epoch.

int timeDiff-The width of the current status interval measured in seconds since the epoch.

int seletedStatus-The status value corresponding to the x value of the displayed tooltip.

PyDataset data-The series dataset as a PyDataset.

PyDataset properties-The series properties dataset as a PyDataset.

string defaultString-The default tooltip string.

  • Return

String defaultString

  • Scope

Client


Event Handlers
 mouse
 mouseClicked

This event signifies a mouse click on the source component. A mouse click the combination of a mouse press and a mouse release, both of which must have occurred over the source component. Note that this event fires after the pressed and released events have fired.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseEntered

This event fires when the mouse enters the space over the source component.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseExited

This event fires when the mouse leaves the space over the source component.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mousePressed

This event fires when a mouse button is pressed down on the source component.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseReleased

This event fires when a mouse button is released, if that mouse button's press happened over this component.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseMotion
 mouseDragged

Fires when the mouse moves over a component after a button has been pushed.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseMoved

Fires when the mouse moves over a component, but no buttons are pushed.

.sourceThe component that fired this event
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 propertyChange
 propertyChange

Fires whenever a bindable property of the source component changes. This works for standard and custom (dynamic) properties.

.sourceThe component that fired this event
.newValueThe new value that this property changed to.
.oldValueThe value that this property was before it changed. Note that not all components include an accurate oldValue in their events.
.propertyName

The name of the property that changed.

Remember to always filter out these events for the property that you are looking for! Components often have many properties that change.

Customizers

The Status Chart component has its own customizer, used to set a number-to-color mapping for each series in the Series Data property.
 

Status Chart Customizer - Property Description

PropertyDescription
Series

Selectable list of all objects in the Series Data property.

  • Wide format: Each non-timestamp column.
  • Tall format: each unique value in the Name column.
Properties TableThe number-to-color mapping for the selected Series.
ValueA numeric value to match against.
ColorThe color to display for the given value.
Apply To AllSet all of the Series mappings to the currently selected mapping.


Examples

This example uses the Status Chart to display the state of each of the three machines over consecutive days using the Muli-State button. Tag History was turned on to record history HOA values. The Series Data property's dataset populates the Status Chart using a Tag History Binding. You can view the raw data by clicking on the Dataset Viewer icon to the right of the Series Data property. Each color represents a state for the machine and can be set in the Series Properties Data property. This example also has the raw data in the code block in case you want to try it for yourself. 



Series Data - Dataset Viewer



 Click to see Series Raw Data

Series Raw Data

"#NAMES"
"Timestamp","Machine 3","Machine 2","Machine 1"
"#TYPES"
"date","I","I","I"
"#ROWS","10"
"2008-10-15 00:00:00.000","0","0","1"
"2008-10-16 00:00:00.000","2","2","1"
"2008-10-17 00:00:00.000","0","0","0"
"2008-10-18 00:00:00.000","1","1","1"
"2008-10-19 00:00:00.000","0","0","2"
"2008-10-20 00:00:00.000","0","1","2"
"2008-10-21 00:00:00.000","0","0","1"
"2008-10-22 00:00:00.000","1","2","1"
"2008-10-23 00:00:00.000","0","1","1"
"2008-10-24 00:00:00.000","0","0","1"


Series Properties Data - Dataset Viewer

Each machine has three states, and each of the three states (i.e., HOA) have different colors assigned representing a different state.



 Click to see Series Properties Raw Data

Series Properties Raw Data

"#NAMES"
"SeriesName","Value","Color"
"#TYPES"
"str","I","clr"
"#ROWS","9"
"Series1","0","color(255,0,0,255)"
"Series1","1","color(0,255,0,255)"
"Series1","2","color(255,255,0,255)"
"Series2","0","color(255,0,0,255)"
"Series2","1","color(0,255,0,255)"
"Series2","2","color(255,255,0,255)"
"Series3","0","color(255,0,0,255)"
"Series3","1","color(0,255,0,255)"
"Series3","2","color(255,255,0,255)"



  • No labels