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 Bar Chart is a very easy-to-use chart that provides a familiar bar representation of any numeric values. That is, the height of the bars is determined by some numeric value in the underlying dataset. It is often configured to display as a category chart. A category chart is a chart whose X-values are categories (strings, names, groupings, etc) rather than numeric values (numbers, dates).

Like most chart components (other than the Easy Chart), the Data property drives the chart. The first column in the Data dataset defines the names of the categories. The rest of the columns define the values for each of the series (if there is more than one series per category), and thus should be numeric. Note - if your data is 'turned on its side', meaning that the columns define the categories and rows define the series, then set the Extract Order to "By Column".

Properties
NameDescriptionProperty TypeScriptingCategory
Bar Label ColorThe color for the bar labels. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.Color.barLabelColorAxes
Bar Label FontThe font for the bar labels.Font.barLabelFontAxes
Bar Label OffsetThe offset between the bar and the bar label.double.barLabelOffsetAxes
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
Category Axis LabelThe label for the category axis.String.categoryLabelAxes
Category Axis Label AngleThe angle for the value axis' labels.int.catAxisLabelPositionAxes
Category Axis Label ColorThe color for the category axis label. See Color Selector.Color.catAxisLabelColorAxes
Category Axis Label FontThe font for the category axis label.Font.catAxisLabelFontAxes
Category Axis Lower MarginThe lower margin, as a percentage, of the category axis.double.catAxisLowerMarginAxes
Category Axis Tick ColorThe color for the category axis' ticks. See Color Selector.Color.catAxisTickColorAxes
Category Axis Tick FontThe font for the category axis' ticks.Font.catAxisTickFontAxes
Category Axis Upper MarginThe upper margin, as a percentage, of the category axis.double.catAxisUpperMarginAxes
Category MarginThe margin between categories as a fraction of the total space.double.categoryMarginAppearance
Chart TitleAn optional title that will appear at the top of the chart.String.titleAppearance
Chart TypeControls how the bar chart is displayed.int.rendererTypeAppearance
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
DataThe data driving the chart.Dataset.dataData
Extract OrderControls whether the first row defines the categories or the series.int.extractOrderData
Foreground TransparencyThe transparency of the bars (useful for 3D bars). Valid values are between 0 (0% opacity) and 1 (100% opacity).float.foregroundAlphaAppearance
Gradient bars?If true, bars will be painted with a gradient 'shine'.boolean.gradientAppearance
Item MarginThe margin between bars in a category as a fraction.double.itemMarginAppearance
Labels?Always display labels?boolean.labelsAppearance
Legend FontThe font for the legend items.Font.legendFontAxes
Legend? If true, show a legend for the chart.boolean.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
Plot BackgroundThe background color for the plot.Color.plotBackgroundAppearance
QualityThe data quality code for any Tag bindings on this component.QualityCode.qualityData
Series ColorsThe sequence of colors used for series in the bar chart. See Color Selector.Color[].seriesColorsAppearance
Shadows?If true, bars will have a drop-shadow beneath them.boolean.shadowsAppearance
Title FontThe font for the chart's title.Font.titleFontAxes
Tooltips? If true, show tooltips.boolean.tooltipsBehavior
Value Axis Auto-RangeIf true, the value axis range will be determined automatically. If false, the specified upper and lower bounds will be used.boolean.valAxisAutoRangeAxes
Value Axis LabelThe label for the value axisString.valueLabelAxes
Value Axis Label ColorThe color for the value axis label. See Color Selector.Color.valAxisLabelColorAxes
Value Axis Label FontThe font for the value axis label.Font.valAxisLabelFontAxes
Value Axis Lower BoundThe lower bound of the value axis. Used only when auto-range is false.double.valAxisLowerBoundAxes
Value Axis Tick ColorThe color for the value axis' ticks. See Color Selector.Color.valAxisTickColorAxes
Value Axis Tick FontThe font for the value axis' ticks.Font.valAxisTickFontAxes
Value Axis Upper BoundThe upper bound of the value axis. Used only when auto-range is false.double.valAxisUpperBoundAxes
Value Axis Upper MarginThe upper margin, as a percentage, of the value axis. Only used when auto-range is true.double.valAxisUpperMarginAxes
VerticalSets the orientation of the chart to vertical (true) or horizontal(false)boolean.verticalAppearance
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 Functions

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

 getBarColor
  • Description

Provides a chance to override the color of each bar. Can be used to have bar colors changed based upon bar value. Returning the value None will use the default bar color for the series.

  • Parameters

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

int series - The series index for this bar.

int category - The category index for this bar.

int value - The value (a number) of this bar.

Color defaultColor - The color that the bar would be if this function wasn't invoked.

  • Return

Color

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

Example

  • No labels