1
我有一個dc.js複合圖表,它有一個序號條形圖和折線圖。條形圖值位於左側y軸上,折線圖值位於右側y軸上。在酒吧中心對齊點(DC.JS複合圖表)
是否可以將條形中心的直線數據點(直接位於刻度標記上方)對齊?
var oneWayComposite = dc.compositeChart('#chart');
var oneWayBar = dc.barChart(oneWayComposite)
.dimension(featureDim)
.barPadding(1)
.group(grp)
// .centerBar(true)
.valueAccessor(function(p) {return p.value.count; });
var oneWayLine = dc.lineChart(oneWayComposite)
.dimension(featureDim)
.group(grp)
.colors('#000000')
.renderArea(false)
// .interpolate('basis')
.useRightYAxis(true)
.valueAccessor(function(p) {return p.value.density; });
oneWayComposite.width(width)
.margins(mrgn)
.height(height)
.x(d3.scale.ordinal())
.xUnits(dc.units.ordinal)
.yAxisLabel("Count of Cases")
.rightYAxisLabel("Target Density")
.group(grp)
.compose([oneWayBar,oneWayLine]);