I am showing up some data using d3 donut chart as shown below, however when I switch to mobile view, chart is not visible properly how can I make it work or make it show entire donut and details in mobile view ?
var width = $(".chart-time-spent").width(), height = 250, radius = Math.min(width, height) / 2, legendPosY = (height / 2) - 20;
var color = d3.scale.ordinal().range(["#99ecf0", "#1cb5bb", "#10538c", "#75c6f3", "#60d3ff", "#4ec3d7", "#37c2a5", "#8bcb6b"]);
var API = apiUrl+"getDeviceCounters";
console.log("deviceController api_> "+API);
var arc = d3.svg.arc().innerRadius(radius - 20).outerRadius(radius - 60);
var arcOver = d3.svg.arc().outerRadius(radius - 18).innerRadius(radius - 62);
var pie = d3.layout.pie().sort(null).value(function (d) { return parseInt(d.time); });
var svg = $rootScope.getDonutSVG(".chart-time-spent", width, height);
<div class="col-md-6 col-xs-12 chart-total-users"></div>