6a7d8c49fb6f2af3b1e24e3d82b76a4068807c2e kent Wed Feb 10 08:51:43 2021 -0800 Restored space between bars when zoomed close enough. diff --git src/hg/hgTracks/barChartTrack.c src/hg/hgTracks/barChartTrack.c index 436a122..aba8a21 100644 --- src/hg/hgTracks/barChartTrack.c +++ src/hg/hgTracks/barChartTrack.c @@ -666,31 +666,31 @@ { if (!filterCategory(extras, categ->name)) continue; struct rgbColor fillColor = extras->colors[i]; int fillColorIx = hvGfxFindColorIx(hvg, fillColor.r, fillColor.g, fillColor.b); double expScore = bed->expScores[i]; int height = valToClippedHeight(expScore, extras->maxMedian, extras->maxViewLimit, extras->maxHeight, extras->doLogTransform); boolean isClipped = (!extras->doLogTransform && expScore > extras->maxViewLimit); int barTop = yZero - height + 1; if (extras->padding == 0 || sameString(colorScheme, BAR_CHART_COLORS_USER)) { int cStart = barsDrawn * graphWidth * invCount; int cEnd = (barsDrawn+1) * graphWidth * invCount; x1 = cStart + x0; - barWidth = cEnd - cStart; + barWidth = cEnd - cStart - extras->padding; hvGfxBox(hvg, x1, barTop, barWidth, height, fillColorIx); if (isClipped) hvGfxBox(hvg, x1, barTop, barWidth, 2, clipColor); barsDrawn += 1; } else { hvGfxOutlinedBox(hvg, x1, barTop, barWidth, height, fillColorIx, lineColorIx); // mark clipped bar with magenta tip if (isClipped) hvGfxBox(hvg, x1, barTop, barWidth, 2, clipColor); x1 = x1 + barWidth + extras->padding; } } }