Class

NumberComponent

NumberComponent

Object representing number in the report. Numbers can be added directly using ComponentContainer#put() method.

Since:
  • 5.0

Extends

Methods

copy() → {Component}

Create a mutable copy of the component.

This will copy only the component, not the actual shape in the template.

Inherited From:

Mutable copy of the component

Component

hide() → {Component}

Hides the component. Short for #withHidden(true)

Available in ppt and word reporting only!

Inherited From:

The component itself.

Component

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.

Inherited From:

The component itself.

Component

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.

Inherited From:

The component itself.

Component

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.

Inherited From:

The component itself.

Component

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.

Inherited From:

The component itself.

Component

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.

Inherited From:

The component itself.

Component

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.

Inherited From:

The component itself.

Component

withNumber(number) → {NumberComponent}

Sets the numerical display of the component to the given value.

Parameters:
Name Type Description
number number

The number to set.

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.

Inherited From:

The component itself.

Component

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.

Inherited From:

The component itself.

Component