Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Chart exporting before would essentially run the same steps that we did in
html/gui/js/PlotlyChartWrapper.js. The functionXDMoD.utils.createChart()should have been called before but ran into namespace issues back during the Highcharts conversion.This is an attempt to properly export the chart. This approach will help avoid bugs by not needing to replicate chart fixups within the export file but instead running the same chart function used in the portal.
This also fixes a bug with the time zone code (present in
html/gui/js/PlotlyChartWrapper.js) but not inhtml/plotly_template.htmlwhich was the motivation for these changes and to move away from this approach of duplicating code (which is not even correctly duplicated)Motivation and Context
Original approach was difficult to maintain and easy to introduce export bugs. Now everything runs through the same function (unless Job Viewer plots). The reason job viewer plots are different is because during the Highcharts conversion those were done first and we still needed to support the original Highcharts exporting for the rest of the portal.
Now that everything is in Plotly. There should be another PR to move the Job Viewer chart generation code into
html/gui/js/PlotlyChartWrapper.jsso that there is truly one function call. However, that should be a separate PR because it is much more involved.Tests performed
Tested on my dev port
Checklist: