Skip to content

Add possibility to generate a Chart img / Add possibility to generate chart in Base64 format #220

@Stephanevg

Description

@Stephanevg

In order to support scenarios like senind the html document per Email, I would like to add the possibility to embed the ChartJs Chart in the html document as a Base64 image, instead of the raw Javascript code that is currently used.

The following ressource might be a straight highway to that one(?)

Link

On the function level, I can imagine we add a switch AsEmbededImage or AttachImage or something in that direction in the Function New-PSHTMLChart
When used, the javascript code would be rendered once in the canvas, and then from the canvas, the canvas would be converted to an image, converted to base64 string, and embeded in an img tag as base64 encoding.

Althougt this will open the possibility to get rid of the embedded Javascript code, this might have a direct impact on the page size. This must be analyzed and compared, and clearly documented for the end user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions