"Export chart" command: export a chart that is not displayed in the GUI
See #3483 (closed) for more context. The below behaviors are only effective for the JFC charts engine (not for the R charts engine).
Use some aspect ratios by TXM result type when exporting from the "Export chart" command (the "Export chart view" command is not concerned)
Updated note about the command “Export\Chart…”
Since the visualization engine export preferences "DPI", "Width in centimeters" and "Width in pixels" have been implemented, the behavior of the command is:
- get the user definition of "DPI" and "Width in centimeters" values (or default values)
- produce the "Width in pixels" values according to the DPI and centimeters (DPI * centimeters / 1 inch)
- export the chart using the "Width in pixels" value for the image width (raster or SVG)
- the height is not known since there is no chart window in the UI
- therefore the "Width in pixels" value is also used for the height of the produced image (square dimensions)
[SJ, from old note in #3483 (closed)]
Since the height is not known, need to specify how to compute the height.
We could use a “Pixels Height” user preference but it doesn’t seems to be the best solution.
A better solution may be to use the aspect ratio of the user screen resolution to compute the height.
[SLH]
+1 for ‘Aspect Ratio’ preference but the aspect ratio may change between results:
- 16/9 for Progression
- 4/3 or 1/1 for AFC (planes)
- etc.
Provide several aspect ratio preferences for results groups?
Popular aspect ratios: Widescreen.org and Wikipedia.
Solution 1
- stores some user editable ratio preferences for each TXM chart result type
- [SJ] may be hard to maintain, need a monitoring
Solution 2
- define and store some non editable ratio values from each TXM chart result ype
- [SJ] may be hard to maintain, need a monitoring
Solution 3
- use a unique aspect ratio for all charts
- [SJ] that's the currently implemented solution (2024-06-21)
Solution 4
- remove the "Export\Chart" command. Since we already have an "Export chart view"
- [SJ] I think this command is not needed anymore. Is it really useful to export a chart that we even didn't see? (I mean here, from the UI. A blind export will always be possible through scripting, for example)
- [MD] if it's a full view of the chart, maybe it's useful for manual edition in an external tool like inkscape ?
- [SJ] I think this command is not needed anymore. Is it really useful to export a chart that we even didn't see? (I mean here, from the UI. A blind export will always be possible through scripting, for example)
Solution 5
- create a popup to ask to the user the desired ratio or the desired width and height