Interface that represents a Component. Components can be substituted for a placeholder in report templates.
- Since:
- 5.0
Methods
copy() → {Component}
Create a mutable copy of the component.
This will copy only the component, not the actual shape in the template.
Mutable copy of the component
hide() → {Component}
Hides the component. Short for #withHidden(true)
Available in ppt and word reporting only!
The component itself.
moveX(xPosition) → {Component}
Moves the component on the x axis relative to its current position where a positive number will move to the right and a negative to the left.
The used unit may depend on the report type. PowerPoint eg. uses "pt" as the default unit (where 1 pt usually ≈1 in).
Available in ppt reporting only!
Parameters:
Name | Type | Description |
---|---|---|
xPosition |
number | The amount to move the component on the x axis. Set to null to unset and use presentation settings. |
The component itself.
moveY(yPosition) → {Component}
Moves the component on the y axis relative to its current position where a positive number will move to the bottom and a negative to the top.
The used unit may depend on the report type. PowerPoint eg. uses "pt" as the default unit (where 1 pt usually ≈1 in).
Available in ppt reporting only!
Parameters:
Name | Type | Description |
---|---|---|
yPosition |
number | The amount to move the component on the y axis. Set to null to unset and use presentation settings. |
The component itself.
withBackgroundColor(color) → {Component}
Sets the background color of the component.
Parameters:
Name | Type | Description |
---|---|---|
color |
string | A string that represents a 24-bit opaque color. |
The component itself.
withBorder(thickness, r, g, b) → {Component}
Sets the border of a component.
Parameters:
Name | Type | Description |
---|---|---|
thickness |
number | Thickness of the border in pt |
r |
number | The red value of the border color. |
g |
number | The green value of the border color. |
b |
number | The blue value of the border color. |
The component itself.
withBorder(thickness, color) → {Component}
Sets the border of a component.
Parameters:
Name | Type | Description |
---|---|---|
thickness |
number | Thickness of the border in pt |
color |
string | A string that represents a 24-bit opaque color. |
The component itself.
withHidden(hidden) → {Component}
Set the visibility of the component.
Available in ppt and word reporting only!
Parameters:
Name | Type | Description |
---|---|---|
hidden |
boolean | Whether the component shall be visible or not. |
The component itself.
withX(xPosition) → {Component}
Sets the x coordinate of the component on the slide where 0 represents the leftmost border of the visible area. Values may exceed the boundaries (negative & positive) which will result in the component being placed outside the viewport.
The used unit may depend on the report type. PowerPoint eg. uses "pt" as the default unit (where 1 pt usually ≈1 in).
Available in ppt reporting only!
Parameters:
Name | Type | Description |
---|---|---|
xPosition |
number | The x coordinate of the component. Set to null to unset and use presentation settings. |
The component itself.
withY(yPosition) → {Component}
Sets the x coordinate of the component on the slide where 0 represents the topmost border of the visible area. Values may exceed the boundaries (negative & positive) which will result in the component being placed outside the viewport.
The used unit may depend on the report type. PowerPoint eg. uses "pt" as the default unit (where 1 pt usually ≈1 in).
Available in ppt reporting only!
Parameters:
Name | Type | Description |
---|---|---|
yPosition |
number | The y coordinate of the component. Set to null to unset and use presentation settings. |
The component itself.