Closed Bachibouzouk closed 2 years ago
To get a hand on the selected scenarios one can make use of
projects.services.get_selected_scenarios_in_cache(request, proj_id)
to get the selected scenarios in a view in python side (with the request of the view)
In js side the function update_selected_scenarios
calls functions to update the default graphs (for example scenario_visualize_timeseries
, one could use this to update the default ReportItems
How ReportItems are plotted is by using the "render_json" method of the ReportItem. Each ReportItem has a unique DOM id, which can be used by js function to modify the rendered graphs. Every js code which deals with ReportItem is in static/js/report_items.js
. Maybe the best would be to copy addReportItemGraphToDOM
to updateReportItemGraph
and modify the Graph only using the graphId
default
which is True or False, defaulting to False and only set to True when we fetch the results after a simulation.