SMART datagrid v.1 > Examples

Back  Forward

SignalBar Cell Renderer  Example

SignalBarCellRenderer displays one or more vertical bars by increasing or decreasing gradually. The variation is specified through startRate and endRate. startRate and endRate have been set to the same value in "2002" column, while the value of startRate has been set greater than endRate in "2003" column to display a reduction pattern. 

And, if specify SignalBarCellRenderer.detailed as true, the value will also be displayed in details in the last bar. The color of the bar can be specified through GridStyles.shapeColor and shapeInactiveColor respectively. 

In "2002" column, the height of the bar has been lowered by specifying barRate value of the renderer less than 1. The space between the bars can be specified through barGap. And, the number of the bars being displayed is set through barCount. The default value is 10

Grid - 1
Code -1
    var columns = [{
        name: "col2003",
        fieldName: "f2003",
        renderer: {
            type: "signal",
            barCount: 7,
            maximum: 10,
            startRate: 1,
            endRate: 0.4,
            barGap: 3
        }
    },
    ...
    ];
    grid.setColumns(columns);

View Source JSP 

See Also
SignalBarCellRenderer
ValueColumn.renderer
Examples
Shape Renderer
Icon Renderer
Image Renderer