Miscellaneous
Overview
The following objects are used to support the style of various report elements.
Paint
Describes the color/line of various report elements.
Schema
| key | type | required | description |
|---|---|---|---|
| color | string |
optional | A string that defines the paint color. Colors can be well-defined color names, or RGB values (e.g. "#1E3D7A"). |
| opacity | number |
optional | The opacity of the paint color. A value of 1 indicates a fully opaque color and 0 is fully transparent. Ignored if color is not defined. |
| stroke | number |
optional | The width of the line. Only applies when setting a Stroke property. |
| dashEffect | number[] |
optional | The dash effect of the line. Each pair of numbers in the array defines the line width and space width respectively. To draw a simple dashed line, use [1.0, 1.0]. Only applies when setting a Stroke property. |
| gradient | Gradient |
optional | A gradient to use when painting. If set, the color value is ignored. |
| cap | string |
optional | A string that describes how line caps are drawn. Valid options are butt, square and round. The default is butt indicating that no cap should be drawn on line ends. This property is only valid in line components. |
Gradient
The Gradient object defines a linear or circular gradient to draw as a component background or to use in charts.
Schema
| key | type | required | description |
|---|---|---|---|
| type | string |
required | The type of gradient to draw. Valid options are Linear and Circular. |
| colors | string[] |
required | An array of colors that will compose the gradient. |
| colorOpacities | float[] |
optional | An array of opacity values that correspond to each color item. A value of 1 indicates a fully opaque color and 0 is fully transparent. If not supplied, all colors will be fully opaque. |
| colorPositions | float[] |
optional | An array of values that define the position of each color item. A value of 0 indicates that the color begins at the starting point and a value of 1 at the end point. |
| direction | string |
optional | Controls to direction of the gradient. Valid values are LeftToRight, TopToBottom, TopRightToBottomLeft, TopLeftToBottomRight, and Center. |
| tileMode | string |
optional | Sets the tile mode for the gradient. Options include Clamp, Repeat and Mirror. |
Example
{
"gradient": {
"type": "linear",
"colors": [
"IndianRed",
"IndianRed",
"Orange",
"Orange",
"IndianRed",
"IndianRed"
],
"colorPositions": [
0,
0.08,
0.08,
0.4,
0.4,
1
],
"tileMode": "clamp"
}
}
The gradient above is used to create the line at the bottom of the report header:
Point
Schema
| key | type | required | description |
|---|---|---|---|
| x | number |
required | The x coordinate, or width. |
| y | number |
required | The y coordinate, or height. |
