Chart widget - can I add the current date to the file name for download?

1
Hi, in the chart widget settings under "Advanced" I have defined the following custom configurations: { "displayModeBar": true, "toImageButtonOptions": { "filename": "CompletedTasks_last12months" } } With this configuration a button is shown for downloading the chart as a PNG file. I would like to add the current date to the file name - does anybody have an idea how to do this? I guess I need to work with a variable - I have tried to execute code in this JSON but it did not work out. Does anybody have an idea how this works? Best Regards, Henning
asked
1 answers
0

Hi there, 

From what I can find, the configuration has to be static and cannot include dynamic data. This is further backed up by the documentation ( https://docs.mendix.com/howto7/extensibility/charts-any-usage/

 

 "The configuration can be set statically, via the Source attribute or with the Sample data."

 

This might be a limitation with the current implementation of charts in Mendix?

Other solutions have been found to export charts that don't use static configurations (https://forum.mendix.com/link/space/studio-pro/questions/115213). This could help with your need to have today's date in the file name. 

 

Hope this helps,

Liam

 

answered