399d53a062f79a497d2f8dcbb3e3af5dea30cd0a
max
Mon Jan 28 02:36:17 2019 -0800
adding a oldFonts option to barchart hgc page for QA, refs #21881
diff --git src/hg/hgc/barChartClick.c src/hg/hgc/barChartClick.c
index ae85ee4..f83f479 100644
--- src/hg/hgc/barChartClick.c
+++ src/hg/hgc/barChartClick.c
@@ -344,33 +344,38 @@
{
//fprintf(f, "%s\t#%06X\n", categ->label, categ->color);
fprintf(f, "%s\t%d\n", categ->label, categ->color);
}
fclose(f);
return cloneString(colorTn.forCgi);
}
static void printBoxplot(char *df, char *item, char *name2, char *units, char *colorFile)
/* Plot data frame to image file and include in HTML */
{
struct tempName pngTn;
struct dyString *cmd = dyStringNew(0);
trashDirFile(&pngTn, "hgc", "barChart", ".png");
+// to help with QAing the change, we add the "oldFonts" CGI parameter so QA can compare
+// old and new fonts to make sure that things are still readible on mirrors and servers
+// without the new fonts installed. This only needed during the QA phase
+bool useOldFonts = cgiBoolean("oldFonts");
+
/* Exec R in quiet mode, without reading/saving environment or workspace */
-dyStringPrintf(cmd, "Rscript --vanilla --slave hgcData/barChartBoxplot.R %s '%s' %s %s %s %s",
- item, units, colorFile, df, pngTn.forHtml, isEmpty(name2) ? "n/a" : name2);
+dyStringPrintf(cmd, "Rscript --vanilla --slave hgcData/barChartBoxplot.R %s '%s' %s %s %s %s %d",
+ item, units, colorFile, df, pngTn.forHtml, isEmpty(name2) ? "n/a" : name2, useOldFonts);
int ret = system(cmd->string);
if (ret == 0)
printf("
\n", pngTn.forHtml);
else
warn("Error creating boxplot from sample data with command: %s", cmd->string);
}
struct asColumn *asFindColByIx(struct asObject *as, int ix)
/* Find AS column by index */
{
struct asColumn *asCol;
int i;
for (i=0, asCol = as->columnList; asCol != NULL && inext, i++);
return asCol;
}