e37bc753fd4ecbc758ea232a79905a139909e75b
kate
  Tue Sep 17 15:44:38 2019 -0700
Add barChartMaxSize setting to limit size of charts (override semantic zoom).  Values are small/medium/large (defaults to large). refs #24161

diff --git src/hg/inc/barChartUi.h src/hg/inc/barChartUi.h
index 5f58eb0..830a712 100644
--- src/hg/inc/barChartUi.h
+++ src/hg/inc/barChartUi.h
@@ -37,30 +37,37 @@
 #define BAR_CHART_CATEGORY_LABEL_DEFAULT "Categories"
 
 /* Colors for categories */
 #define BAR_CHART_CATEGORY_COLORS        "barChartColors"
 
 /* Units to display on bar mouseover */
 #define BAR_CHART_UNIT                   "barChartUnit"
 
 /* Measurement type -- e.g. 'median'. Shown as part of label on details page. Default is "" */
 #define BAR_CHART_METRIC                 "barChartMetric"
 
 /* Suppress whiteout behind graph (to show highlight and blue lines) */
 #define BAR_CHART_NO_WHITEOUT         "noWhiteout"
 #define BAR_CHART_NO_WHITEOUT_DEFAULT        FALSE
 
+/* Support limiting graphs to small or medium hights (bypass semantic zoom) */
+#define BAR_CHART_MAX_GRAPH_SIZE                 "barChartMaxSize"
+#define BAR_CHART_MAX_GRAPH_SIZE_SMALL           "small"
+#define BAR_CHART_MAX_GRAPH_SIZE_MEDIUM          "medium"
+#define BAR_CHART_MAX_GRAPH_SIZE_LARGE           "large"
+#define BAR_CHART_MAX_GRAPH_SIZE_DEFAULT          BAR_CHART_MAX_GRAPH_SIZE_LARGE
+
 void barChartCfgUi(char *database, struct cart *cart, struct trackDb *tdb, char *track, 
                         char *title, boolean boxed);
 /* Bar chart track type */
 
 #define barChartAutoSqlString \
 "table barChartBed\n" \
 "\"BED6+ with additional fields for category count and values\"\n" \
     "(\n" \
     "string chrom;       \"Reference sequence chromosome or scaffold\"\n" \
     "uint   chromStart;  \"Start position in chromosome\"\n" \
     "uint   chromEnd;    \"End position in chromosome\"\n" \
     "string name;        \"Item identifier\"\n" \
     "uint   score;       \"Score from 0-1000; derived from total median all categories (log-transformed and scaled)\"\n" \
     "char[1] strand;     \"+ or - for strand\"\n" \
     "uint expCount;      \"Number of categories\"\n" \