Save the graph of the Trend Widget as a Picture

Hello,

I want to ask if there is a way to save the graph that is shown on the trend widget as an image file when triggered by an boolean variable?

Thanks for the Help

Best reply by webiq-sk

Sorry, a detailed analysis showed that it is not possible to achieve it. I assumed that the trend display renders everything into a single canvas element, but it does not. So though you could technically generate a screenshot of the trend lines you would not be able to capture the scales around it which will probably not be sufficient for you.

As an alternative you'd have to retrieve the trend data in a custom script, render that e.g. in ChartJS which provides a download function as it renders everything inside a canvas element. We do not use a canvas element for everything for performance and styling reasons allowing for better styleability of the widget with CSS.ย 

View original
4 replies