Cb image
CbImage
¶
Bases: CbBase
Base Image class. Given an optional filepath and a CbImageRenderer object, adds an image to the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ImageRenderGeneric
|
The rendering mode of the image. |
required |
|
Optional[str]
|
The file name of the resource including the extension, this is set relative to the folder path. The folder path is dependent up on the is_local parameter. To denote folder structure, "/" should be used between folders. Default = None. |
None
|
|
Optional[str]
|
This must be a unique identifying name. Default = None. |
None
|
|
str
|
The full name of the parameter, can be descriptive. Default = None. |
None
|
|
str
|
The text attributed to the image. Default = "". |
''
|
|
str
|
The display image size in pixels. Recommended max width is 450. |
450
|
|
bool
|
If local the file should reside within the parent folder of this app. Alternatively, this can be set to False and the file should be located within the "shared" folder. Default = True |
True
|
|
bool
|
Set False to hide the component from the "Detail Output" section. Default = True |
True
|
|
str
|
Text to display as a tooltip in the webapp. Default = None. |
None
|
Returns:
| Type | Description |
|---|---|
|
CbImage instance |
Examples:
1 2 3 4 5 6 | |
ImageRenderBasic
¶
Bases: ImageRenderGeneric
Simply adds the image and the caption below it.
Args:
Returns:
| Type | Description |
|---|---|
|
ImageRenderBasic Instance |
Examples:
1 | |
ImageRenderExpandable
¶
Bases: ImageRenderGeneric
Adds an expandable container with the image and caption. The container can be expanded/minimized by clicking
on the expand button of the container.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
bool
|
Set to |
True
|
Returns:
| Type | Description |
|---|---|
|
ImageRenderExpandable Instance |
Examples:
1 | |
ImageRenderLink
¶
Bases: ImageRenderGeneric
Adds a clickable link to the report. When clicked, a pop-up opens with the image and caption.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
The text content of the link. Default = "Click here to open the image". |
'Click here to open the image'
|
Returns:
| Type | Description |
|---|---|
|
ImageRenderLink Instance |
Examples:
1 | |