forked from sheetjs/sheetjs
Update README for textRotation
This commit is contained in:
commit
9b76f6b1f5
113
README.md
113
README.md
@ -437,31 +437,32 @@ top-level attributes: `fill`, `font`, `numFmt`, `alignment`, and `border`.
|
||||
|
||||
| Style Attribute | Sub Attributes | Values |
|
||||
| :-------------- | :------------- | :------------- | :----- |
|
||||
| fill | patternType | 'solid' or 'none' |
|
||||
| | fgColor | COLOR_SPEC
|
||||
| | bgColor | COLOR_SPEC
|
||||
| font | name | "Calibri" // default
|
||||
| | sz | "11" // font size in points
|
||||
| | color | COLOR_SPEC
|
||||
| numFmt | | "0" // integer index to built in formats, see StyleBuilder.SSF property
|
||||
| | | "0.00%" // string matching a built-in format, see StyleBuilder.SSF
|
||||
| | | "0.0%" // string specifying a custom format
|
||||
| | | "0.00%;\\(0.00%\\);\\-;@" // string specifying a custom format, escaping special characters
|
||||
| alignment | vertical | "bottom"||"center"||"top"
|
||||
| | horizontal | "bottom"||"center"||"top"
|
||||
| | textRotation | Number from 0 to 180 or 255 (default is 0)
|
||||
| | | "90" is rotated up 90 degrees
|
||||
| | | "45" is rotated up 45 degrees
|
||||
| | | "135" is rotated down 45 degrees
|
||||
| | | "180" is rotated down 180 degrees
|
||||
| | | "255" is special, aligned vertically
|
||||
| border | top | { style: BORDER_STYLE, color: COLOR_SPEC }
|
||||
| | bottom | { style: BORDER_STYLE, color: COLOR_SPEC }
|
||||
| | left | { style: BORDER_STYLE, color: COLOR_SPEC }
|
||||
| | right | { style: BORDER_STYLE, color: COLOR_SPEC }
|
||||
| | diagonal | { style: BORDER_STYLE, color: COLOR_SPEC }
|
||||
| | diagonalUp | true||false
|
||||
| | diagonalDown | true||false
|
||||
| fill | patternType | `"solid"` or `"none"` |
|
||||
| | fgColor | `COLOR_SPEC`
|
||||
| | bgColor | `COLOR_SPEC`
|
||||
| font | name | `"Calibri"` // default
|
||||
| | sz | `"11"` // font size in points
|
||||
| | color | `COLOR_SPEC`
|
||||
| numFmt | | `"0"` // integer index to built in formats, see StyleBuilder.SSF property
|
||||
| | | `"0.00%"` // string matching a built-in format, see StyleBuilder.SSF
|
||||
| | | `"0.0%"` // string specifying a custom format
|
||||
| | | `"0.00%;\\(0.00%\\);\\-;@"` // string specifying a custom format, escaping special characters
|
||||
| alignment | vertical | `"bottom"||"center"||"top"`
|
||||
| | horizontal | `"bottom"||"center"||"top"`
|
||||
| | textRotation | Number from `0` to `180` or `255` (default is `0`)
|
||||
| | | `90` is rotated up 90 degrees
|
||||
| | | `45` is rotated up 45 degrees
|
||||
| | | `135` is rotated down 45 degrees
|
||||
| | | `180` is rotated down 180 degrees
|
||||
| | | `255` is special, aligned vertically
|
||||
| border | top | `{ style: BORDER_STYLE, color: COLOR_SPEC }`
|
||||
| | bottom | `{ style: BORDER_STYLE, color: COLOR_SPEC }`
|
||||
| | left | `{ style: BORDER_STYLE, color: COLOR_SPEC }`
|
||||
| | right | `{ style: BORDER_STYLE, color: COLOR_SPEC }`
|
||||
| | diagonal | `{ style: BORDER_STYLE, color: COLOR_SPEC }`
|
||||
| | diagonalUp | `true||false`
|
||||
| | diagonalDown | `true||false`
|
||||
|
||||
|
||||
|
||||
|
||||
@ -471,11 +472,11 @@ top-level attributes: `fill`, `font`, `numFmt`, `alignment`, and `border`.
|
||||
* `{ theme: "1", tint: "-0.25"}` specifying an integer index to a theme color and a tint value (default 0)
|
||||
* `{ indexed: 64}` default value for `fill.bgColor`
|
||||
|
||||
** BORDER_STYLE** are piped directly to XML and may take on one of the following values:
|
||||
**BORDER_STYLE** is a string value which may take on one of the following values:
|
||||
* `thin`
|
||||
*`medium`
|
||||
*`thick`
|
||||
*`dotted`
|
||||
* `medium`
|
||||
* `thick`
|
||||
* `dotted`
|
||||
* `hair`
|
||||
* `dashed`
|
||||
* `mediumDashed`
|
||||
@ -486,60 +487,6 @@ top-level attributes: `fill`, `font`, `numFmt`, `alignment`, and `border`.
|
||||
* `slantDashDot`
|
||||
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
fill: {
|
||||
patternType: "solid", // default is "none"
|
||||
fgColor: {
|
||||
rgb: "FFFFAA00", // specify either rgb OR theme/tint not both
|
||||
//theme: "1",
|
||||
//tint: -0.25,
|
||||
},
|
||||
bgColor: {
|
||||
indexed: "64" // this is the default value for bgColor
|
||||
}
|
||||
},
|
||||
font: {
|
||||
name: "Calibri",
|
||||
sz: "1" // pts
|
||||
bold: false,
|
||||
italic: false,
|
||||
underline: false,
|
||||
color: {
|
||||
rgb: "FFFFAA00", // specify either rgb OR theme/tint not both
|
||||
theme: "1",
|
||||
tint: -0.25,
|
||||
}
|
||||
},
|
||||
numFmt: 1, // or "0.00%" or "0.00%;\\-0.00%;\\-\\-;@",
|
||||
alignment: {
|
||||
vertical: "top" // or "center" or "bottom",
|
||||
horizontal: "left" // or "center" or "right",
|
||||
indent: "0" // or "1" or "2" or "3"...
|
||||
},
|
||||
border: {
|
||||
diagonalUp: false,
|
||||
diagonalDown: false,
|
||||
top: {
|
||||
style: "thin", // "thin","medium","thick","hair","dash","dot","dashDot","dashDotDot","mediumDashDot","mediumDashDotDot","slantDashDot"
|
||||
color: {
|
||||
auto: 1,
|
||||
rgb: "FFFFAA00", // specify either rgb OR theme/tint not both
|
||||
theme: "1",
|
||||
tint: -0.25,
|
||||
}
|
||||
},
|
||||
right: {},
|
||||
bottom: {},
|
||||
left: {},
|
||||
diagonal: {}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
||||
## Tested Environments
|
||||
|
||||
- NodeJS 0.8, 0.10 (latest release), 0.11 (unstable)
|
||||
|
Loading…
Reference in New Issue
Block a user