kailo_beewell_dashboard.images

Helper functions for working with image files

Module Contents

Functions

convert_fig_to_html(fig, alt_text)

Convert plotly fig to HTML by saving it as a temporary PNG file, and then

get_image_path(filename)

Get path for image in the kailo-beewell-dashboard package

kailo_beewell_dashboard.images.convert_fig_to_html(fig, alt_text)

Convert plotly fig to HTML by saving it as a temporary PNG file, and then importing that and converting it to HTML which can produce the figure.

Parameters

figplotly figure object

Figure to be converted

alt_textstring

Alternative text for the figure

Returns

img_tagstring

HTML to generate image

kailo_beewell_dashboard.images.get_image_path(filename)

Get path for image in the kailo-beewell-dashboard package

Parameters

filename: string

Name of the image file within the package (e.g. ‘image.png’)

Returns

img_pathstring

Path to image within the package