# Formatting Shapes

## Content

SpreadJS supports different types of compound lines in shapes which can be used to customize their appearance. The following types are supported:

| @cols=3:**Compound Line Types** |
| ------------------- | ------------------- | ------------------- |
| ![simple-line.png](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/simple-line.0e27b3.png) | ![double-line.png](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/double-line.3d276e.png) | ![thick-thin-line.png](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/thick-thin-line.4cbd11.png) |
| ![thin-thick-line.png](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/thin-thick-line.f66a78.png) | ![triple-line.png](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/triple-line.0c5833.png) |

The following code sample adds compound lines in auto shapes and connectors to display the below image.

![](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/images/compound-example.png)

```javascript
function applyShapeStyle(shapeVar) {
    var shapeStyle = shapeVar.style();
    shapeStyle.fill.color = "pink";
    shapeStyle.line.joinType = 1;
    //Add compound line type double
    shapeStyle.line.compoundType = 1;
    shapeStyle.line.color = "grey";
    shapeStyle.line.width = 5;
    shapeStyle.textFrame.vAlign = GC.Spread.Sheets.VerticalAlign.center;
    shapeStyle.textFrame.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
    shapeVar.style(shapeStyle);
}

function applyLineStyle(lineVar) {
    var style = lineVar.style(); 
    var line = style.line; 
    line.width = 10; 
    line.color = 'pink';
    line.endArrowheadStyle = GC.Spread.Sheets.Shapes.ArrowheadStyle.triangle;
    //Add compound line type thickThin
    line.compoundType = GC.Spread.Sheets.Shapes.CompoundType.thickThin;  
    lineVar.style(style);
}
```