我正在使用DC.js创建百分比的堆积区域图表。然而,当我去渲染它时,我得到一些奇怪的文物,如下所示:
这看起来像某种裁剪工件,但我不确定它来自何处。这是我用于渲染此图表的代码:
dc.lineChart("#stacked-area-volume-chart")
.renderArea(true)
.width(colmd12Width)
.height(200)
.transitionDuration(0)
.margins({top: 10, right: 20, bottom: 30, left: 40})
.dimension(date)
.group(lastActionsByDay, "Invalid Phone Out Of Business")
.valueAccessor(function(d) { return d.value.InvalidPhoneOutOfBusiness.sum / d.value.count; })
.stack(lastActionsByDay, "POC-NI Competitor", function(d){
return d.value.POCNICompetitor.sum / d.value.count;
})
.stack(lastActionsByDay, "POC-NI No Need", function(d){
return d.value.POCNINoNeed.sum / d.value.count;
})
.stack(lastActionsByDay, "(blank)", function(d){
return d.value.blank.sum / d.value.count;
})
.stack(lastActionsByDay, "Not Decision Maker", function(d){
return d.value.NotDecisionMaker.sum / d.value.count;
})
.stack(lastActionsByDay, "POC-Follow Up", function(d){
return d.value.POCFollowUp.sum / d.value.count;
})
.stack(lastActionsByDay, "Not Interested Competitor", function(d){
return d.value.NotInterestedCompetitor.sum / d.value.count;
})
.stack(lastActionsByDay, "Requested Information", function(d){
return d.value.RequestedInformation.sum / d.value.count;
})
.stack(lastActionsByDay, "Not Interested No Need", function(d){
return d.value.NotInterestedNoNeed.sum / d.value.count;
})
.stack(lastActionsByDay, "Call No Answer", function(d){
return d.value.CallNoAnswer.sum / d.value.count;
})
.stack(lastActionsByDay, "Left Voice Message", function(d){
return d.value.LeftVoiceMessage.sum / d.value.count;
})
.elasticY(true)
.transitionDuration(200)
.x(d3.time.scale().domain(d3.extent(data, function(d) { return d.date; })))
.xUnits(d3.time.days);