=0;i--){var csspi=xml.createProcessingInstruction("xml-stylesheet",'href="'+stylesheets[i]+'" rel="stylesheet"');xml.insertBefore(csspi,xml.firstChild)}xml.removeChild(xml.documentElement);svgCSS=serializer.serializeToString(xml)}var svgText=serializer.serializeToString(svg);svgText=svgText.replace(\/\\&(\\#[0-9]{2,}\\;)\/g,"&$1");return svgCSS+svgText}function createXML(){if(!global.DOMParser)return;return(new DOMParser).parseFromString("","application\/xml")}function debounce(fn){if(!App.vars.debounceTimer)fn.call(this);if(App.vars.debounceTimer)global.clearTimeout(App.vars.debounceTimer);$/;" f
-num manager/module/call_log.php /^ $num = '0'.$m[1];$/;" v
-num manager/module/call_log.php /^ $num = (string) $log['Number'];$/;" v
+num manager/module/call_log.php /^ $num = '0'.$m[1];$/;" v
+num manager/module/call_log.php /^ $num = (string) $log['Number'];$/;" v
+number manager/module/call_log.php /^ $number = '0'.$m[1];$/;" v
+number manager/module/call_log.php /^ $number = (string) $number;$/;" v
nv phpunit/coverage/js/nv.d3.min.js /^chart._options=Object.create({},{width:{get:function(){return width},set:function(_){width=_}},height:{get:function(){return height},set:function(_){height=_}},focusHeight:{get:function(){return height2},set:function(_){height2=_}},showLegend:{get:function(){return showLegend},set:function(_){showLegend=_}},brushExtent:{get:function(){return brushExtent},set:function(_){brushExtent=_}},tooltips:{get:function(){return tooltips},set:function(_){tooltips=_}},tooltipContent:{get:function(){return tooltip},set:function(_){tooltip=_}},defaultState:{get:function(){return defaultState},set:function(_){defaultState=_}},noData:{get:function(){return noData},set:function(_){noData=_}},margin:{get:function(){return margin},set:function(_){margin.top=_.top!==undefined?_.top:margin.top;margin.right=_.right!==undefined?_.right:margin.right;margin.bottom=_.bottom!==undefined?_.bottom:margin.bottom;margin.left=_.left!==undefined?_.left:margin.left}},color:{get:function(){return color},set:function(_){color=nv.utils.getColor(_);legend.color(color)}},interpolate:{get:function(){return lines.interpolate()},set:function(_){lines.interpolate(_);lines2.interpolate(_)}},xTickFormat:{get:function(){return xAxis.xTickFormat()},set:function(_){xAxis.xTickFormat(_);x2Axis.xTickFormat(_)}},yTickFormat:{get:function(){return yAxis.yTickFormat()},set:function(_){yAxis.yTickFormat(_);y2Axis.yTickFormat(_)}},duration:{get:function(){return transitionDuration},set:function(_){transitionDuration=_;yAxis.duration(transitionDuration);xAxis.duration(transitionDuration)}},x:{get:function(){return lines.x()},set:function(_){lines.x(_);lines2.x(_)}},y:{get:function(){return lines.y()},set:function(_){lines.y(_);lines2.y(_)}}});nv.utils.inheritOptions(chart,lines);nv.utils.initOptions(chart);return chart};nv.models.multiBar=function(){"use strict";var margin={top:0,right:0,bottom:0,left:0},width=960,height=500,x=d3.scale.ordinal(),y=d3.scale.linear(),id=Math.floor(Math.random()*1e4),getX=function(d){return d.x},getY=function(d){return d.y},forceY=[0],clipEdge=true,stacked=false,stackOffset="zero",color=nv.utils.defaultColor(),hideable=false,barColor=null,disabled,duration=500,xDomain,yDomain,xRange,yRange,groupSpacing=.1,dispatch=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","renderEnd");var x0,y0,renderWatch=nv.utils.renderWatch(dispatch,duration);var last_datalength=0;function chart(selection){renderWatch.reset();selection.each(function(data){var availableWidth=width-margin.left-margin.right,availableHeight=height-margin.top-margin.bottom,container=d3.select(this);nv.utils.initSVG(container);var endFn=function(d,i){if(d.series===data.length-1&&i===data[0].values.length-1)return true;return false};if(hideable&&data.length)hideable=[{values:data[0].values.map(function(d){return{x:d.x,y:0,series:d.series,size:.01}})}];if(stacked)data=d3.layout.stack().offset(stackOffset).values(function(d){return d.values}).y(getY)(!data.length&&hideable?hideable:data);data.forEach(function(series,i){series.values.forEach(function(point){point.series=i})});if(stacked)data[0].values.map(function(d,i){var posBase=0,negBase=0;data.map(function(d){var f=d.values[i];f.size=Math.abs(f.y);if(f.y<0){f.y1=negBase;negBase=negBase-f.size}else{f.y1=f.size+posBase;posBase=posBase+f.size}})});var seriesData=xDomain&&yDomain?[]:data.map(function(d){return d.values.map(function(d,i){return{x:getX(d,i),y:getY(d,i),y0:d.y0,y1:d.y1}})});x.domain(xDomain||d3.merge(seriesData).map(function(d){return d.x})).rangeBands(xRange||[0,availableWidth],groupSpacing);y.domain(yDomain||d3.extent(d3.merge(seriesData).map(function(d){return stacked?d.y>0?d.y1:d.y1+d.y:d.y}).concat(forceY))).range(yRange||[availableHeight,0]);if(x.domain()[0]===x.domain()[1])x.domain()[0]?x.domain([x.domain()[0]-x.domain()[0]*.01,x.domain()[1]+x.domain()[1]*.01]):x.domain([-1,1]);if(y.domain()[0]===y.domain()[1])y.domain()[0]?y.domain([y.domain()[0]+y.domain()[0]*.01,y.domain()[1]-y.domain()[1]*.01]):y.domain([-1,1]);x0=x0||x;y0=y0||y;var wrap=container.selectAll("g.nv-wrap.nv-multibar").data([data]);var wrapEnter=wrap.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar");var defsEnter=wrapEnter.append("defs");var gEnter=wrapEnter.append("g");var g=wrap.select("g");gEnter.append("g").attr("class","nv-groups");wrap.attr("transform","translate("+margin.left+","+margin.top+")");defsEnter.append("clipPath").attr("id","nv-edge-clip-"+id).append("rect");wrap.select("#nv-edge-clip-"+id+" rect").attr("width",availableWidth).attr("height",availableHeight);g.attr("clip-path",clipEdge?"url(#nv-edge-clip-"+id+")":"");var groups=wrap.select(".nv-groups").selectAll(".nv-group").data(function(d){return d},function(d,i){return i});groups.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);var exitTransition=renderWatch.transition(groups.exit().selectAll("rect.nv-bar"),"multibarExit",Math.min(100,duration)).attr("y",function(d){return(stacked?y0(d.y0):y0(0))||0}).attr("height",0).remove();if(exitTransition.delay)exitTransition.delay(function(d,i){var delay=i*(duration\/(last_datalength+1))-i;return delay});groups.attr("class",function(d,i){return"nv-group nv-series-"+i}).classed("hover",function(d){return d.hover}).style("fill",function(d,i){return color(d,i)}).style("stroke",function(d,i){return color(d,i)});groups.style("stroke-opacity",1).style("fill-opacity",.75);var bars=groups.selectAll("rect.nv-bar").data(function(d){return hideable&&!data.length?hideable.values:d.values});bars.exit().remove();var barsEnter=bars.enter().append("rect").attr("class",function(d,i){return getY(d,i)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(d,i,j){return stacked?0:j*x.rangeBand()\/data.length}).attr("y",function(d){return y0(stacked?d.y0:0)||0}).attr("height",0).attr("width",x.rangeBand()\/(stacked?1:data.length)).attr("transform",function(d,i){return"translate("+x(getX(d,i))+",0)"});bars.style("fill",function(d,i,j){return color(d,j,i)}).style("stroke",function(d,i,j){return color(d,j,i)}).on("mouseover",function(d,i){d3.select(this).classed("hover",true);dispatch.elementMouseover({value:getY(d,i),point:d,series:data[d.series],pos:[x(getX(d,i))+x.rangeBand()*(stacked?data.length\/2:d.series+.5)\/data.length,y(getY(d,i)+(stacked?d.y0:0))],pointIndex:i,seriesIndex:d.series,e:d3.event})}).on("mouseout",function(d,i){d3.select(this).classed("hover",false);dispatch.elementMouseout({value:getY(d,i),point:d,series:data[d.series],pointIndex:i,seriesIndex:d.series,e:d3.event})}).on("click",function(d,i){dispatch.elementClick({value:getY(d,i),point:d,series:data[d.series],pos:[x(getX(d,i))+x.rangeBand()*(stacked?data.length\/2:d.series+.5)\/data.length,y(getY(d,i)+(stacked?d.y0:0))],pointIndex:i,seriesIndex:d.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(d,i){dispatch.elementDblClick({value:getY(d,i),point:d,series:data[d.series],pos:[x(getX(d,i))+x.rangeBand()*(stacked?data.length\/2:d.series+.5)\/data.length,y(getY(d,i)+(stacked?d.y0:0))],pointIndex:i,seriesIndex:d.series,e:d3.event});d3.event.stopPropagation()});bars.attr("class",function(d,i){return getY(d,i)<0?"nv-bar negative":"nv-bar positive"}).attr("transform",function(d,i){return"translate("+x(getX(d,i))+",0)"});if(barColor){if(!disabled)disabled=data.map(function(){return true});bars.style("fill",function(d,i,j){return d3.rgb(barColor(d,i)).darker(disabled.map(function(d,i){return i}).filter(function(d,i){return!disabled[i]})[j]).toString()}).style("stroke",function(d,i,j){return d3.rgb(barColor(d,i)).darker(disabled.map(function(d,i){return i}).filter(function(d,i){return!disabled[i]})[j]).toString()})}var barSelection=bars.watchTransition(renderWatch,"multibar",Math.min(250,duration)).delay(function(d,i){return i*duration\/data[0].values.length});if(stacked)barSelection.attr("y",function(d,i){return y(stacked?d.y1:0)}).attr("height",function(d,i){return Math.max(Math.abs(y(d.y+(stacked?d.y0:0))-y(stacked?d.y0:0)),1)}).attr("x",function(d,i){return stacked?0:d.series*x.rangeBand()\/data.length}).attr("width",x.rangeBand()\/(stacked?1:data.length));else barSelection.attr("x",function(d,i){return d.series*x.rangeBand()\/data.length}).attr("width",x.rangeBand()\/data.length).attr("y",function(d,i){return getY(d,i)<0?y(0):y(0)-y(getY(d,i))<1?y(0)-1:y(getY(d,i))||0}).attr("height",function(d,i){return Math.max(Math.abs(y(getY(d,i))-y(0)),1)||0});x0=x.copy();y0=y.copy();if(data[0]&&data[0].values){last_datalength=data[0].values.length}});renderWatch.renderEnd("multibar immediate");return chart}chart.dispatch=dispatch;chart.options=nv.utils.optionsFunc.bind(chart);chart._options=Object.create({},{width:{get:function(){return width},set:function(_){width=_}},height:{get:function(){return height},set:function(_){height=_}},x:{get:function(){return getX},set:function(_){getX=_}},y:{get:function(){return getY},set:function(_){getY=_}},xScale:{get:function(){return x},set:function(_){x=_}},yScale:{get:function(){return y},set:function(_){y=_}},xDomain:{get:function(){return xDomain},set:function(_){xDomain=_}},yDomain:{get:function(){return yDomain},set:function(_){yDomain=_}},xRange:{get:function(){return xRange},set:function(_){xRange=_}},yRange:{get:function(){return yRange},set:function(_){yRange=_}},forceY:{get:function(){return forceY},set:function(_){forceY=_}},stacked:{get:function(){return stacked},set:function(_){stacked=_}},stackOffset:{get:function(){return stackOffset},set:function(_){stackOffset=_}},clipEdge:{get:function(){return clipEdge},set:function(_){clipEdge=_}},disabled:{get:function(){return disabled},set:function(_){disabled=_}},id:{get:function(){return id},set:function(_){id=_}},hideable:{get:function(){return hideable},set:function(_){hideable=_}},groupSpacing:{get:function(){return groupSpacing},set:function(_){groupSpacing=_}},margin:{get:function(){return margin},set:function(_){margin.top=_.top!==undefined?_.top:margin.top;margin.right=_.right!==undefined?_.right:margin.right;margin.bottom=_.bottom!==undefined?_.bottom:margin.bottom;margin.left=_.left!==undefined?_.left:margin.left}},duration:{get:function(){return duration},set:function(_){duration=_;renderWatch.reset(duration)}},color:{get:function(){return color},set:function(_){color=nv.utils.getColor(_)}},barColor:{get:function(){return barColor},set:function(_){barColor=nv.utils.getColor(_)}}});nv.utils.initOptions(chart);return chart};nv.models.multiBarChart=function(){"use strict";var multibar=nv.models.multiBar(),xAxis=nv.models.axis(),yAxis=nv.models.axis(),legend=nv.models.legend(),controls=nv.models.legend();var margin={top:30,right:20,bottom:50,left:60},width=null,height=null,color=nv.utils.defaultColor(),showControls=true,controlLabels={},showLegend=true,showXAxis=true,showYAxis=true,rightAlignYAxis=false,reduceXTicks=true,staggerLabels=false,rotateLabels=0,tooltips=true,tooltip=function(key,x,y,e,graph){return""+key+"<\/h3>"+"
"+y+" on "+x+"<\/p>"},x,y,state=nv.utils.state(),defaultState=null,noData="No Data Available.",dispatch=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd"),controlWidth=function(){return showControls?180:0},duration=250;state.stacked=false;multibar.stacked(false);xAxis.orient("bottom").tickPadding(7).highlightZero(true).showMaxMin(false).tickFormat(function(d){return d});yAxis.orient(rightAlignYAxis?"right":"left").tickFormat(d3.format(",.1f"));controls.updateState(false);var renderWatch=nv.utils.renderWatch(dispatch);var stacked=false;var showTooltip=function(e,offsetElement){var left=e.pos[0]+(offsetElement.offsetLeft||0),top=e.pos[1]+(offsetElement.offsetTop||0),x=xAxis.tickFormat()(multibar.x()(e.point,e.pointIndex)),y=yAxis.tickFormat()(multibar.y()(e.point,e.pointIndex)),content=tooltip(e.series.key,x,y,e,chart);nv.tooltip.show([left,top],content,e.value<0?"n":"s",null,offsetElement)};var stateGetter=function(data){return function(){return{active:data.map(function(d){return!d.disabled}),stacked:stacked}}};var stateSetter=function(data){return function(state){if(state.stacked!==undefined)stacked=state.stacked;if(state.active!==undefined)data.forEach(function(series,i){series.disabled=!state.active[i]})}};function chart(selection){renderWatch.reset();renderWatch.models(multibar);if(showXAxis)renderWatch.models(xAxis);if(showYAxis)renderWatch.models(yAxis);selection.each(function(data){var container=d3.select(this),that=this;nv.utils.initSVG(container);var availableWidth=(width||parseInt(container.style("width"))||960)-margin.left-margin.right,availableHeight=(height||parseInt(container.style("height"))||400)-margin.top-margin.bottom;chart.update=function(){if(duration===0)container.call(chart);else container.transition().duration(duration).call(chart)};chart.container=this;state.setter(stateSetter(data),chart.update).getter(stateGetter(data)).update();state.disabled=data.map(function(d){return!!d.disabled});if(!defaultState){var key;defaultState={};for(key in state){if(state[key]instanceof Array)defaultState[key]=state[key].slice(0);else defaultState[key]=state[key]}}if(!data||!data.length||!data.filter(function(d){return d.values.length}).length){var noDataText=container.selectAll(".nv-noData").data([noData]);noDataText.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");noDataText.attr("x",margin.left+availableWidth\/2).attr("y",margin.top+availableHeight\/2).text(function(d){return d});return chart}else{container.selectAll(".nv-noData").remove()}x=multibar.xScale();y=multibar.yScale();var wrap=container.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([data]);var gEnter=wrap.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g");var g=wrap.select("g");gEnter.append("g").attr("class","nv-x nv-axis");gEnter.append("g").attr("class","nv-y nv-axis");gEnter.append("g").attr("class","nv-barsWrap");gEnter.append("g").attr("class","nv-legendWrap");gEnter.append("g").attr("class","nv-controlsWrap");if(showLegend){legend.width(availableWidth-controlWidth());if(multibar.barColor())data.forEach(function(series,i){series.color=d3.rgb("#ccc").darker(i*1.5).toString()});g.select(".nv-legendWrap").datum(data).call(legend);if(margin.top!=legend.height()){margin.top=legend.height();availableHeight=(height||parseInt(container.style("height"))||400)-margin.top-margin.bottom}g.select(".nv-legendWrap").attr("transform","translate("+controlWidth()+","+-margin.top+")")}if(showControls){var controlsData=[{key:controlLabels.grouped||"Grouped",disabled:multibar.stacked()},{key:controlLabels.stacked||"Stacked",disabled:!multibar.stacked()}];controls.width(controlWidth()).color(["#444","#444","#444"]);g.select(".nv-controlsWrap").datum(controlsData).attr("transform","translate(0,"+-margin.top+")").call(controls)}wrap.attr("transform","translate("+margin.left+","+margin.top+")");if(rightAlignYAxis){g.select(".nv-y.nv-axis").attr("transform","translate("+availableWidth+",0)")}multibar.disabled(data.map(function(series){return series.disabled})).width(availableWidth).height(availableHeight).color(data.map(function(d,i){return d.color||color(d,i)}).filter(function(d,i){return!data[i].disabled}));var barsWrap=g.select(".nv-barsWrap").datum(data.filter(function(d){return!d.disabled}));barsWrap.call(multibar);if(showXAxis){xAxis.scale(x).ticks(nv.utils.calcTicksX(availableWidth\/100,data)).tickSize(-availableHeight,0);g.select(".nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");g.select(".nv-x.nv-axis").call(xAxis);var xTicks=g.select(".nv-x.nv-axis > g").selectAll("g");xTicks.selectAll("line, text").style("opacity",1);if(staggerLabels){var getTranslate=function(x,y){return"translate("+x+","+y+")"};var staggerUp=5,staggerDown=17;xTicks.selectAll("text").attr("transform",function(d,i,j){return getTranslate(0,j%2==0?staggerUp:staggerDown)});var totalInBetweenTicks=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;g.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(d,i){return getTranslate(0,i===0||totalInBetweenTicks%2!==0?staggerDown:staggerUp)})}if(reduceXTicks)xTicks.filter(function(d,i){return i%Math.ceil(data[0].values.length\/(availableWidth\/100))!==0}).selectAll("text, line").style("opacity",0);if(rotateLabels)xTicks.selectAll(".tick text").attr("transform","rotate("+rotateLabels+" 0,0)").style("text-anchor",rotateLabels>0?"start":"end");g.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}if(showYAxis){yAxis.scale(y).ticks(nv.utils.calcTicksY(availableHeight\/36,data)).tickSize(-availableWidth,0);g.select(".nv-y.nv-axis").call(yAxis)}legend.dispatch.on("stateChange",function(newState){for(var key in newState)state[key]=newState[key];dispatch.stateChange(state);chart.update()});controls.dispatch.on("legendClick",function(d,i){if(!d.disabled)return;controlsData=controlsData.map(function(s){s.disabled=true;return s});d.disabled=false;switch(d.key){case"Grouped":multibar.stacked(false);break;case"Stacked":multibar.stacked(true);break}state.stacked=multibar.stacked();dispatch.stateChange(state);chart.update()});dispatch.on("tooltipShow",function(e){if(tooltips)showTooltip(e,that.parentNode)});dispatch.on("changeState",function(e){if(typeof e.disabled!=="undefined"){data.forEach(function(series,i){series.disabled=e.disabled[i]});state.disabled=e.disabled}if(typeof e.stacked!=="undefined"){multibar.stacked(e.stacked);state.stacked=e.stacked;stacked=e.stacked}chart.update()})});renderWatch.renderEnd("multibarchart immediate");return chart}multibar.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+margin.left,e.pos[1]+margin.top];dispatch.tooltipShow(e)});multibar.dispatch.on("elementMouseout.tooltip",function(e){dispatch.tooltipHide(e)});dispatch.on("tooltipHide",function(){if(tooltips)nv.tooltip.cleanup()});chart.dispatch=dispatch;chart.multibar=multibar;chart.legend=legend;chart.xAxis=xAxis;chart.yAxis=yAxis;chart.state=state;chart.options=nv.utils.optionsFunc.bind(chart);chart._options=Object.create({},{width:{get:function(){return width},set:function(_){width=_}},height:{get:function(){return height},set:function(_){height=_}},showLegend:{get:function(){return showLegend},set:function(_){showLegend=_}},showControls:{get:function(){return showControls},set:function(_){showControls=_}},controlLabels:{get:function(){return controlLabels},set:function(_){controlLabels=_}},showXAxis:{get:function(){return showXAxis},set:function(_){showXAxis=_}},showYAxis:{get:function(){return showYAxis},set:function(_){showYAxis=_}},tooltips:{get:function(){return tooltips},set:function(_){tooltips=_}},tooltipContent:{get:function(){return tooltip},set:function(_){tooltip=_}},defaultState:{get:function(){return defaultState},set:function(_){defaultState=_}},noData:{get:function(){return noData},set:function(_){noData=_}},reduceXTicks:{get:function(){return reduceXTicks},set:function(_){reduceXTicks=_}},rotateLabels:{get:function(){return rotateLabels},set:function(_){rotateLabels=_}},staggerLabels:{get:function(){return staggerLabels},set:function(_){staggerLabels=_}},margin:{get:function(){return margin},set:function(_){margin.top=_.top!==undefined?_.top:margin.top;margin.right=_.right!==undefined?_.right:margin.right;margin.bottom=_.bottom!==undefined?_.bottom:margin.bottom;margin.left=_.left!==undefined?_.left:margin.left}},duration:{get:function(){return duration},set:function(_){duration=_;multibar.duration(duration);xAxis.duration(duration);yAxis.duration(duration);renderWatch.reset(duration)}},color:{get:function(){return color},set:function(_){color=nv.utils.getColor(_);legend.color(color)}},rightAlignYAxis:{get:function(){return rightAlignYAxis},set:function(_){rightAlignYAxis=_;yAxis.orient(rightAlignYAxis?"right":"left")}}});nv.utils.inheritOptions(chart,multibar);nv.utils.initOptions(chart);return chart};nv.models.multiBarHorizontal=function(){"use strict";var margin={top:0,right:0,bottom:0,left:0},width=960,height=500,id=Math.floor(Math.random()*1e4),x=d3.scale.ordinal(),y=d3.scale.linear(),getX=function(d){return d.x},getY=function(d){return d.y},getYerr=function(d){return d.yErr},forceY=[0],color=nv.utils.defaultColor(),barColor=null,disabled,stacked=false,showValues=false,showBarLabels=false,valuePadding=60,valueFormat=d3.format(",.2f"),delay=1200,xDomain,yDomain,xRange,yRange,duration=250,dispatch=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","renderEnd");var x0,y0;var renderWatch=nv.utils.renderWatch(dispatch,duration);function chart(selection){renderWatch.reset();selection.each(function(data){var availableWidth=width-margin.left-margin.right,availableHeight=height-margin.top-margin.bottom,container=d3.select(this);nv.utils.initSVG(container);if(stacked)data=d3.layout.stack().offset("zero").values(function(d){return d.values}).y(getY)(data);data.forEach(function(series,i){series.values.forEach(function(point){point.series=i})});if(stacked)data[0].values.map(function(d,i){var posBase=0,negBase=0;data.map(function(d){var f=d.values[i];f.size=Math.abs(f.y);if(f.y<0){f.y1=negBase-f.size;negBase=negBase-f.size}else{f.y1=posBase;posBase=posBase+f.size}})});var seriesData=xDomain&&yDomain?[]:data.map(function(d){return d.values.map(function(d,i){return{x:getX(d,i),y:getY(d,i),y0:d.y0,y1:d.y1}})});x.domain(xDomain||d3.merge(seriesData).map(function(d){return d.x})).rangeBands(xRange||[0,availableHeight],.1);y.domain(yDomain||d3.extent(d3.merge(seriesData).map(function(d){return stacked?d.y>0?d.y1+d.y:d.y1:d.y}).concat(forceY)));if(showValues&&!stacked)y.range(yRange||[y.domain()[0]<0?valuePadding:0,availableWidth-(y.domain()[1]>0?valuePadding:0)]);else y.range(yRange||[0,availableWidth]);x0=x0||x;y0=y0||d3.scale.linear().domain(y.domain()).range([y(0),y(0)]);var wrap=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([data]);var wrapEnter=wrap.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal");var defsEnter=wrapEnter.append("defs");var gEnter=wrapEnter.append("g");var g=wrap.select("g");gEnter.append("g").attr("class","nv-groups");wrap.attr("transform","translate("+margin.left+","+margin.top+")");var groups=wrap.select(".nv-groups").selectAll(".nv-group").data(function(d){return d},function(d,i){return i});groups.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);groups.exit().watchTransition(renderWatch,"multibarhorizontal: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove();groups.attr("class",function(d,i){return"nv-group nv-series-"+i}).classed("hover",function(d){return d.hover}).style("fill",function(d,i){return color(d,i)}).style("stroke",function(d,i){return color(d,i)});groups.watchTransition(renderWatch,"multibarhorizontal: groups").style("stroke-opacity",1).style("fill-opacity",.75);var bars=groups.selectAll("g.nv-bar").data(function(d){return d.values});bars.exit().remove();var barsEnter=bars.enter().append("g").attr("transform",function(d,i,j){return"translate("+y0(stacked?d.y0:0)+","+(stacked?0:j*x.rangeBand()\/data.length+x(getX(d,i)))+")"});barsEnter.append("rect").attr("width",0).attr("height",x.rangeBand()\/(stacked?1:data.length));bars.on("mouseover",function(d,i){d3.select(this).classed("hover",true);dispatch.elementMouseover({value:getY(d,i),point:d,series:data[d.series],pos:[y(getY(d,i)+(stacked?d.y0:0)),x(getX(d,i))+x.rangeBand()*(stacked?data.length\/2:d.series+.5)\/data.length],pointIndex:i,seriesIndex:d.series,e:d3.event})}).on("mouseout",function(d,i){d3.select(this).classed("hover",false);dispatch.elementMouseout({value:getY(d,i),point:d,series:data[d.series],pointIndex:i,seriesIndex:d.series,e:d3.event})}).on("click",function(d,i){dispatch.elementClick({value:getY(d,i),point:d,series:data[d.series],pos:[x(getX(d,i))+x.rangeBand()*(stacked?data.length\/2:d.series+.5)\/data.length,y(getY(d,i)+(stacked?d.y0:0))],pointIndex:i,seriesIndex:d.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(d,i){dispatch.elementDblClick({value:getY(d,i),point:d,series:data[d.series],pos:[x(getX(d,i))+x.rangeBand()*(stacked?data.length\/2:d.series+.5)\/data.length,y(getY(d,i)+(stacked?d.y0:0))],pointIndex:i,seriesIndex:d.series,e:d3.event});d3.event.stopPropagation()});if(getYerr(data[0],0)){barsEnter.append("polyline");bars.select("polyline").attr("fill","none").attr("points",function(d,i){var xerr=getYerr(d,i),mid=.8*x.rangeBand()\/((stacked?1:data.length)*2);xerr=xerr.length?xerr:[-Math.abs(xerr),Math.abs(xerr)];xerr=xerr.map(function(e){return y(e)-y(0)});var a=[[xerr[0],-mid],[xerr[0],mid],[xerr[0],0],[xerr[1],0],[xerr[1],-mid],[xerr[1],mid]];return a.map(function(path){return path.join(",")}).join(" ")}).attr("transform",function(d,i){var mid=x.rangeBand()\/((stacked?1:data.length)*2);return"translate("+(getY(d,i)<0?0:y(getY(d,i))-y(0))+", "+mid+")"})}barsEnter.append("text");if(showValues&&!stacked){bars.select("text").attr("text-anchor",function(d,i){return getY(d,i)<0?"end":"start"}).attr("y",x.rangeBand()\/(data.length*2)).attr("dy",".32em").html(function(d,i){var t=valueFormat(getY(d,i)),yerr=getYerr(d,i);if(yerr===undefined)return t;if(!yerr.length)return t+"±"+valueFormat(Math.abs(yerr));return t+"+"+valueFormat(Math.abs(yerr[1]))+"-"+valueFormat(Math.abs(yerr[0]))});bars.watchTransition(renderWatch,"multibarhorizontal: bars").select("text").attr("x",function(d,i){return getY(d,i)<0?-4:y(getY(d,i))-y(0)+4})}else{bars.selectAll("text").text("")}if(showBarLabels&&!stacked){barsEnter.append("text").classed("nv-bar-label",true);bars.select("text.nv-bar-label").attr("text-anchor",function(d,i){return getY(d,i)<0?"start":"end"}).attr("y",x.rangeBand()\/(data.length*2)).attr("dy",".32em").text(function(d,i){return getX(d,i)});bars.watchTransition(renderWatch,"multibarhorizontal: bars").select("text.nv-bar-label").attr("x",function(d,i){return getY(d,i)<0?y(0)-y(getY(d,i))+4:-4})}else{bars.selectAll("text.nv-bar-label").text("")}bars.attr("class",function(d,i){return getY(d,i)<0?"nv-bar negative":"nv-bar positive"});if(barColor){if(!disabled)disabled=data.map(function(){return true});bars.style("fill",function(d,i,j){return d3.rgb(barColor(d,i)).darker(disabled.map(function(d,i){return i}).filter(function(d,i){return!disabled[i]})[j]).toString()}).style("stroke",function(d,i,j){return d3.rgb(barColor(d,i)).darker(disabled.map(function(d,i){return i}).filter(function(d,i){return!disabled[i]})[j]).toString()})}if(stacked)bars.watchTransition(renderWatch,"multibarhorizontal: bars").attr("transform",function(d,i){return"translate("+y(d.y1)+","+x(getX(d,i))+")"}).select("rect").attr("width",function(d,i){return Math.abs(y(getY(d,i)+d.y0)-y(d.y0))}).attr("height",x.rangeBand());else bars.watchTransition(renderWatch,"multibarhorizontal: bars").attr("transform",function(d,i){return"translate("+(getY(d,i)<0?y(getY(d,i)):y(0))+","+(d.series*x.rangeBand()\/data.length+x(getX(d,i)))+")"}).select("rect").attr("height",x.rangeBand()\/data.length).attr("width",function(d,i){return Math.max(Math.abs(y(getY(d,i))-y(0)),1)});x0=x.copy();y0=y.copy()});renderWatch.renderEnd("multibarHorizontal immediate");return chart}chart.dispatch=dispatch;chart.options=nv.utils.optionsFunc.bind(chart);chart._options=Object.create({},{width:{get:function(){return width},set:function(_){width=_}},height:{get:function(){return height},set:function(_){height=_}},x:{get:function(){return getX},set:function(_){getX=_}},y:{get:function(){return getY},set:function(_){getY=_}},yErr:{get:function(){return getYerr},set:function(_){getYerr=_}},xScale:{get:function(){return x},set:function(_){x=_}},yScale:{get:function(){return y},set:function(_){y=_}},xDomain:{get:function(){return xDomain},set:function(_){xDomain=_}},yDomain:{get:function(){return yDomain},set:function(_){yDomain=_}},xRange:{get:function(){return xRange},set:function(_){xRange=_}},yRange:{get:function(){return yRange},set:function(_){yRange=_}},forceY:{get:function(){return forceY},set:function(_){forceY=_}},stacked:{get:function(){return stacked},set:function(_){stacked=_}},showValues:{get:function(){return showValues},set:function(_){showValues=_}},disabled:{get:function(){return disabled},set:function(_){disabled=_}},id:{get:function(){return id},set:function(_){id=_}},valueFormat:{get:function(){return valueFormat},set:function(_){valueFormat=_}},valuePadding:{get:function(){return valuePadding},set:function(_){valuePadding=_}},margin:{get:function(){return margin},set:function(_){margin.top=_.top!==undefined?_.top:margin.top;margin.right=_.right!==undefined?_.right:margin.right;margin.bottom=_.bottom!==undefined?_.bottom:margin.bottom;margin.left=_.left!==undefined?_.left:margin.left}},duration:{get:function(){return duration},set:function(_){duration=_;renderWatch.reset(duration)}},color:{get:function(){return color},set:function(_){color=nv.utils.getColor(_)}},barColor:{get:function(){return color},set:function(_){barColor=nv.utils.getColor(_)}}});nv.utils.initOptions(chart);return chart};nv.models.multiBarHorizontalChart=function(){"use strict";var multibar=nv.models.multiBarHorizontal(),xAxis=nv.models.axis(),yAxis=nv.models.axis(),legend=nv.models.legend().height(30),controls=nv.models.legend().height(30);var margin={top:30,right:20,bottom:50,left:60},width=null,height=null,color=nv.utils.defaultColor(),showControls=true,controlLabels={},showLegend=true,showXAxis=true,showYAxis=true,stacked=false,tooltips=true,tooltip=function(key,x,y,e,graph){return"
"+key+" - "+x+"<\/h3>"+"
"+y+"<\/p>"},x,y,state=nv.utils.state(),defaultState=null,noData="No Data Available.",dispatch=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd"),controlWidth=function(){return showControls?180:0},duration=250;state.stacked=false;multibar.stacked(stacked);xAxis.orient("left").tickPadding(5).highlightZero(false).showMaxMin(false).tickFormat(function(d){return d});yAxis.orient("bottom").tickFormat(d3.format(",.1f"));controls.updateState(false);var showTooltip=function(e,offsetElement){var left=e.pos[0]+(offsetElement.offsetLeft||0),top=e.pos[1]+(offsetElement.offsetTop||0),x=xAxis.tickFormat()(multibar.x()(e.point,e.pointIndex)),y=yAxis.tickFormat()(multibar.y()(e.point,e.pointIndex)),content=tooltip(e.series.key,x,y,e,chart);nv.tooltip.show([left,top],content,e.value<0?"e":"w",null,offsetElement)};var stateGetter=function(data){return function(){return{active:data.map(function(d){return!d.disabled}),stacked:stacked}}};var stateSetter=function(data){return function(state){if(state.stacked!==undefined)stacked=state.stacked;if(state.active!==undefined)data.forEach(function(series,i){series.disabled=!state.active[i]})}};var renderWatch=nv.utils.renderWatch(dispatch,duration);function chart(selection){renderWatch.reset();renderWatch.models(multibar);if(showXAxis)renderWatch.models(xAxis);if(showYAxis)renderWatch.models(yAxis);selection.each(function(data){var container=d3.select(this),that=this;nv.utils.initSVG(container);var availableWidth=(width||parseInt(container.style("width"))||960)-margin.left-margin.right,availableHeight=(height||parseInt(container.style("height"))||400)-margin.top-margin.bottom;chart.update=function(){container.transition().duration(duration).call(chart)};chart.container=this;stacked=multibar.stacked();state.setter(stateSetter(data),chart.update).getter(stateGetter(data)).update();state.disabled=data.map(function(d){return!!d.disabled});if(!defaultState){var key;defaultState={};for(key in state){if(state[key]instanceof Array)defaultState[key]=state[key].slice(0);else defaultState[key]=state[key]}}if(!data||!data.length||!data.filter(function(d){return d.values.length}).length){var noDataText=container.selectAll(".nv-noData").data([noData]);noDataText.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");noDataText.attr("x",margin.left+availableWidth\/2).attr("y",margin.top+availableHeight\/2).text(function(d){return d});return chart}else{container.selectAll(".nv-noData").remove()$/;" m
nv phpunit/coverage/js/nv.d3.min.js /^},set:function(_){clipEdge=_}},margin:{get:function(){return margin},set:function(_){margin.top=_.top!==undefined?_.top:margin.top;margin.right=_.right!==undefined?_.right:margin.right;margin.bottom=_.bottom!==undefined?_.bottom:margin.bottom;margin.left=_.left!==undefined?_.left:margin.left}},duration:{get:function(){return duration},set:function(_){duration=_;renderWatch.reset(duration);scatter.duration(duration)}},isArea:{get:function(){return isArea},set:function(_){isArea=d3.functor(_)}},x:{get:function(){return getX},set:function(_){getX=_;scatter.x(_)}},y:{get:function(){return getY},set:function(_){getY=_;scatter.y(_)}},color:{get:function(){return color},set:function(_){color=nv.utils.getColor(_);scatter.color(color)}}});nv.utils.inheritOptions(chart,scatter);nv.utils.initOptions(chart);return chart};nv.models.lineChart=function(){"use strict";var lines=nv.models.line(),xAxis=nv.models.axis(),yAxis=nv.models.axis(),legend=nv.models.legend(),interactiveLayer=nv.interactiveGuideline();var margin={top:30,right:20,bottom:50,left:60},color=nv.utils.defaultColor(),width=null,height=null,showLegend=true,showXAxis=true,showYAxis=true,rightAlignYAxis=false,useInteractiveGuideline=false,tooltips=true,tooltip=function(key,x,y,e,graph){return"
"+key+"<\/h3>"+"
"+y+" at "+x+"<\/p>"},x,y,state=nv.utils.state(),defaultState=null,noData="No Data Available.",dispatch=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd"),duration=250;xAxis.orient("bottom").tickPadding(7);yAxis.orient(rightAlignYAxis?"right":"left");var showTooltip=function(e,offsetElement){var left=e.pos[0]+(offsetElement.offsetLeft||0),top=e.pos[1]+(offsetElement.offsetTop||0),x=xAxis.tickFormat()(lines.x()(e.point,e.pointIndex)),y=yAxis.tickFormat()(lines.y()(e.point,e.pointIndex)),content=tooltip(e.series.key,x,y,e,chart);nv.tooltip.show([left,top],content,null,null,offsetElement)};var renderWatch=nv.utils.renderWatch(dispatch,duration);var stateGetter=function(data){return function(){return{active:data.map(function(d){return!d.disabled})}}};var stateSetter=function(data){return function(state){if(state.active!==undefined)data.forEach(function(series,i){series.disabled=!state.active[i]})}};function chart(selection){renderWatch.reset();renderWatch.models(lines);if(showXAxis)renderWatch.models(xAxis);if(showYAxis)renderWatch.models(yAxis);selection.each(function(data){var container=d3.select(this),that=this;nv.utils.initSVG(container);var availableWidth=(width||parseInt(container.style("width"))||960)-margin.left-margin.right,availableHeight=(height||parseInt(container.style("height"))||400)-margin.top-margin.bottom;chart.update=function(){if(duration===0)container.call(chart);else container.transition().duration(duration).call(chart)};chart.container=this;state.setter(stateSetter(data),chart.update).getter(stateGetter(data)).update();state.disabled=data.map(function(d){return!!d.disabled});if(!defaultState){var key;defaultState={};for(key in state){if(state[key]instanceof Array)defaultState[key]=state[key].slice(0);else defaultState[key]=state[key]}}if(!data||!data.length||!data.filter(function(d){return d.values.length}).length){var noDataText=container.selectAll(".nv-noData").data([noData]);noDataText.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");noDataText.attr("x",margin.left+availableWidth\/2).attr("y",margin.top+availableHeight\/2).text(function(d){return d});return chart}else{container.selectAll(".nv-noData").remove()}x=lines.xScale();y=lines.yScale();var wrap=container.selectAll("g.nv-wrap.nv-lineChart").data([data]);var gEnter=wrap.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g");var g=wrap.select("g");gEnter.append("rect").style("opacity",0);gEnter.append("g").attr("class","nv-x nv-axis");gEnter.append("g").attr("class","nv-y nv-axis");gEnter.append("g").attr("class","nv-linesWrap");gEnter.append("g").attr("class","nv-legendWrap");gEnter.append("g").attr("class","nv-interactive");g.select("rect").attr("width",availableWidth).attr("height",availableHeight>0?availableHeight:0);if(showLegend){legend.width(availableWidth);g.select(".nv-legendWrap").datum(data).call(legend);if(margin.top!=legend.height()){margin.top=legend.height();availableHeight=(height||parseInt(container.style("height"))||400)-margin.top-margin.bottom}wrap.select(".nv-legendWrap").attr("transform","translate(0,"+-margin.top+")")}wrap.attr("transform","translate("+margin.left+","+margin.top+")");if(rightAlignYAxis){g.select(".nv-y.nv-axis").attr("transform","translate("+availableWidth+",0)")}if(useInteractiveGuideline){interactiveLayer.width(availableWidth).height(availableHeight).margin({left:margin.left,top:margin.top}).svgContainer(container).xScale(x);wrap.select(".nv-interactive").call(interactiveLayer)}lines.width(availableWidth).height(availableHeight).color(data.map(function(d,i){return d.color||color(d,i)}).filter(function(d,i){return!data[i].disabled}));var linesWrap=g.select(".nv-linesWrap").datum(data.filter(function(d){return!d.disabled}));linesWrap.call(lines);if(showXAxis){xAxis.scale(x).ticks(nv.utils.calcTicksX(availableWidth\/100,data)).tickSize(-availableHeight,0);g.select(".nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");g.select(".nv-x.nv-axis").call(xAxis)}if(showYAxis){yAxis.scale(y).ticks(nv.utils.calcTicksY(availableHeight\/36,data)).tickSize(-availableWidth,0);g.select(".nv-y.nv-axis").call(yAxis)}legend.dispatch.on("stateChange",function(newState){for(var key in newState)state[key]=newState[key];dispatch.stateChange(state);chart.update()});interactiveLayer.dispatch.on("elementMousemove",function(e){lines.clearHighlights();var singlePoint,pointIndex,pointXLocation,allData=[];data.filter(function(series,i){series.seriesIndex=i;return!series.disabled}).forEach(function(series,i){pointIndex=nv.interactiveBisect(series.values,e.pointXValue,chart.x());lines.highlightPoint(i,pointIndex,true);var point=series.values[pointIndex];if(typeof point==="undefined")return;if(typeof singlePoint==="undefined")singlePoint=point;if(typeof pointXLocation==="undefined")pointXLocation=chart.xScale()(chart.x()(point,pointIndex));allData.push({key:series.key,value:chart.y()(point,pointIndex),color:color(series,series.seriesIndex)})});if(allData.length>2){var yValue=chart.yScale().invert(e.mouseY);var domainExtent=Math.abs(chart.yScale().domain()[0]-chart.yScale().domain()[1]);var threshold=.03*domainExtent;var indexToHighlight=nv.nearestValueIndex(allData.map(function(d){return d.value}),yValue,threshold);if(indexToHighlight!==null)allData[indexToHighlight].highlight=true}var xValue=xAxis.tickFormat()(chart.x()(singlePoint,pointIndex));interactiveLayer.tooltip.position({left:pointXLocation+margin.left,top:e.mouseY+margin.top}).chartContainer(that.parentNode).enabled(tooltips).valueFormatter(function(d,i){return yAxis.tickFormat()(d)}).data({value:xValue,series:allData})();interactiveLayer.renderGuideLine(pointXLocation)});interactiveLayer.dispatch.on("elementClick",function(e){var pointXLocation,allData=[];data.filter(function(series,i){series.seriesIndex=i;return!series.disabled}).forEach(function(series){var pointIndex=nv.interactiveBisect(series.values,e.pointXValue,chart.x());var point=series.values[pointIndex];if(typeof point==="undefined")return;if(typeof pointXLocation==="undefined")pointXLocation=chart.xScale()(chart.x()(point,pointIndex));var yPos=chart.yScale()(chart.y()(point,pointIndex));allData.push({point:point,pointIndex:pointIndex,pos:[pointXLocation,yPos],seriesIndex:series.seriesIndex,series:series})});lines.dispatch.elementClick(allData)});interactiveLayer.dispatch.on("elementMouseout",function(e){dispatch.tooltipHide();lines.clearHighlights()});dispatch.on("tooltipShow",function(e){if(tooltips)showTooltip(e,that.parentNode)});dispatch.on("changeState",function(e){if(typeof e.disabled!=="undefined"&&data.length===e.disabled.length){data.forEach(function(series,i){series.disabled=e.disabled[i]});state.disabled=e.disabled}chart.update()})});renderWatch.renderEnd("lineChart immediate");return chart}lines.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+margin.left,e.pos[1]+margin.top];dispatch.tooltipShow(e)});lines.dispatch.on("elementMouseout.tooltip",function(e){dispatch.tooltipHide(e)});dispatch.on("tooltipHide",function(){if(tooltips)nv.tooltip.cleanup()});chart.dispatch=dispatch;chart.lines=lines;chart.legend=legend;chart.xAxis=xAxis;chart.yAxis=yAxis;chart.interactiveLayer=interactiveLayer;chart.dispatch=dispatch;chart.options=nv.utils.optionsFunc.bind(chart);chart._options=Object.create({},{width:{get:function(){return width},set:function(_){width=_}},height:{get:function(){return height},set:function(_){height=_}},showLegend:{get:function(){return showLegend},set:function(_){showLegend=_}},showXAxis:{get:function(){return showXAxis},set:function(_){showXAxis=_}},showYAxis:{get:function(){return showYAxis},set:function(_){showYAxis=_}},tooltips:{get:function(){return tooltips},set:function(_){tooltips=_}},tooltipContent:{get:function(){return tooltip},set:function(_){tooltip=_}},defaultState:{get:function(){return defaultState},set:function(_){defaultState=_}},noData:{get:function(){return noData},set:function(_){noData=_}},margin:{get:function(){return margin},set:function(_){margin.top=_.top!==undefined?_.top:margin.top;margin.right=_.right!==undefined?_.right:margin.right;margin.bottom=_.bottom!==undefined?_.bottom:margin.bottom;margin.left=_.left!==undefined?_.left:margin.left}},duration:{get:function(){return duration},set:function(_){duration=_;renderWatch.reset(duration);lines.duration(duration);xAxis.duration(duration);yAxis.duration(duration)}},color:{get:function(){return color},set:function(_){color=nv.utils.getColor(_);legend.color(color);lines.color(color)}},rightAlignYAxis:{get:function(){return rightAlignYAxis},set:function(_){rightAlignYAxis=_;yAxis.orient(rightAlignYAxis?"right":"left")}},useInteractiveGuideline:{get:function(){return useInteractiveGuideline},set:function(_){useInteractiveGuideline=_;if(useInteractiveGuideline){lines.interactive(false);lines.useVoronoi(false)}}}});nv.utils.inheritOptions(chart,lines);nv.utils.initOptions(chart);return chart};nv.models.linePlusBarChart=function(){"use strict";var lines=nv.models.line(),lines2=nv.models.line(),bars=nv.models.historicalBar(),bars2=nv.models.historicalBar(),xAxis=nv.models.axis(),x2Axis=nv.models.axis(),y1Axis=nv.models.axis(),y2Axis=nv.models.axis(),y3Axis=nv.models.axis(),y4Axis=nv.models.axis(),legend=nv.models.legend(),brush=d3.svg.brush();var margin={top:30,right:30,bottom:30,left:60},margin2={top:0,right:30,bottom:20,left:60},width=null,height=null,getX=function(d){return d.x},getY=function(d){return d.y},color=nv.utils.defaultColor(),showLegend=true,focusEnable=true,focusShowAxisY=false,focusShowAxisX=true,focusHeight=50,extent,brushExtent=null,tooltips=true,tooltip=function(key,x,y,e,graph){return"
"+key+"<\/h3>"+"
"+y+" at "+x+"<\/p>"},x,x2,y1,y2,y3,y4,noData="No Data Available.",dispatch=d3.dispatch("tooltipShow","tooltipHide","brush","stateChange","changeState"),transitionDuration=0,state=nv.utils.state(),defaultState=null,legendLeftAxisHint=" (left axis)",legendRightAxisHint=" (right axis)";lines.clipEdge(true);lines2.interactive(false);xAxis.orient("bottom").tickPadding(5);y1Axis.orient("left");y2Axis.orient("right");x2Axis.orient("bottom").tickPadding(5);y3Axis.orient("left");y4Axis.orient("right");var showTooltip=function(e,offsetElement){if(extent){e.pointIndex+=Math.ceil(extent[0])}var left=e.pos[0]+(offsetElement.offsetLeft||0),top=e.pos[1]+(offsetElement.offsetTop||0),x=xAxis.tickFormat()(lines.x()(e.point,e.pointIndex)),y=(e.series.bar?y1Axis:y2Axis).tickFormat()(lines.y()(e.point,e.pointIndex)),content=tooltip(e.series.key,x,y,e,chart);nv.tooltip.show([left,top],content,e.value<0?"n":"s",null,offsetElement)};var stateGetter=function(data){return function(){return{active:data.map(function(d){return!d.disabled})}}};var stateSetter=function(data){return function(state){if(state.active!==undefined)data.forEach(function(series,i){series.disabled=!state.active[i]})}};function chart(selection){selection.each(function(data){var container=d3.select(this),that=this;nv.utils.initSVG(container);var availableWidth=(width||parseInt(container.style("width"))||960)-margin.left-margin.right,availableHeight1=(height||parseInt(container.style("height"))||400)-margin.top-margin.bottom-(focusEnable?focusHeight:0),availableHeight2=focusHeight-margin2.top-margin2.bottom;chart.update=function(){container.transition().duration(transitionDuration).call(chart)};chart.container=this;state.setter(stateSetter(data),chart.update).getter(stateGetter(data)).update();state.disabled=data.map(function(d){return!!d.disabled});if(!defaultState){var key;defaultState={};for(key in state){if(state[key]instanceof Array)defaultState[key]=state[key].slice(0);else defaultState[key]=state[key]}}if(!data||!data.length||!data.filter(function(d){return d.values.length}).length){var noDataText=container.selectAll(".nv-noData").data([noData]);noDataText.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");noDataText.attr("x",margin.left+availableWidth\/2).attr("y",margin.top+availableHeight1\/2).text(function(d){return d});return chart}else{container.selectAll(".nv-noData").remove()}var dataBars=data.filter(function(d){return!d.disabled&&d.bar});var dataLines=data.filter(function(d){return!d.bar});x=bars.xScale();x2=x2Axis.scale();y1=bars.yScale();y2=lines.yScale();y3=bars2.yScale();y4=lines2.yScale();var series1=data.filter(function(d){return!d.disabled&&d.bar}).map(function(d){return d.values.map(function(d,i){return{x:getX(d,i),y:getY(d,i)}})});var series2=data.filter(function(d){return!d.disabled&&!d.bar}).map(function(d){return d.values.map(function(d,i){return{x:getX(d,i),y:getY(d,i)}})});x.range([0,availableWidth]);x2.domain(d3.extent(d3.merge(series1.concat(series2)),function(d){return d.x})).range([0,availableWidth]);var wrap=container.selectAll("g.nv-wrap.nv-linePlusBar").data([data]);var gEnter=wrap.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g");var g=wrap.select("g");gEnter.append("g").attr("class","nv-legendWrap");var focusEnter=gEnter.append("g").attr("class","nv-focus");focusEnter.append("g").attr("class","nv-x nv-axis");focusEnter.append("g").attr("class","nv-y1 nv-axis");focusEnter.append("g").attr("class","nv-y2 nv-axis");focusEnter.append("g").attr("class","nv-barsWrap");focusEnter.append("g").attr("class","nv-linesWrap");var contextEnter=gEnter.append("g").attr("class","nv-context");contextEnter.append("g").attr("class","nv-x nv-axis");contextEnter.append("g").attr("class","nv-y1 nv-axis");contextEnter.append("g").attr("class","nv-y2 nv-axis");contextEnter.append("g").attr("class","nv-barsWrap");contextEnter.append("g").attr("class","nv-linesWrap");contextEnter.append("g").attr("class","nv-brushBackground");contextEnter.append("g").attr("class","nv-x nv-brush");if(showLegend){legend.width(availableWidth\/2);g.select(".nv-legendWrap").datum(data.map(function(series){series.originalKey=series.originalKey===undefined?series.key:series.originalKey;series.key=series.originalKey+(series.bar?legendLeftAxisHint:legendRightAxisHint);return series})).call(legend);if(margin.top!=legend.height()){margin.top=legend.height();availableHeight1=(height||parseInt(container.style("height"))||400)-margin.top-margin.bottom-focusHeight}g.select(".nv-legendWrap").attr("transform","translate("+availableWidth\/2+","+-margin.top+")")}wrap.attr("transform","translate("+margin.left+","+margin.top+")");g.select(".nv-context").style("display",focusEnable?"initial":"none");bars2.width(availableWidth).height(availableHeight2).color(data.map(function(d,i){return d.color||color(d,i)}).filter(function(d,i){return!data[i].disabled&&data[i].bar}));lines2.width(availableWidth).height(availableHeight2).color(data.map(function(d,i){return d.color||color(d,i)}).filter(function(d,i){return!data[i].disabled&&!data[i].bar}));var bars2Wrap=g.select(".nv-context .nv-barsWrap").datum(dataBars.length?dataBars:[{values:[]}]);var lines2Wrap=g.select(".nv-context .nv-linesWrap").datum(!dataLines[0].disabled?dataLines:[{values:[]}]);g.select(".nv-context").attr("transform","translate(0,"+(availableHeight1+margin.bottom+margin2.top)+")");bars2Wrap.transition().call(bars2);lines2Wrap.transition().call(lines2);if(focusShowAxisX){x2Axis.ticks(nv.utils.calcTicksX(availableWidth\/100,data)).tickSize(-availableHeight2,0);g.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y3.range()[0]+")");g.select(".nv-context .nv-x.nv-axis").transition().call(x2Axis)}if(focusShowAxisY){y3Axis.scale(y3).ticks(availableHeight2\/36).tickSize(-availableWidth,0);y4Axis.scale(y4).ticks(availableHeight2\/36).tickSize(dataBars.length?0:-availableWidth,0);g.select(".nv-context .nv-y3.nv-axis").style("opacity",dataBars.length?1:0).attr("transform","translate(0,"+x2.range()[0]+")");g.select(".nv-context .nv-y2.nv-axis").style("opacity",dataLines.length?1:0).attr("transform","translate("+x2.range()[1]+",0)");g.select(".nv-context .nv-y1.nv-axis").transition().call(y3Axis);g.select(".nv-context .nv-y2.nv-axis").transition().call(y4Axis)}brush.x(x2).on("brush",onBrush);if(brushExtent)brush.extent(brushExtent);var brushBG=g.select(".nv-brushBackground").selectAll("g").data([brushExtent||brush.extent()]);var brushBGenter=brushBG.enter().append("g");brushBGenter.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",availableHeight2);brushBGenter.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",availableHeight2);var gBrush=g.select(".nv-x.nv-brush").call(brush);gBrush.selectAll("rect").attr("height",availableHeight2);gBrush.selectAll(".resize").append("path").attr("d",resizePath);legend.dispatch.on("stateChange",function(newState){for(var key in newState)state[key]=newState[key];dispatch.stateChange(state);chart.update()});dispatch.on("tooltipShow",function(e){if(tooltips)showTooltip(e,that.parentNode)});dispatch.on("changeState",function(e){if(typeof e.disabled!=="undefined"){data.forEach(function(series,i){series.disabled=e.disabled[i]});state.disabled=e.disabled}chart.update()});function resizePath(d){var e=+(d=="e"),x=e?1:-1,y=availableHeight2\/3;return"M"+.5*x+","+y+"A6,6 0 0 "+e+" "+6.5*x+","+(y+6)+"V"+(2*y-6)+"A6,6 0 0 "+e+" "+.5*x+","+2*y+"Z"+"M"+2.5*x+","+(y+8)+"V"+(2*y-8)+"M"+4.5*x+","+(y+8)+"V"+(2*y-8)}function updateBrushBG(){if(!brush.empty())brush.extent(brushExtent);brushBG.data([brush.empty()?x2.domain():brushExtent]).each(function(d,i){var leftWidth=x2(d[0])-x2.range()[0],rightWidth=x2.range()[1]-x2(d[1]);d3.select(this).select(".left").attr("width",leftWidth<0?0:leftWidth);d3.select(this).select(".right").attr("x",x2(d[1])).attr("width",rightWidth<0?0:rightWidth)})}function onBrush(){brushExtent=brush.empty()?null:brush.extent();extent=brush.empty()?x2.domain():brush.extent();dispatch.brush({extent:extent,brush:brush});updateBrushBG();bars.width(availableWidth).height(availableHeight1).color(data.map(function(d,i){return d.color||color(d,i)}).filter(function(d,i){return!data[i].disabled&&data[i].bar}));lines.width(availableWidth).height(availableHeight1).color(data.map(function(d,i){return d.color||color(d,i)}).filter(function(d,i){return!data[i].disabled&&!data[i].bar}));var focusBarsWrap=g.select(".nv-focus .nv-barsWrap").datum(!dataBars.length?[{values:[]}]:dataBars.map(function(d,i){return{key:d.key,values:d.values.filter(function(d,i){return bars.x()(d,i)>=extent[0]&&bars.x()(d,i)<=extent[1]})}}));var focusLinesWrap=g.select(".nv-focus .nv-linesWrap").datum(dataLines[0].disabled?[{values:[]}]:dataLines.map(function(d,i){return{key:d.key,values:d.values.filter(function(d,i){return lines.x()(d,i)>=extent[0]&&lines.x()(d,i)<=extent[1]})}}));if(dataBars.length){x=bars.xScale()}else{x=lines.xScale()}xAxis.scale(x).ticks(nv.utils.calcTicksX(availableWidth\/100,data)).tickSize(-availableHeight1,0);xAxis.domain([Math.ceil(extent[0]),Math.floor(extent[1])]);g.select(".nv-x.nv-axis").transition().duration(transitionDuration).call(xAxis);focusBarsWrap.transition().duration(transitionDuration).call(bars);focusLinesWrap.transition().duration(transitionDuration).call(lines);g.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+y1.range()[0]+")");y1Axis.scale(y1).ticks(nv.utils.calcTicksY(availableHeight1\/36,data)).tickSize(-availableWidth,0);y2Axis.scale(y2).ticks(nv.utils.calcTicksY(availableHeight1\/36,data)).tickSize(dataBars.length?0:-availableWidth,0);g.select(".nv-focus .nv-y1.nv-axis").style("opacity",dataBars.length?1:0);g.select(".nv-focus .nv-y2.nv-axis").style("opacity",dataLines.length&&!dataLines[0].disabled?1:0).attr("transform","translate("+x.range()[1]+",0)");g.select(".nv-focus .nv-y1.nv-axis").transition().duration(transitionDuration).call(y1Axis);g.select(".nv-focus .nv-y2.nv-axis").transition().duration(transitionDuration).call(y2Axis)}onBrush()});return chart}lines.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+margin.left,e.pos[1]+margin.top];dispatch.tooltipShow(e)});lines.dispatch.on("elementMouseout.tooltip",function(e){dispatch.tooltipHide(e)});bars.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+margin.left,e.pos[1]+margin.top];dispatch.tooltipShow(e)});bars.dispatch.on("elementMouseout.tooltip",function(e){dispatch.tooltipHide(e)});dispatch.on("tooltipHide",function(){if(tooltips)nv.tooltip.cleanup()});chart.dispatch=dispatch;chart.legend=legend;chart.lines=lines;chart.lines2=lines2;chart.bars=bars;chart.bars2=bars2;chart.xAxis=xAxis;chart.x2Axis=x2Axis;chart.y1Axis=y1Axis;chart.y2Axis=y2Axis;chart.y3Axis=y3Axis;chart.y4Axis=y4Axis;chart.options=nv.utils.optionsFunc.bind(chart);chart._options=Object.create({},{width:{get:function(){return width},set:function(_){width=_}},height:{get:function(){return height},set:function(_){height=_}},showLegend:{get:function(){return showLegend},set:function(_){showLegend=_}},tooltips:{get:function(){return tooltips},set:function(_){tooltips=_}},tooltipContent:{get:function(){return tooltip},set:function(_){tooltip=_}},brushExtent:{get:function(){return brushExtent},set:function(_){brushExtent=_}},noData:{get:function(){return noData},set:function(_){noData=_}},focusEnable:{get:function(){return focusEnable},set:function(_){focusEnable=_}},focusHeight:{get:function(){return focusHeight},set:function(_){focusHeight=_}},focusShowAxisX:{get:function(){return focusShowAxisX},set:function(_){focusShowAxisX=_}},focusShowAxisY:{get:function(){return focusShowAxisY},set:function(_){focusShowAxisY=_}},legendLeftAxisHint:{get:function(){return legendLeftAxisHint},set:function(_){legendLeftAxisHint=_}},legendRightAxisHint:{get:function(){return legendRightAxisHint},set:function(_){legendRightAxisHint=_}},margin:{get:function(){return margin},set:function(_){margin.top=_.top!==undefined?_.top:margin.top;margin.right=_.right!==undefined?_.right:margin.right;margin.bottom=_.bottom!==undefined?_.bottom:margin.bottom;margin.left=_.left!==undefined?_.left:margin.left}},duration:{get:function(){return transitionDuration},set:function(_){transitionDuration=_}},color:{get:function(){return color},set:function(_){color=nv.utils.getColor(_);legend.color(color)}},x:{get:function(){return getX},set:function(_){getX=_;lines.x(_);lines2.x(_);bars.x(_);bars2.x(_)}},y:{get:function(){return getY},set:function(_){getY=_;lines.y(_);lines2.y(_);bars.y(_);bars2.y(_)}}});nv.utils.inheritOptions(chart,lines);nv.utils.initOptions(chart);return chart};nv.models.lineWithFocusChart=function(){"use strict";var lines=nv.models.line(),lines2=nv.models.line(),xAxis=nv.models.axis(),yAxis=nv.models.axis(),x2Axis=nv.models.axis(),y2Axis=nv.models.axis(),legend=nv.models.legend(),brush=d3.svg.brush();var margin={top:30,right:30,bottom:30,left:60},margin2={top:0,right:30,bottom:20,left:60},color=nv.utils.defaultColor(),width=null,height=null,height2=100,x,y,x2,y2,showLegend=true,brushExtent=null,tooltips=true,tooltip=function(key,x,y,e,graph){return"
"+key+"<\/h3>"+"
"+y+" at "+x+"<\/p>"},noData="No Data Available.",dispatch=d3.dispatch("tooltipShow","tooltipHide","brush","stateChange","changeState"),transitionDuration=250,state=nv.utils.state(),defaultState=null;lines.clipEdge(true);lines2.interactive(false);xAxis.orient("bottom").tickPadding(5);yAxis.orient("left");x2Axis.orient("bottom").tickPadding(5);y2Axis.orient("left");var showTooltip=function(e,offsetElement){var left=e.pos[0]+(offsetElement.offsetLeft||0),top=e.pos[1]+(offsetElement.offsetTop||0),x=xAxis.tickFormat()(lines.x()(e.point,e.pointIndex)),y=yAxis.tickFormat()(lines.y()(e.point,e.pointIndex)),content=tooltip(e.series.key,x,y,e,chart);nv.tooltip.show([left,top],content,null,null,offsetElement)};var stateGetter=function(data){return function(){return{active:data.map(function(d){return!d.disabled})}}};var stateSetter=function(data){return function(state){if(state.active!==undefined)data.forEach(function(series,i){series.disabled=!state.active[i]})}};function chart(selection){selection.each(function(data){var container=d3.select(this),that=this;nv.utils.initSVG(container);var availableWidth=(width||parseInt(container.style("width"))||960)-margin.left-margin.right,availableHeight1=(height||parseInt(container.style("height"))||400)-margin.top-margin.bottom-height2,availableHeight2=height2-margin2.top-margin2.bottom;chart.update=function(){container.transition().duration(transitionDuration).call(chart)};chart.container=this;state.setter(stateSetter(data),chart.update).getter(stateGetter(data)).update();state.disabled=data.map(function(d){return!!d.disabled});if(!defaultState){var key;defaultState={};for(key in state){if(state[key]instanceof Array)defaultState[key]=state[key].slice(0);else defaultState[key]=state[key]}}if(!data||!data.length||!data.filter(function(d){return d.values.length}).length){var noDataText=container.selectAll(".nv-noData").data([noData]);noDataText.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");noDataText.attr("x",margin.left+availableWidth\/2).attr("y",margin.top+availableHeight1\/2).text(function(d){return d});return chart}else{container.selectAll(".nv-noData").remove()}x=lines.xScale();y=lines.yScale();x2=lines2.xScale();y2=lines2.yScale();var wrap=container.selectAll("g.nv-wrap.nv-lineWithFocusChart").data([data]);var gEnter=wrap.enter().append("g").attr("class","nvd3 nv-wrap nv-lineWithFocusChart").append("g");var g=wrap.select("g");gEnter.append("g").attr("class","nv-legendWrap");var focusEnter=gEnter.append("g").attr("class","nv-focus");focusEnter.append("g").attr("class","nv-x nv-axis");focusEnter.append("g").attr("class","nv-y nv-axis");focusEnter.append("g").attr("class","nv-linesWrap");var contextEnter=gEnter.append("g").attr("class","nv-context");contextEnter.append("g").attr("class","nv-x nv-axis");contextEnter.append("g").attr("class","nv-y nv-axis");contextEnter.append("g").attr("class","nv-linesWrap");contextEnter.append("g").attr("class","nv-brushBackground");contextEnter.append("g").attr("class","nv-x nv-brush");if(showLegend){legend.width(availableWidth);g.select(".nv-legendWrap").datum(data).call(legend);if(margin.top!=legend.height()){margin.top=legend.height();availableHeight1=(height||parseInt(container.style("height"))||400)-margin.top-margin.bottom-height2}g.select(".nv-legendWrap").attr("transform","translate(0,"+-margin.top+")")}wrap.attr("transform","translate("+margin.left+","+margin.top+")");lines.width(availableWidth).height(availableHeight1).color(data.map(function(d,i){return d.color||color(d,i)}).filter(function(d,i){return!data[i].disabled}));lines2.defined(lines.defined()).width(availableWidth).height(availableHeight2).color(data.map(function(d,i){return d.color||color(d,i)}).filter(function(d,i){return!data[i].disabled}));g.select(".nv-context").attr("transform","translate(0,"+(availableHeight1+margin.bottom+margin2.top)+")");var contextLinesWrap=g.select(".nv-context .nv-linesWrap").datum(data.filter(function(d){return!d.disabled}));d3.transition(contextLinesWrap).call(lines2);xAxis.scale(x).ticks(nv.utils.calcTicksX(availableWidth\/100,data)).tickSize(-availableHeight1,0);yAxis.scale(y).ticks(nv.utils.calcTicksY(availableHeight1\/36,data)).tickSize(-availableWidth,0);g.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+availableHeight1+")");brush.x(x2).on("brush",function(){var oldTransition=chart.duration();chart.duration(0);onBrush();chart.duration(oldTransition)});if(brushExtent)brush.extent(brushExtent);var brushBG=g.select(".nv-brushBackground").selectAll("g").data([brushExtent||brush.extent()]);var brushBGenter=brushBG.enter().append("g");brushBGenter.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",availableHeight2);brushBGenter.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",availableHeight2);var gBrush=g.select(".nv-x.nv-brush").call(brush);gBrush.selectAll("rect").attr("height",availableHeight2);gBrush.selectAll(".resize").append("path").attr("d",resizePath);onBrush();x2Axis.scale(x2).ticks(nv.utils.calcTicksX(availableWidth\/100,data)).tickSize(-availableHeight2,0);g.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y2.range()[0]+")");d3.transition(g.select(".nv-context .nv-x.nv-axis")).call(x2Axis);y2Axis.scale(y2).ticks(nv.utils.calcTicksY(availableHeight2\/36,data)).tickSize(-availableWidth,0);d3.transition(g.select(".nv-context .nv-y.nv-axis")).call(y2Axis);g.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y2.range()[0]+")");legend.dispatch.on("stateChange",function(newState){for(var key in newState)state[key]=newState[key];dispatch.stateChange(state);chart.update()});dispatch.on("tooltipShow",function(e){if(tooltips)showTooltip(e,that.parentNode)});dispatch.on("changeState",function(e){if(typeof e.disabled!=="undefined"){data.forEach(function(series,i){series.disabled=e.disabled[i]})}chart.update()});function resizePath(d){var e=+(d=="e"),x=e?1:-1,y=availableHeight2\/3;return"M"+.5*x+","+y+"A6,6 0 0 "+e+" "+6.5*x+","+(y+6)+"V"+(2*y-6)+"A6,6 0 0 "+e+" "+.5*x+","+2*y+"Z"+"M"+2.5*x+","+(y+8)+"V"+(2*y-8)+"M"+4.5*x+","+(y+8)+"V"+(2*y-8)}function updateBrushBG(){if(!brush.empty())brush.extent(brushExtent);brushBG.data([brush.empty()?x2.domain():brushExtent]).each(function(d,i){var leftWidth=x2(d[0])-x.range()[0],rightWidth=x.range()[1]-x2(d[1]);d3.select(this).select(".left").attr("width",leftWidth<0?0:leftWidth);d3.select(this).select(".right").attr("x",x2(d[1])).attr("width",rightWidth<0?0:rightWidth)})}function onBrush(){brushExtent=brush.empty()?null:brush.extent();var extent=brush.empty()?x2.domain():brush.extent();if(Math.abs(extent[0]-extent[1])<=1){return}dispatch.brush({extent:extent,brush:brush});updateBrushBG();var focusLinesWrap=g.select(".nv-focus .nv-linesWrap").datum(data.filter(function(d){return!d.disabled}).map(function(d,i){return{key:d.key,area:d.area,values:d.values.filter(function(d,i){return lines.x()(d,i)>=extent[0]&&lines.x()(d,i)<=extent[1]})}}));focusLinesWrap.transition().duration(transitionDuration).call(lines);g.select(".nv-focus .nv-x.nv-axis").transition().duration(transitionDuration).call(xAxis);g.select(".nv-focus .nv-y.nv-axis").transition().duration(transitionDuration).call(yAxis)}});return chart}lines.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+margin.left,e.pos[1]+margin.top];dispatch.tooltipShow(e)});lines.dispatch.on("elementMouseout.tooltip",function(e){dispatch.tooltipHide(e)});dispatch.on("tooltipHide",function(){if(tooltips)nv.tooltip.cleanup()});chart.dispatch=dispatch;chart.legend=legend;chart.lines=lines;chart.lines2=lines2;chart.xAxis=xAxis;chart.yAxis=yAxis;chart.x2Axis=x2Axis;chart.y2Axis=y2Axis;chart.options=nv.utils.optionsFunc.bind(chart);$/;" m
nv.addGraph phpunit/coverage/js/nv.d3.min.js /^(function(){var nv=window.nv||{};window.nv=nv;nv.dev=false;nv.tooltip=nv.tooltip||{};nv.utils=nv.utils||{};nv.models=nv.models||{};nv.charts={};nv.graphs=[];nv.logs={};nv.dispatch=d3.dispatch("render_start","render_end");if(!Function.prototype.bind){Function.prototype.bind=function(oThis){if(typeof this!=="function"){throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable")}var aArgs=Array.prototype.slice.call(arguments,1),fToBind=this,fNOP=function(){},fBound=function(){return fToBind.apply(this instanceof fNOP&&oThis?this:oThis,aArgs.concat(Array.prototype.slice.call(arguments)))};fNOP.prototype=this.prototype;fBound.prototype=new fNOP;return fBound}}if(nv.dev){nv.dispatch.on("render_start",function(e){nv.logs.startTime=+new Date});nv.dispatch.on("render_end",function(e){nv.logs.endTime=+new Date;nv.logs.totalTime=nv.logs.endTime-nv.logs.startTime;nv.log("total",nv.logs.totalTime)})}nv.log=function(){if(nv.dev&&window.console&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(nv.dev&&window.console&&typeof console.log=="function"&&Function.prototype.bind){var log=Function.prototype.bind.call(console.log,console);log.apply(console,arguments)}return arguments[arguments.length-1]};nv.deprecated=function(name){if(nv.dev&&console&&console.warn){console.warn("`"+name+"` has been deprecated.")}};nv.render=function render(step){step=step||1;nv.render.active=true;nv.dispatch.render_start();setTimeout(function(){var chart,graph;for(var i=0;iavailableWidth||mouseY>availableHeight||d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined||mouseOutAnyReason){if(isMSIE){if(d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined&&d3.event.relatedTarget.className.match(tooltip.nvPointerEventsClass)){return}}dispatch.elementMouseout({mouseX:mouseX,mouseY:mouseY});layer.renderGuideLine(null);return}var pointXValue=xScale.invert(mouseX);dispatch.elementMousemove({mouseX:mouseX,mouseY:mouseY,pointXValue:pointXValue});if(d3.event.type==="dblclick"){dispatch.elementDblclick({mouseX:mouseX,mouseY:mouseY,pointXValue:pointXValue})}if(d3.event.type==="click"){dispatch.elementClick({mouseX:mouseX,mouseY:mouseY,pointXValue:pointXValue})}}svgContainer.on("mousemove",mouseHandler,true).on("mouseout",mouseHandler,true).on("dblclick",mouseHandler).on("click",mouseHandler);layer.renderGuideLine=function(x){if(!showGuideLine)return;var line=wrap.select(".nv-interactiveGuideLine").selectAll("line").data(x!=null?[nv.utils.NaNtoZero(x)]:[],String);line.enter().append("line").attr("class","nv-guideline").attr("x1",function(d){return d}).attr("x2",function(d){return d}).attr("y1",availableHeight).attr("y2",0);line.exit().remove()}})}layer.dispatch=dispatch;layer.tooltip=tooltip;layer.margin=function(_){if(!arguments.length)return margin;margin.top=typeof _.top!="undefined"?_.top:margin.top;margin.left=typeof _.left!="undefined"?_.left:margin.left;return layer};layer.width=function(_){if(!arguments.length)return width;width=_;return layer};layer.height=function(_){if(!arguments.length)return height;height=_;return layer};layer.xScale=function(_){if(!arguments.length)return xScale;xScale=_;return layer};layer.showGuideLine=function(_){if(!arguments.length)return showGuideLine;showGuideLine=_;return layer};layer.svgContainer=function(_){if(!arguments.length)return svgContainer;svgContainer=_;return layer};return layer};nv.interactiveBisect=function(values,searchVal,xAccessor){"use strict";if(!(values instanceof Array)){return null}if(typeof xAccessor!=="function"){xAccessor=function(d,i){return d.x}}var bisect=d3.bisector(xAccessor).left;var index=d3.max([0,bisect(values,searchVal)-1]);var currentValue=xAccessor(values[index],index);if(typeof currentValue==="undefined"){currentValue=index}if(currentValue===searchVal){return index}var nextIndex=d3.min([index+1,values.length-1]);var nextValue=xAccessor(values[nextIndex],nextIndex);if(typeof nextValue==="undefined"){nextValue=nextIndex}if(Math.abs(nextValue-searchVal)>=Math.abs(currentValue-searchVal)){return index}else{return nextIndex}};nv.nearestValueIndex=function(values,searchVal,threshold){"use strict";var yDistMax=Infinity,indexToHighlight=null;values.forEach(function(d,i){var delta=Math.abs(searchVal-d);if(delta<=yDistMax&&delta