Daily reports - average chart
We have a few automatic reports setup to run nightly through the reports module which include the relevant charts / graphs per data point.
Instead of emailing the datapoint graph with all data points graphed, is it possible to instead email the average graph, (as we can do through the data point details tab)?
phildunlap last edited by
The easiest way to achieve this in the reports module is by using a meta point to compute that metric, then including the meta point in your report.
Thank you! Appreciate it.
Any chance of having that as a feature in the email-reports template in the future so we don't have to create so many metapoints?
Or, can you point me towards the codebase that handles the email-templates (or other related area) to see if we can code something up?
phildunlap last edited by phildunlap
Unlikely that would be added in to the reports module. You can configure such a thing in Excel Reports, and you can email those (but only as attachments).
The template model is passed to the template by the ReportChartCreator, https://github.com/infiniteautomation/ma-modules-public/blob/main/Reports/src/com/serotonin/m2m2/reports/web/ReportChartCreator.java
If you were to attempt such a thing, you would probably need to do something similar to how the existing "chartName" passes in the src for an image tag,
Edit: but, thinking about it, image chart servlet is passed XIDs to real points in the URL, so no, it isn't possible through the template model.