Permalink
Browse files

Fix Bug 976742, do not clip no data text

  • Loading branch information...
1 parent 03db93d commit 842e650116d83def6e02dbc42794897f1313d19d @schalkneethling schalkneethling committed Feb 26, 2014
Showing with 13 additions and 5 deletions.
  1. +13 −5 webapp-django/crashstats/crashstats/static/crashstats/js/socorro/gccrashes.js
@@ -101,11 +101,19 @@ $(function() {
.tickFormat(d3.format(',d'));
d3.select('#gccrashes_graph svg')
- .datum([graphData])
- .call(graph);
-
- var xTicks = d3.select('.nv-x').selectAll('g.tick text');
- xTicks.attr('transform', 'translate (-10, 60) rotate(-90 0, 0)');
+ .datum([graphData])
+ .call(graph);
+
+ // Only do the transform on the ticks if we actually have data.
+ if (graphData.key > 0) {
+ var xTicks = d3.select('.nv-x').selectAll('g.tick text');
+ xTicks.attr('transform', 'translate (-10, 60) rotate(-90 0, 0)');
+ } else {
+ // Do not clip the No Data text
+ d3.select('.nv-noData')
+ .attr('dy', '0');
+
+ }
nv.utils.windowResize(graph.update);

0 comments on commit 842e650

Please sign in to comment.