fcc66292648958c70053054587910f187ba249d0
braney
  Mon Jul 28 15:42:35 2025 -0700
make setColorWith work a big less weirdly by using an invisible color
for the graph when there is nothing in the bigBed.

diff --git src/hg/hgTracks/wigTrack.c src/hg/hgTracks/wigTrack.c
index 58649077899..6bc0b66bdd2 100644
--- src/hg/hgTracks/wigTrack.c
+++ src/hg/hgTracks/wigTrack.c
@@ -813,45 +813,49 @@
 
 static Color * makeColorArray(struct preDrawElement *preDraw, int width,
     int preDrawZero, struct wigCartOptions *wigCart, struct track *tg, struct hvGfx *hvg)
 /*	allocate and fill in a coloring array based on another track */
 {
 char *colorTrack = wigCart->colorTrack;
 char *colorBigBed = wigCart->colorBigBed;
 int x1;
 Color *colorArray = NULL;       /*      Array of pixels to be drawn.    */
 
 /*      Set up the color by array. Determine color of each pixel
  *      based initially on the sign of the data point. If a colorTrack
  *      is specified also fill in the color array with that.
  */
 AllocArray(colorArray, width);
+
+if ((colorTrack == NULL) && (colorBigBed == NULL))
+    {
     for(x1 = 0; x1 < width; ++x1)
         {
         int preDrawIndex = x1 + preDrawZero;
         if (preDraw[preDrawIndex].count)
             {
             double dataValue;	/*	the data value in data space	*/
 
             dataValue = preDraw[preDrawIndex].smooth;
             /*	negative data is the alternate color	*/
             if (dataValue < 0.0)
                 colorArray[x1] = tg->ixAltColor;
             else
                 colorArray[x1] = tg->ixColor;
             }
         }
+    }
 
 /* Fill in colors from alternate track or bigBed if necessary. */
 struct track *cTrack = NULL;
 
 if (colorBigBed != NULL)
     {
     cTrack = makeFakeColorTrack(colorBigBed);
     }
 else if (colorTrack != NULL)
     {
     struct track *cTrack = hashFindVal(trackHash, colorTrack);
     if (cTrack == NULL) // rightClick update of wigColorBy track may not have colorTrack in hash
         {               // so create it on the fly
         struct trackDb *tdb = hTrackDbForTrack(database,colorTrack);
         if (tdb != NULL)