| 115 | | Export Graphs as Images. Options: |
| 116 | | * using Flot: https://code.google.com/p/flot/issues/detail?id=142 |
| | 115 | Export Graphs as Images. |
| | 116 | |
| | 117 | We currently use the Flot JavaScript library to produce interactive graphs - primarily via the S3Report (/report, /report2) method: |
| | 118 | * [wiki:S3/S3Report S3Report] |
| | 119 | |
| | 120 | We have 2 usecases for exporting graphs: |
| | 121 | 1. A user would like to download the report they're seeing on screen as a PDF |
| | 122 | 2. A user would like to download the report they're seeing on screen as an XLS |
| | 123 | - to have both the Pivot Table & associated Graph |
| | 124 | 3. A user would like to subscribe to a report to receive by email daily/weekly/monthly |
| | 125 | - again this report could be in PDF or XLS |
| | 126 | - Subscription will be done using this: |
| | 127 | * https://github.com/flavour/eden/blob/master/modules/s3db/pr.py#L2661 |
| | 128 | - Notification will be done using this: |
| | 129 | * https://github.com/flavour/eden/blob/master/modules/s3/s3notify.py |
| | 130 | |
| | 131 | So, your task, as I see it, is to take the settings for a Report & produce the PDF &/or XLS version thereof. |
| | 132 | - ideally this would work for both the interactive & subscription usecases i.e. subscription would store the Report options extending the existing Saved Filter options: |
| | 133 | * https://github.com/flavour/eden/blob/master/modules/s3db/pr.py#L2619 |
| | 134 | |
| | 135 | We convert our internal S3XML data format to PDF or XLS using codecs: |
| | 136 | * https://github.com/flavour/eden/blob/master/modules/s3/codecs/pdf.py |
| | 137 | * https://github.com/flavour/eden/blob/master/modules/s3/codecs/xls.py |
| | 138 | |
| | 139 | I would focus on just one of these to keep scope feasible. |
| | 140 | - personally I'd be more interested in XLS as this gives users a more useful tool to explore the data than just a static PDF. |
| | 141 | |
| | 142 | Options: |
| | 143 | * [https://code.google.com/p/flot/issues/detail?id=142 Use Flot to Export graphs] |