Skip to main content

I have a workbench that uses the chartgenerator to create a simple chart graphic that goes into an automated daily email. image below:

imageBlue line is the recent readings and the orange line is a limit (it looks static but it fluctuates throughout the year). I'd like to add a ten-day outlook to the orange line but the chartgenerator can't handle null values on the blue line, it throws the error:

ChartGenerator: Non-numeric input provided. Please validate that the values of the "X Attribute","Y Attribute" and "Error Attribute" (if supplied) are numeric

the htmlreportgenerator can handle the null values but when it's embedded in the email as html content the chart is not in the email, I am assuming it's being scrubbed out by outlook and am left wondering if there is a way to covert the html output to an image which can be embedded in the email.

 

Desired output:

image

Hi @aesi_geo​ if the ChartGenerator isn't accepting null values, then perhaps you could either use a Tester transformer to filter out the features that contain null values, or you could use a NullAttributeValueMapper to map those null values to a numerical value that works for your chart.


Unfortunately the missing values occur in the future so there are no values that can be assigned. I did try assigning the orange values to the blue values as a placeholder and putting the blue behind the orange, which almost hides them except for the connecting line from the last true blue value to the placeholder values.

 

if i place a tester to filter out the null values then the orange values are also lost. the chartgenerator has to have a full matching set of values to plot two line series :(

 

note: the missing blue values would come from a future staff gauge reading so it truly is null, the readings haven't been taken yet but there is a known future limit value.


Hello @aesi_geo

The line graph in the HTMLReportGenerator is generated by scripts within the HTML. In order to get this as an image, you would have to download a utility application like wkhtmltoimage that renders HTML as image and save it. There is an FME Hub transformer called the HTML2ImageConvertor that should help with this workflow if you choose this method.

An alternative workaround that does not require any additional installation is to generate the chart for each data series separately but with the same settings such as min/max for axes, output image dimensions, etc. Then use a RasterExpressionEvaluator to combine the two images.

I have attached a workspace demonstrating the last workflow and I hope it helps.


Hello @aesi_geo

The line graph in the HTMLReportGenerator is generated by scripts within the HTML. In order to get this as an image, you would have to download a utility application like wkhtmltoimage that renders HTML as image and save it. There is an FME Hub transformer called the HTML2ImageConvertor that should help with this workflow if you choose this method.

An alternative workaround that does not require any additional installation is to generate the chart for each data series separately but with the same settings such as min/max for axes, output image dimensions, etc. Then use a RasterExpressionEvaluator to combine the two images.

I have attached a workspace demonstrating the last workflow and I hope it helps.

This worked for me! thank you!!


Reply