v7.3.0
SupportExamplesFree Trial

PercentColumn

A column that either displays a basic percent number, a rectangular progress bar, or a circular progress bar.

// grid with PercentColumn const grid = new Grid({ appendTo : targetElement, // makes grid as high as it needs to be to fit rows autoHeight : true, features : { sort : 'percent' }, data : [ { id : 1, name : 'Set up Confluence', percent : 25 }, { id : 2, name : 'Figma design', percent : 50 }, { id : 3, name : 'Safari UI tweaks', percent : 75 }, { id : 4, name : 'Responsive rendering', percent : 100 }, { id : 5, name : 'RTL support', percent : 125 } ], columns : [ { field : 'name', text : 'Name', flex : 1 }, { type : 'percent', field : 'percent', mode : 'bar', text : 'Bar shape', flex : 1, headerWidgets : [ { type : 'slidetoggle', text : 'Show value', style : 'margin-inline-start: auto', async onChange({ checked }) { this.owner.showValue = checked; } } ] }, { type : 'percent', field : 'percent', text : 'Circle', mode : 'circle', width : 100, align : 'center' }, { type : 'percent', field : 'percent', text : 'As text', mode : 'number', width : 100 } ] });

new Grid({
    appendTo : document.body,

columns : [ { type: 'percent', text: 'Progress', data: 'progress' } ] });

Styling

All cells in this column get a b-percent-cell class added.

If mode is set to bar (default), the progress bar element in the cell gets a few special CSS classes added:

  • If value equals 0, a b-zero CSS class is added to the circle element.
  • If value is less than lowThreshold, a b-low CSS class is added to the bar element.
  • If value equals 100, a b-full CSS class is added to the bar element.
  • If value is > 100, a b-over CSS class is added to the bar element.

If mode is set to circle, the progress circle element in the cell gets a few special CSS classes added:

  • If value equals 0, a b-empty CSS class is added to the circle element.
  • If value equals 100, a b-full CSS class is added to the circle element.
  • If value is > 100, a b-over CSS class is added to the circle element.

Default editor is a NumberField.

Useful configs

Config Description
mode Display mode: bar, circle, or number
lowThreshold Value below which b-low CSS class is added
showValue Show numeric value inside the bar

See also

No results

Fields

Fields belong to a Model class and define the Model data structure
  • This is a read-only field provided in server synchronization packets to specify which position the node takes in the parent's ordered children array. This index is set on load and gets updated on reordering nodes in tree. Sorting and filtering have no effect on it.

  • parentId : String/Number/null
    READONLY
    TreeNode

    This is a read-only field provided in server synchronization packets to specify which record id is the parent of the record.

  • This is a read-only field provided in server synchronization packets to specify which position the node takes in the parent's children array. This index is set on load and gets updated automatically after row reordering, sorting, etc. To save the order, need to persist the field on the server and when data is fetched to be loaded, need to sort by this field.

  • Deprecated:

    This field has been deprecated. Please read the guide to find out if your app needs to use the new isFullyLoaded field.

    This field is added to the class at runtime when the Store is configured with lazyLoad. The number specified should reflect the total amount of children of a parent node, including nested descendants.

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • fitMode : 'exact'/'textContent'/'value'/'none'/null'exact'
    NumberColumn

    Mode to use when measuring the contents of this column in calls to resizeToFitContent. Available modes are:

    • 'exact' - Most precise, renders and measures all cells (Default, slowest)
    • 'textContent' - Renders all cells but only measures the one with the longest textContent
    • 'value' - Renders and measures only the cell with the longest data (Fastest)
    • 'none'/falsy - Resize to fit content not allowed, a call does nothing

    Has a corresponding runtime fitMode property.

  • Column width as a flex weight. All columns with flex specified divide the available space (after subtracting fixed widths) between them according to the flex value. Columns that have flex : 2 will be twice as wide as those with flex : 1 (and so on)

    Has a corresponding runtime flex property.

  • Large step size, defaults to 10 * step. Applied when pressing SHIFT and stepping either by click or when using the Up/Down keys.

    Has a corresponding runtime largeStep property.

  • The maximum value for the field used during editing.

    Has a corresponding runtime max property.

  • Column maximal width. If value is Number, then maximal width is in pixels

    Has a corresponding runtime maxWidth property.

  • The minimum value for the field used during editing.

    Has a corresponding runtime min property.

  • Step size for the field used during editing. Also used when pressing up/down keys in the field.

    Has a corresponding runtime step property.

  • The text to show in the column header. You can display text vertically by setting the headerWritingMode property.

    Has a corresponding runtime text property.

  • Unit to append to displayed value.

    Has a corresponding runtime unit property.

  • Column width. If value is Number then width is in pixels

    Has a corresponding runtime width property.

  • The aria-label to use for this Column`s header element

    Has a corresponding runtime ariaLabel property.

  • The aria-label to use for cells in this Column

    Has a corresponding runtime cellAriaLabel property.

  • Set to true to have the cell editor for this column inherit formula providers from the Grid's configured formulaProviders.

    Has a corresponding runtime formula property.

  • pinned : 'start'/'end'/null/false
    NumberColumn

    Set to 'end' or 'start' to pin the column to the respective side of the grid when PinColumns feature is enabled.

    Has a corresponding runtime pinned property.

  • When a column is pinned and it does not have a width specified, pinnedWidth will be used instead.

    Has a corresponding runtime pinnedWidth property.

  • Set this to true to not allow any type of editing in this column.

    Has a corresponding runtime readOnly property.

  • Internal listeners, that cannot be removed by the user.

  • Used by the Export feature. Set to false to omit a column from an exported dataset

    Has a corresponding runtime exportable property.

  • Column type which will be used by TableExporter. See list of available types in TableExporter docs. Returns undefined by default, which means column type should be read from the record field.

    Has a corresponding runtime exportedType property.

  • Flag to enable vue component rendering

    Has a corresponding runtime vue property.

  • A config object used to configure an Editor which contains this Column's input field if CellEdit feature is enabled.

    Has a corresponding runtime cellEditor property.

  • The collapsed state of this column, only applicable for parent columns

    Has a corresponding runtime collapsed property.

  • If true, this column will show a collapse/expand icon in its header, only applicable for parent columns

    Has a corresponding runtime collapsible property.

  • Set to false to prevent this column header from being dragged

    Has a corresponding runtime draggable property.

  • Set to false to prevent grouping by this column

    Has a corresponding runtime groupable property.

  • Allow column visibility to be toggled through UI

    Has a corresponding runtime hideable property.

  • invalidAction : 'block'/'allow'/'revert''block'
    NumberColumn

    How to handle a request to complete a cell edit in this column if the field is invalid. There are three choices:

    • block The default. The edit is not exited, the field remains focused.
    • allow Allow the edit to be completed.
    • revert The field value is reverted and the edit is completed.

    Has a corresponding runtime invalidAction property.

  • Set to false to prevent the column from being drag-resized when the ColumnResize plugin is enabled.

    Has a corresponding runtime resizable property.

  • Setting this option means that pressing the Escape key after editing the field will revert the field to the value it had when the edit began. If the value is not changed from when the edit started, the input field's clearable behaviour will be activated. Finally, the edit will be canceled.

    Has a corresponding runtime revertOnEscape property.

  • Setting this flag to true will prevent dropping child columns into a group column

    Has a corresponding runtime sealed property.

  • Allow searching in the column (respected by QuickFind and Search features)

    Has a corresponding runtime searchable property.

  • align : 'left'/'center'/'right'/'start'/'end''end'
    NumberColumn

    Text align. Accepts 'left'/'center'/'right' or direction neutral 'start'/'end'

    Has a corresponding runtime align property.

  • Columns hidden state. Specify true to hide the column, false to show it.

    Has a corresponding runtime hidden property.

  • Convenient way of putting a column in the "locked" region. Same effect as specifying region: 'locked'. If you have defined your own regions (using subGridConfigs) you should use region instead of this one.

    Has a corresponding runtime locked property.

  • Column minimum width. If value is Number, then minimal width is in pixels

    Has a corresponding runtime minWidth property.

  • Set to false to prevent showing a context menu on the cell elements in this column

    Has a corresponding runtime enableCellContextMenu property.

  • false to prevent showing a context menu on the column header element

    Has a corresponding runtime enableHeaderContextMenu property.

  • Show column picker for the column

    Has a corresponding runtime showColumnPicker property.

  • Set to trueto automatically call DomHelper.sync for html returned from a renderer. Should in most cases be more performant than replacing entire innerHTML of cell and also allows CSS transitions to work. Has no effect unless htmlEncode is disabled. Returned html must contain a single root element (that can have multiple children). See PercentColumn for example usage.

    Has a corresponding runtime autoSyncHtml property.

  • An optional query selector to select a sub element within the cell being edited to align a cell editor's X position and width to.

    Has a corresponding runtime editTargetSelector property.

  • filterType : 'text'/'date'/'number'/'duration'
    NumberColumn

    Determines which type of filtering to use for the column. Usually determined by the column type used, but may be overridden by setting this field.

    Has a corresponding runtime filterType property.

  • By default, the header text is HTML-encoded. Set this flag to false disable this and allow html elements in the column header

    Has a corresponding runtime htmlEncodeHeaderText property.

  • Set to true to have the CellEdit feature update the record being edited live upon field edit instead of when editing is finished by using Tab or Enter

    Has a corresponding runtime instantUpdate property.

  • Set to false to disable localization of this object.

  • Column settings at different responsive levels, see responsive demo under examples/

    Has a corresponding runtime responsiveLevels property.

  • Tags, may be used by ColumnPicker feature for grouping columns by tag in the menu

    Has a corresponding runtime tags property.

  • Column config to apply to normal config if viewed on a touch device

    Has a corresponding runtime touchConfig property.

  • When using the tree feature, exactly one column should specify { tree: true }

    Has a corresponding runtime tree property.

  • Child columns. To create grouped headers, specify an array of column configs as children of a parent column.

  • CSS class added to each cell in this column

    Has a corresponding runtime cellCls property.

  • CSS class added to the header of this column

    Has a corresponding runtime cls property.

  • Icon to display in header. Specifying an icon will render a <i> element with the icon as value for the class attribute

    Has a corresponding runtime icon property.

  • When below this percentage the bar will have b-low CSS class added. By default, it turns the bar red.

    Has a corresponding runtime lowThreshold property.

  • mode : 'number'/'bar'/'circle'bar

    This mode controls the rendering.

    • number to render a formatted number value (e.g. 15%)
    • circle to render a circular progress bar
    • bar to render a plain rectangular progress bar

    Has a corresponding runtime mode property.

  • Set to true to render the number value inside the bar, for example '15%'.

    Has a corresponding runtime showValue property.

  • A tooltip string to show when hovering the column header, or a config object which can reconfigure the shared tooltip by setting boolean, numeric and string config values.

    Has a corresponding runtime tooltip property.

  • Summary configs, use if you need multiple summaries per column. Replaces sum and summaryRenderer configs.

    Has a corresponding runtime summaries property.

Properties

Properties are getters/setters or publicly accessible variables on this class
  • isEvents : Booleantrue
    READONLY
    static
    ADVANCED
    Events
    Identifies an object as an instance of Events class, or subclass thereof.
  • isLocalizable : Booleantrue
    READONLY
    static
    ADVANCED
    Localizable
    Identifies an object as an instance of Localizable class, or subclass thereof.
  • isModelStm : Booleantrue
    READONLY
    static
    ADVANCED
    ModelStm
    Identifies an object as an instance of ModelStm class, or subclass thereof.
  • isPercentColumn : Booleantrue
    READONLY
    static
    ADVANCED
    Identifies an object as an instance of PercentColumn class, or subclass thereof.
  • isTreeNode : Booleantrue
    READONLY
    static
    ADVANCED
    TreeNode
    Identifies an object as an instance of TreeNode class, or subclass thereof.
  • properties : Object
    internal
    static
    NumberColumn

    A class property getter for the default values of internal properties for this class.

  • An array containing all the defined fields for this Model class. This will include all superclass's defined fields.

  • fieldMap : Object<String, DataField>
    READONLY
    static
    NumberColumn

    An object containing all the defined fields for this Model class. This will include all superclass's defined fields through its prototype chain. So be aware that Object.keys and Object.entries will only access this class's defined fields.

  • The data source for the id field which provides the ID of instances of this Model.

  • fitMode : 'exact'/'textContent'/'value'/'none'/null'exact'
    NumberColumn

    Mode to use when measuring the contents of this column in calls to resizeToFitContent. Available modes are:

    • 'exact' - Most precise, renders and measures all cells (Default, slowest)
    • 'textContent' - Renders all cells but only measures the one with the longest textContent
    • 'value' - Renders and measures only the cell with the longest data (Fastest)
    • 'none'/falsy - Resize to fit content not allowed, a call does nothing

    Has a corresponding fitMode config.

  • Column width as a flex weight. All columns with flex specified divide the available space (after subtracting fixed widths) between them according to the flex value. Columns that have flex : 2 will be twice as wide as those with flex : 1 (and so on)

    Has a corresponding flex config.

  • Large step size, defaults to 10 * step. Applied when pressing SHIFT and stepping either by click or when using the Up/Down keys.

    Has a corresponding largeStep config.

  • The maximum value for the field used during editing.

    Has a corresponding max config.

  • Column maximal width. If value is Number, then maximal width is in pixels

    Has a corresponding maxWidth config.

  • The minimum value for the field used during editing.

    Has a corresponding min config.

  • Step size for the field used during editing. Also used when pressing up/down keys in the field.

    Has a corresponding step config.

  • The text to show in the column header. You can display text vertically by setting the headerWritingMode property.

    Has a corresponding text config.

  • Unit to append to displayed value.

    Has a corresponding unit config.

  • Column width. If value is Number then width is in pixels

    Has a corresponding width config.

  • The aria-label to use for this Column`s header element

    Has a corresponding ariaLabel config.

  • The aria-label to use for cells in this Column

    Has a corresponding cellAriaLabel config.

  • emptyArray : Array
    internal
    READONLY
    NumberColumn

    An empty array that can be used as a default value.

  • emptyObject : Object
    internal
    READONLY
    NumberColumn

    An empty object that can be used as a default value.

  • isColumn : Booleantrue
    READONLY
    ADVANCED
    NumberColumn
    Identifies an object as an instance of Column class, or subclass thereof.
  • isModel : Booleantrue
    READONLY
    ADVANCED
    NumberColumn
    Identifies an object as an instance of Model class, or subclass thereof.
  • isNumberColumn : Booleantrue
    READONLY
    ADVANCED
    NumberColumn
    Identifies an object as an instance of NumberColumn class, or subclass thereof.
  • isPercentColumn : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of PercentColumn class, or subclass thereof.
  • allIndex : Number
    internal
    READONLY
    NumberColumn

    Index among all flattened columns

  • Returns true if this column can currently be sorted by the user. Checks both the column's own sortable config and whether the Sort feature is enabled on the grid.

  • defaultEditor : Object
    private
    READONLY
    NumberColumn

    A config object specifying the editor to use to edit this column.

  • Default settings for the column, applied in constructor. None by default, override in subclass.

  • editor : Field
    private
    READONLY
    NumberColumn

    The Field to use as editor for this column

    Has a corresponding editor config.

  • editorField : String
    internal
    READONLY
    NumberColumn

    Yields the name of the record field which the CellEdit feature edits when invoked on this column. This is usually this Column's field, but Column subclasses may implement this property.

  • Set to true to have the cell editor for this column inherit formula providers from the Grid's configured formulaProviders.

    Has a corresponding formula config.

  • Get the Grid instance to which this column belongs

  • headerText : String
    internal
    READONLY
    NumberColumn

    Returns header text based on htmlEncodeHeaderText config value.

  • headerWidgetMap : Object<String, Widget>
    internal
    READONLY
    NumberColumn

    An object which contains a map of the widgets contained in this column header keyed by their ref.

  • pinned : 'start'/'end'/null/false
    NumberColumn

    Set to 'end' or 'start' to pin the column to the respective side of the grid when PinColumns feature is enabled.

    Has a corresponding pinned config.

  • When a column is pinned and it does not have a width specified, pinnedWidth will be used instead.

    Has a corresponding pinnedWidth config.

  • Set this to true to not allow any type of editing in this column.

    Has a corresponding readOnly config.

  • Get the SubGrid to which this column belongs

  • Get the element for the SubGrid to which this column belongs

  • Set this column to be visible or not

  • For copied records, this property links to the original model instance from which it was copied.

  • True if this Model is currently batching its changes.

  • True if this models changes are currently being committed.

  • True if this model has any uncommitted changes.

  • Check if record has valid data. Default implementation returns true, override in your model to do actual validation.

  • Get a map of the modified fields in form of an object. The field´s dataSource is used as the property name in the returned object. The record's id is included unless its persist config is false.

  • Get a map of the modified data fields along with any alwaysWrite fields, in form of an object. The field´s dataSource is used as the property name in the returned object. Used internally by AjaxStore / CrudManager when sending updates.

  • persistableData : Object
    internal
    READONLY
    NumberColumn

    Returns data for allpersistable fields in form of an object, using dataSource if present.

  • Returns a map of the modified persistable fields

  • Used by the Export feature. Set to false to omit a column from an exported dataset

    Has a corresponding exportable config.

  • Column type which will be used by TableExporter. See list of available types in TableExporter docs. Returns undefined by default, which means column type should be read from the record field.

    Has a corresponding exportedType config.

  • Returns the string value for display purposes of an instance of this Model class. Needs to be overridden in subclasses.

  • When called on a group header row returns list of records in that group. Returns undefined otherwise.

  • Returns true for a group header record

  • Gets the records internalId. It is assigned during creation, guaranteed to be globally unique among models.

  • Returns true if the record is new and has not been persisted (and received a proper id).

  • Flag to enable vue component rendering

    Has a corresponding vue config.

  • A config object used to configure an Editor which contains this Column's input field if CellEdit feature is enabled.

    Has a corresponding cellEditor config.

  • The collapsed state of this column, only applicable for parent columns

    Has a corresponding collapsed config.

  • If true, this column will show a collapse/expand icon in its header, only applicable for parent columns

    Has a corresponding collapsible config.

  • Set to false to prevent this column header from being dragged

    Has a corresponding draggable config.

  • Set to false to prevent grouping by this column

    Has a corresponding groupable config.

  • Allow column visibility to be toggled through UI

    Has a corresponding hideable config.

  • invalidAction : 'block'/'allow'/'revert''block'
    NumberColumn

    How to handle a request to complete a cell edit in this column if the field is invalid. There are three choices:

    • block The default. The edit is not exited, the field remains focused.
    • allow Allow the edit to be completed.
    • revert The field value is reverted and the edit is completed.

    Has a corresponding invalidAction config.

  • Set to false to prevent the column from being drag-resized when the ColumnResize plugin is enabled.

    Has a corresponding resizable config.

  • Setting this option means that pressing the Escape key after editing the field will revert the field to the value it had when the edit began. If the value is not changed from when the edit started, the input field's clearable behaviour will be activated. Finally, the edit will be canceled.

    Has a corresponding revertOnEscape config.

  • Setting this flag to true will prevent dropping child columns into a group column

    Has a corresponding sealed config.

  • Allow searching in the column (respected by QuickFind and Search features)

    Has a corresponding searchable config.

  • align : 'left'/'center'/'right'/'start'/'end''end'
    NumberColumn

    Text align. Accepts 'left'/'center'/'right' or direction neutral 'start'/'end'

    Has a corresponding align config.

  • Columns hidden state. Specify true to hide the column, false to show it.

    Has a corresponding hidden config.

  • Convenient way of putting a column in the "locked" region. Same effect as specifying region: 'locked'. If you have defined your own regions (using subGridConfigs) you should use region instead of this one.

    Has a corresponding locked config.

  • Column minimum width. If value is Number, then minimal width is in pixels

    Has a corresponding minWidth config.

  • config : Object
    READONLY
    ADVANCED
    NumberColumn

    Returns a copy of the full configuration which was used to configure this object.

  • isConstructing : Boolean
    READONLY
    ADVANCED
    NumberColumn

    This property is set to true before the constructor returns.

  • isDestroying : Boolean
    READONLY
    ADVANCED
    NumberColumn

    This property is set to true on entry to the destroy method. It remains on the objects after returning from destroy(). If isDestroyed is true, this property will also be true, so there is no need to test for both (for example, comp.isDestroying || comp.isDestroyed).

  • Is this record linked to another record?

  • Get the original record this record is linked to.

  • Set to false to prevent showing a context menu on the cell elements in this column

    Has a corresponding enableCellContextMenu config.

  • false to prevent showing a context menu on the column header element

    Has a corresponding enableHeaderContextMenu config.

  • Show column picker for the column

    Has a corresponding showColumnPicker config.

  • Set to trueto automatically call DomHelper.sync for html returned from a renderer. Should in most cases be more performant than replacing entire innerHTML of cell and also allows CSS transitions to work. Has no effect unless htmlEncode is disabled. Returned html must contain a single root element (that can have multiple children). See PercentColumn for example usage.

    Has a corresponding autoSyncHtml config.

  • An optional query selector to select a sub element within the cell being edited to align a cell editor's X position and width to.

    Has a corresponding editTargetSelector config.

  • filterType : 'text'/'date'/'number'/'duration'
    NumberColumn

    Determines which type of filtering to use for the column. Usually determined by the column type used, but may be overridden by setting this field.

    Has a corresponding filterType config.

  • Get the first store that this model is assigned to.

  • By default, any rendered column cell content is HTML-encoded. Set this flag to false disable this and allow rendering html elements

  • By default, the header text is HTML-encoded. Set this flag to false disable this and allow html elements in the column header

    Has a corresponding htmlEncodeHeaderText config.

  • Set to true to have the CellEdit feature update the record being edited live upon field edit instead of when editing is finished by using Tab or Enter

    Has a corresponding instantUpdate config.

  • Get the global LocaleHelper

  • Get the global LocaleManager

  • Column settings at different responsive levels, see responsive demo under examples/

    Has a corresponding responsiveLevels config.

  • Reference to STM manager, if used

  • Tags, may be used by ColumnPicker feature for grouping columns by tag in the menu

    Has a corresponding tags config.

  • Column config to apply to normal config if viewed on a touch device

    Has a corresponding touchConfig config.

  • When using the tree feature, exactly one column should specify { tree: true }

    Has a corresponding tree config.

  • This yields true if this record is eligible for syncing with the server. It can yield false if the record is in the middle of a batched update, or if it is a tentative record yet to be confirmed as a new addition.

  • isRemoved : Boolean
    internal
    READONLY
    NumberColumn

    Returns true if this record is not part of any store.

  • Retrieve all children, excluding filtered out nodes (by traversing sub nodes)

  • Retrieve all children, including filtered out nodes (by traversing sub nodes)

  • Depth in the tree at which this node exists. First visual level of nodes are at level 0, their direct children at level 1 and so on.

  • Count all children (including sub-children) for a node (in its `firstStore´)

  • Get the first child of this node

  • indexPath : Number[]
    private
    READONLY
    NumberColumn

    Returns index path to this node. This is the index of each node in the node path starting from the topmost parent. (only relevant when its part of a tree store).

  • Is a leaf node in a tree structure?

  • Returns true for parent nodes with children loaded (there might still be no children)

  • Is a parent node in a tree structure?

  • Returns true if this node is the root of the tree

  • Get the last child of this node

  • Get the next sibling of this node

  • parent : Model
    READONLY
    TreeNode

    This is a read-only property providing access to the parent node.

  • Get the previous sibling of this node

  • Returns count of all preceding sibling nodes (including their children).

  • Array of tree nodes without any filter applied. On first filter, will take order from sorted children, but is not thereafter kept in sorted order, so order should not be relied upon.

  • Count visible (expanded) children (including sub-children) for a node (in its firstStore)

  • CSS class added to each cell in this column

    Has a corresponding cellCls config.

  • CSS class added to the header of this column

    Has a corresponding cls config.

  • Icon to display in header. Specifying an icon will render a <i> element with the icon as value for the class attribute

    Has a corresponding icon config.

  • When below this percentage the bar will have b-low CSS class added. By default, it turns the bar red.

    Has a corresponding lowThreshold config.

  • mode : 'number'/'bar'/'circle'bar

    This mode controls the rendering.

    • number to render a formatted number value (e.g. 15%)
    • circle to render a circular progress bar
    • bar to render a plain rectangular progress bar

    Has a corresponding mode config.

  • Set to true to render the number value inside the bar, for example '15%'.

    Has a corresponding showValue config.

  • A tooltip string to show when hovering the column header, or a config object which can reconfigure the shared tooltip by setting boolean, numeric and string config values.

    Has a corresponding tooltip config.

  • sum : 'sum'/'add'/'count'/'countNotEmpty'/'average'+ 1 more
    NumberColumn

    Summary type (when using Summary feature). Valid types are:

    • 'sum' - Sum of all values in the column
    • 'add' - Alias for sum
    • 'count' - Number of rows
    • 'countNotEmpty' - Number of rows containing a value
    • 'average' - Average of all values in the column
    • callbackFn - A custom function, used with store.reduce. Its return value becomes the value of the accumulator parameter on the next invocation of callbackFn

    Has a corresponding sum config.

  • Summary configs, use if you need multiple summaries per column. Replaces sum and summaryRenderer configs.

    Has a corresponding summaries config.

  • Returns values of the persistable tree-defining fields: parentId, orderedParentIndex, and parentIndex or sparseIndex. parentIndex is omitted when sparseIndex is used.

Functions

Functions are methods available for calling on the class
  • onClassMixedIn( )
    internal
    static
    NumberColumn

    This optional class method is called when a class is mixed in using the mixin() method.

  • initClass( )
    static
    ADVANCED
    NumberColumn

    Registers this class type with its Factory

  • exposeRelations( )
    internal
    static
    NumberColumn

    Makes getters and setters for related records. Populates a Model#relation array with the relations, to allow it to be modified later when assigning stores.

  • Apply state to column, used by State mixin

  • Get column state, used by State mixin

  • Hides this column.

  • Refreshes all the cells for this column

  • Rerender the header for this column

  • Shows this column.

  • Cancels current batch operation. Any changes during the batch are discarded.

  • Reverts changes in this back to their original values.

  • Internal function used to hook destroy() calls when using thisObj

  • Internal function used restore hooked destroy() calls when using thisObj

  • doDestroy( )
    internal
    Events

    Auto detaches listeners registered from start, if set as detachable

  • once( )
    private
    Events

    Internal function used to run a callback function after an event is triggered

  • Removes all listeners registered to this object by the application.

  • Called from insertChild to notify StateTrackingManager about children insertion. Provides it with all necessary context information collected in beforeInsertChild required to undo/redo the action.

  • Called from removeChild to notify StateTrackingManager about children removing. Provides it with all necessary context information collected in beforeRemoveChild required to undo/redo the action.

  • Called during creation to also turn any children into Models joined to the same stores as this model

  • Initializes model relations. Called from store when adding a record.

  • clear( )
    private
    TreeNode

    Removes all records from the rootNode

Events

Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

Event handlers

Event handlers are callbacks called as a result of certain actions in this class

CSS variables

CSS variables that can be set to adjust appearance
Name Description
--b-percent-column-bar-background
bar
Percent bar background color (the "empty" part of the bar)
--b-percent-column-bar-border
bar
Percent bar border
--b-percent-column-bar-border-radius
bar
Percent bar border radius
--b-percent-column-bar-max-height
bar
Percent bar max height
--b-percent-column-circle-background
circle
Background color for the circle in "circle" mode
--b-percent-column-circle-done-color
circle
Color of the filled part of the circle in "circle" mode
--b-percent-column-circle-label-background
circle
Background color for the label (center) in "circle" mode
--b-percent-column-circle-label-color
circle
Value label's color in "circle" mode
--b-percent-column-circle-label-font-size
circle
Label font size in "circle" mode
--b-percent-column-circle-thickness
circle
Thickness of the outer circle in "circle" mode
--b-percent-column-fill-background
bar
Fill color for the bar (the "filled" part of the bar)
--b-percent-column-low-fill-background
bar
Fill color for the bar when value is below `lowThreshold`
--b-percent-column-low-value-color
bar
Value label's color when the value is below `lowThreshold`
--b-percent-column-value-color Value label's color
--b-percent-column-wide-value-color
bar
Value label's color when the bar is wide, and label gets moved inside the bar
--b-percent-column-zero-value-color
bar
Value label's color when the value is zero
type: percent

Source path

Grid/column/PercentColumn.js

Contents