Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix for loading xml #513 #520

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions java/edu/ucar/metviewer/MVPlotJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -1822,6 +1822,16 @@ public void setConSeries(String conSeries) {
}

public String getShowLegend() {
if (showLegend == null){
String templ = getPch();
int size = templ.split(",").length;
String result = "c(";
for (int i = 0; i < size; i++) {
result = result + "1,";
}
showLegend = result.substring(0, result.length() - 1) + ")";
}

return showLegend;
}

Expand Down
6 changes: 2 additions & 4 deletions java/edu/ucar/metviewer/jobManager/JobManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,7 @@ protected Map<String, Object> createInfoMap(MVPlotJob job, int intNumDepSeries)
info.put("con_series", job.getConSeries().isEmpty() ? MVUtil.printRCol(
MVUtil.rep(0, intNumDepSeries)) : job.getConSeries());

if(job.getShowLegend() != null){
info.put("show_legend",MVUtil.printRCol(MVUtil.rep(0, intNumDepSeries)));
}
info.put("show_legend",job.getShowLegend().isEmpty() ? "c()" : job.getShowLegend());
info.put("legend", job.getLegend().isEmpty() ? "c()" : job.getLegend());
info.put("y1_lim", job.getY1Lim().isEmpty() ? "c()" : job.getY1Lim());
info.put("x1_lim", job.getX1Lim().isEmpty() ? "c()" : job.getX1LimR());
Expand Down Expand Up @@ -641,7 +639,7 @@ protected Map<String, Object> addPlotConfigs(Map<String, Object> yamlInfo, MVPlo
info.put("show_signif", rListToList(job.getShowSignif()));

info.put("con_series", rListToListNumeric(job.getConSeries()));
info.put("show_legend", rListToListNumeric(job.getShowLegend()));
info.put("show_legend", rListToList(job.getShowLegend()));
info.put("plot_ci", rListToList(job.getPlotCI()));


Expand Down
2 changes: 1 addition & 1 deletion webapp/metviewer/js/metviewer_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7636,7 +7636,7 @@ function initPage() {
editable: true,
edittype: "select",
formatter: 'select',
editoptions: {value: "0:No;1:Yes"},
editoptions: {value: "1:Yes;0:No"},
sortable: false,
},
{
Expand Down
2 changes: 1 addition & 1 deletion webapp/metviewer/js/metviewer_common.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webapp/metviewer/plotJSP/eclv.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
addFixedVar();
});
getForecastVariablesHist();
series_var_y1_indexes = [];

if (initXML != null) {
if(initXML.find("error").length > 0 ){
Expand All @@ -277,7 +278,6 @@
}
initXML = null;
} else {
series_var_y1_indexes = [];
updateSeriesVarValHist(1, []);
updateSeriesHist();
}
Expand Down
3 changes: 2 additions & 1 deletion webapp/metviewer/plotJSP/hist.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@
updateSeriesHist();
});
fixed_var_indexes.push(1);
series_var_y1_indexes = [];

if (initXML != null) {
if(initXML.find("error").length > 0 ){
alert(initXML.find("error").text())
Expand All @@ -239,7 +241,6 @@
}
initXML = null;
} else {
series_var_y1_indexes = [];
updateSeriesVarValHist(1, []);
changeFixedVarHist('rhist');
updateFixedVarValHist(1, []);
Expand Down