Class

SpotfireBarChart

SpotfireBarChart([barChartProperties])

Represents a Bar Chart.

Constructor

new SpotfireBarChart([barChartProperties])

Parameters:
Name Type Description
[ barChartProperties ] Object
[ general ] Object
title String

The title of the visualization.

description String

The description of the visualization.

showTitleBar Boolean

Specifies whether or not to show the visualization title.

[ data ] VisualDataDescription
[ appearance ] Object
useSeparateColorForMarkedItems Boolean

Specifies whether or not the marking color should be used to distinguish marked items in the visualization.

transparency Number

Specifies the transparency of the markers, between 0.0 and 1.0.

orientation SpotfireBarChartOrientations

Specifies if the bars should be displayed vertically or horizontally in the visualization.

vertical String

To display the bars in the visualization vertically.
Other accepted values: 'Vertical bars', 'Vertical'.

horizontal String

To display the bars in the visualization horizontally.
Other accepted values: 'Horizontal bars', 'Horizontal'.

layout SpotfireBarChartLayouts

Specifies how to place bars in the visualization.

sideBySide String

To place bars from the color category side-by-side instead of stacked on top of each other.
Other available values: 'Side-by-side bars', 'None'.

stack String

To keep color categories stacked on top of each other. Note: This option should not be used if you want to display error bars in the bar chart.
Other available values: 'Stacked bars', 'Stack'.

stack100Percent String

to set the heights of all bars to 100%. The size of the bar segments represents how much of the percentage of the total sum for the group is constituted of the sums of the values in the category. The exact percentage of each category can be seen in the tooltip displayed when hovering with the mouse pointer over a bar segment. Note: This option should not be used if you want to display error bars in the bar chart.
Other available values: 'Stacked bars', 'Stack'.

barWidth Number

Specifies the width of the bars, between 0 and 100.

showShadowBars Boolean

Specifies whether or not a gray shadow should be shown behind all visible bars, indicating the height of the bar if all filters are reset and all data is available.

sortBarsByValue Boolean

Specifies whether or not the bars should be sorted from the highest to the lowest bar. When filtering is applied, the sorting is updated.

sortSegmentsBySize Boolean

Specifies whether or not the bar segments should be sorted within each stacked bar by size. The highest segment is placed at the base of the bar, and the lowest segment at the top.

reverseBarSegmentOrder Boolean

Specifies whether or not the current order of the bar segments in each bar should be reversed, that is, the segment currently placed at the top will be placed at the bottom, the segment next to top will be placed second-bottom, and so on.

compensateForMissingValues Boolean

Use this option if you are using a Date, Time or DateTime column somewhere in the visualization and you need to perform some calculation where a required time period is missing. For example, if you have created a visualization showing cumulative sums and there are missing data for some categories, setting this option to true will produce a bar of the same size as the previous bar instead of showing no bar at all.
Enabling this setting will temporarily add new rows with empty values for the missing periods so that they can be used in the calculation.

[ fonts ] Object
legend VisualFontDescription

To change the font settings of the legend.

fontFamily string

Specifies a specific font to use.

size number

Specifies a specific font size to use.

bold boolean

Specifies if the font style Bold should be used.

italic boolean

Specifies if the font style Italic should be used.

detailsVisualizationMessage VisualFontDescription

To change the font settings of the details visualization message.

fontFamily string

Specifies a specific font to use.

size number

Specifies a specific font size to use.

bold boolean

Specifies if the font style Bold should be used.

italic boolean

Specifies if the font style Italic should be used.

[ legend ] Object
visible Boolean

Specifies whether or not the legend should be shown in the visualization.

position SpotfireLegendPositions

Specifies which side of the visualization the legend should be positioned: the right-hand side or the left-hand side.

left String

To place the legend on the left-hand side.
Other available value: 'Left'.

right String

To place the legend on the right-hand side.
Other available value: 'Right'.

width Number

Specifies the width, in pixels, of the legend as it is displayed in the user interface.

legendItems Array.<VisualLegendItemDescription>

Defines how the legend items should be displayed. The available options vary between legend items.

[ showHideItemsRules ] Array.<VisualShowHideItemsRuleDescription>
[ xAxis ] SpotfireScaleAxis
[ yAxis ] SpotfireScaleAxis
[ colors ] SpotfireColorAxis
[ tooltip ] SpotfireTooltip
[ trellis ] TrellisDescription
trellisMode SpotfireTrellisModes

'Rows and columns': splits the visualization into different panels for all categories in the selected column or hierarchy. The number of values in the specified column or hierarchy controls the number of panels to be displayed in each row, column, or page, respectively.
'Panels': splits the visualization into different panels for all categories in the selected column or hierarchy, without binding any dimensions to either rows or columns. This means that the number of actual values in the column to split by does not control the number of shown rows or columns in any way.

rowsColumns String
panels String
rowAxis trellisAxisDescription

A row with trellis panels will be created for each value in the column or hierarchy.

hierarchyOption SpotfireTrellisAxisHierarchyOptions

[For hierarchical categories only, but not available for Date, Time or DateTime hierarchies.] 'Use actual combinations in data only (nest)': to display all combinations available in the data; 'Use all possible combinations (cross)': to display all possible combinations, even showing categories that are currently not included in the data.

nest String
cross String
columnAxis trellisAxisDescription

A column with trellis panels will be created for each value in the column or hierarchy.

hierarchyOption SpotfireTrellisAxisHierarchyOptions

[For hierarchical categories only, but not available for Date, Time or DateTime hierarchies.] 'Use actual combinations in data only (nest)': to display all combinations available in the data; 'Use all possible combinations (cross)': to display all possible combinations, even showing categories that are currently not included in the data.

nest String
cross String
pageAxis trellisAxisDescription

A new page with trellis panels will be created for each value in the column or hierarchy.

hierarchyOption SpotfireTrellisAxisHierarchyOptions

[For hierarchical categories only, but not available for Date, Time or DateTime hierarchies.] 'Use actual combinations in data only (nest)': to display all combinations available in the data; 'Use all possible combinations (cross)': to display all possible combinations, even showing categories that are currently not included in the data.

nest String
cross String
panelAxis trellisAxisDescription

Specifies the column or hierarchy to define the categories by which the visualization should be split.

hierarchyOption SpotfireTrellisAxisHierarchyOptions

[For hierarchical categories only, but not available for Date, Time or DateTime hierarchies.] 'Use actual combinations in data only (nest)': to display all combinations available in the data; 'Use all possible combinations (cross)': to display all possible combinations, even showing categories that are currently not included in the data.

nest String
cross String
manualLayout Boolean

To manually specify the number of rows and columns that should be visible without scrolling.

maxNumberOfRows Number

Specifies the maximum number of panels that should be visible on each page.

maxNumberOfColumns Number

Specifies the maximum number of panels that should be visible on each page.

[ labels ] Object
showLabelsFor SpotfireLabelVisibilities

Determines whether to show labels on all markers ('All'), marked markers only ('Marked rows'), or not to show any labels at all ('None').

labelOrientation SpotfireLabelOrientations

Determines whether to display the labels horizontally or vertically.

horizontal String
vertical String
completeBar Boolean

Determines whether or not to show labels on the complete bar.

barSegments Boolean

Determines whether or not to show labels on the bar segments.

labelType SpotfireLabelInformationTypes

Specifies whether to display the value of the bar segment ('Value') or the percentage of the bar segments in relation to the total value ('Percentage').

maxNumberOfLabels Number

Specifies the maximum number of labels to be shown. If the number is smaller than the available number of bars, the labels will be equally distributed along the category axis.

barPercentageDecimals Number

Specifies the number of decimals to show when 100% bars are used.

Methods

defaultAppearanceProperties()

Sets the default "Appearance" properties of the visualization.

Overrides:

getShowHideItemsRule()

Gets the "Show/Hide Items" rule, given its display name.

Overrides:

getUniqueId() → {Number}

Gets a unique identifier for the visualization.

Overrides:

The generated identifier.

Number

getVisualTypeName() → {String}

Gets the type of the visualization.

Overrides:

The type of the visualization.

String