Skip to content

Commit

Permalink
Closes-Bug: #1532763 - Fixed the horizontal scroll appearing for Vrou…
Browse files Browse the repository at this point in the history
…ter details

page. Set the width to 100% to for the sparkline.

Change-Id: If6445aad76facc7dc249322d921fffc4375868d2
  • Loading branch information
manojgn committed Feb 25, 2016
1 parent df111fd commit cf182b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webroot/js/views/SparklineView.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ define([
var sortedData = ([].concat(data)).sort(function (a, b) {
return a - b
});
var graph = d3.select($(selector)[0]).append("svg:svg").attr('class', lineColorClass);
var graph = d3.select($(selector)[0]).append("svg:svg")
.attr('class', lineColorClass)
.style('width','100%');
var maxY = sortedData[sortedData.length - 1];
var x = d3.scale.linear().domain([0, ifNull(sortedData,[]).length]).range([0, 100]);
var y = d3.scale.linear().domain([sortedData[0], maxY * 1.2]).range([10, 0]);
Expand Down

0 comments on commit cf182b1

Please sign in to comment.