Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix Bug 976742, do not clip no data text

  • Loading branch information...
commit 842e650116d83def6e02dbc42794897f1313d19d 1 parent 03db93d
@schalkneethling schalkneethling authored
View
18 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);
Please sign in to comment.
Something went wrong with that request. Please try again.