Cb image
CbImage
¶
Base Image class. Given an optional filepath and a CbImageRenderer object, adds an image to the report.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
image_renderer |
|
The rendering mode of the image. |
required |
filepath |
|
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
|
var_name |
|
This must be a unique identifying name. Default = None. |
None
|
fullname |
|
The full name of the parameter, can be descriptive. Default = None. |
None
|
image_caption |
|
The text attributed to the image. Default = "". |
''
|
image_width |
|
The display image size in pixels. Recommended max width is 450. |
450
|
is_local |
|
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
|
visible |
|
Set False to hide the component from the "Detail Output" section. Default = True |
True
|
tooltip_text |
|
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
¶
Simply adds the image and the caption below it.
Args:
Returns:
Type | Description |
---|---|
ImageRenderBasic Instance |
Examples:
1 |
|
ImageRenderExpandable
¶
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 |
---|---|---|---|
is_expanded |
|
Set to |
True
|
Returns:
Type | Description |
---|---|
ImageRenderExpandable Instance |
Examples:
1 |
|
ImageRenderLink
¶
Adds a clickable link to the report. When clicked, a pop-up opens with the image and caption.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
display_text |
|
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 |
|