Aggregation: Fix squished aggregation chart
Created by: vovakulikov
Closes https://github.com/sourcegraph/sourcegraph/issues/41158
Background
We know now that there is some strange behaviour about empty line measurement in SVG. If SVG text has no child or text content then measurement is corrupted and it breaks the chart layout calculation. This bug doesn't exist in Firefox for example, in Safari it appears but chart isn't squished completely (just a little) and only Chrome breaks the chart entirely.
This PR replaces empty SVG text elements textContent with whitespaces. This fixes problem in all three major browsers.
Test plan
- Run this query
query(.*)string repo:^github\.com/sourcegraph/sourcegraph$
on sourcegraph.sourcegraph.com staging (or locally) - Make sure that chart looks fine with groups that returns this query.
App preview:
Check out the client app preview documentation to learn more.