SMART datagrid v.1 > Classes > ShapeCellRenderer

Back  Forward

DataLudi.ShapeCellRenderer.scaleX  property

After determining the height of row, the padding of style and the size of shape by GridStyles.shapeSize, it adjusts the horizontal scale by scaleX value. 

Defaults to 1.0.

Getter
function scaleX(): Number
Setter
function setScaleX(value: Number)
Code -1
    grid.setColumns([{
        name: "Quantity",
        fieldName: "Quantity",
        type: "data",
        width: 70,
        renderer: {
            type: "shape",
            scaleX: 1.0,
            scaleY: 0.7
        },
        styles: {
            textAlignment: "far"
        },
        dynamicStyles: [{
            expression: "value > 40",
            styles: {
                shapeName: "star",
                shapeColor: "#ff00ffcc",
                shapeLocation: "center"
            }
        }],
        header: {
            text: "Quantity"
        }
    },
    ...
    ]);
See also
scaleY
Examples
ShapeRenderer