This sample shows how you can use cell padding and labels to make your data easier to read.
SpreadJS supports cell level padding and cell labels.
You can add padding for the cell by setting the style cellPadding property. Cell padding has the same policy as CSS Padding. For example:
var style = new GC.Spread.Sheets.Style();
style.cellPadding = "10";
The value of the label is taken from the watermark, for this reason, you need to set a watermark value when setting a cell label. For example:
style.watermark = "Spread.Sheets";
You can set the label style by setting the style labelOptions property. The labelOptions is an object and it has five properties:
alignment: The label position. There are six positions: topLeft, topCenter, topRight, bottomLeft, bottomCenter, and bottomRight. The default value is topLeft.
visibility: The label display mode, there are three display modes:
font: The label font. If there is no labelFont value, the style's font value is used. If there is no font value, the sheet default font value is used.
foreColor: The label forecolor. If there is no labelForeColor value, the style's foreColor value is used. If there is no foreColor value, the forecolor is 'grey'.
margin: The label margin. The label margin has the same policy as the CSS margin.