GUI -- Fixed intentPerf javascript error.
Change-Id: I7d46cc7967fbb35808db939a1879fb7036762e17
Showing
1 changed file
with
12 additions
and
6 deletions
| ... | @@ -50,11 +50,13 @@ | ... | @@ -50,11 +50,13 @@ |
| 50 | .duration(duration) | 50 | .duration(duration) |
| 51 | .ease("linear"); | 51 | .ease("linear"); |
| 52 | 52 | ||
| 53 | - svg = d3.select("#intent-perf-chart").append("p") | 53 | + svg = d3.select("#intent-perf-chart").append("p").append("svg") |
| 54 | - .append("svg").attr("id", "intent-perf-svg") | 54 | + .attr("id", "intent-perf-svg") |
| 55 | - .append("g").attr("id", "intent-perf-svg-g"); | 55 | + .append("g") |
| 56 | + .attr("id", "intent-perf-svg-g"); | ||
| 56 | 57 | ||
| 57 | - svg.append("defs").append("clipPath").attr("id", "intent-perf-clip") | 58 | + svg.append("defs").append("clipPath") |
| 59 | + .attr("id", "intent-perf-clip") | ||
| 58 | .append("rect"); | 60 | .append("rect"); |
| 59 | 61 | ||
| 60 | axis = svg.append("g") | 62 | axis = svg.append("g") |
| ... | @@ -156,7 +158,9 @@ | ... | @@ -156,7 +158,9 @@ |
| 156 | d3.select("#intent-perf-svg-g") | 158 | d3.select("#intent-perf-svg-g") |
| 157 | .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); | 159 | .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); |
| 158 | 160 | ||
| 159 | - d3.select("#intent-pef-clip rect").attr("width", width).attr("height", height); | 161 | + d3.select("#intent-perf-clip rect") |
| 162 | + .attr("width", width) | ||
| 163 | + .attr("height", height); | ||
| 160 | 164 | ||
| 161 | d3.select("#intent-perf-x") | 165 | d3.select("#intent-perf-x") |
| 162 | .attr("transform", "translate(0," + height + ")") | 166 | .attr("transform", "translate(0," + height + ")") |
| ... | @@ -193,7 +197,9 @@ | ... | @@ -193,7 +197,9 @@ |
| 193 | 197 | ||
| 194 | function graphResized(dim) { | 198 | function graphResized(dim) { |
| 195 | $log.info("Resized: " + dim.width + "x" + dim.height); | 199 | $log.info("Resized: " + dim.width + "x" + dim.height); |
| 196 | - graph.resize(dim); | 200 | + if (graph) { |
| 201 | + graph.resize(dim); | ||
| 202 | + } | ||
| 197 | } | 203 | } |
| 198 | 204 | ||
| 199 | function recordSample(sample) { | 205 | function recordSample(sample) { | ... | ... |
-
Please register or login to post a comment