I have a composite bar/line chart, all of which is displaying correctly with the exception of the final bar. The data contains a dimension of 8 dates and two groups of values, one for teh bar and one for the line chart. I have examined the contents of the dimesnions and groups and all correct.
The 8th svg on the chart is present but the bar does not display, see attached image. SVG Inspector shows a rect is defined with height and width though a corresponding bar is not displayed on the chart.
I have played with .centerBar and .elasticX, .xAxisPadding and had no success. I have also tried changing chart dimensions and margins.
Code used to display the chart:
var firstWeek = d3.min(data, function (d) { return d.Week; });
var lastWeek = d3.max(data, function (d) { return d.Week; });
var compositeKPIChart = dc.compositeChart("#W-chart");
var KPIbChart = dc.barChart(compositeKPIChart);
var KPIlChart = dc.lineChart(compositeKPIChart);
compositeKPIChart.width(width)
.height(0.9*width/2)
.margins({ top: 10, right: 50, bottom: 30, left: 30 })
.dimension(weekDim)
.x(d3.time.scale().domain([firstWeek, lastWeek]))
.xUnits(d3.time.mondays)
.y(d3.scale.linear().domain([0, 100]))
.compose([
dc.barChart(compositeKPIChart).group(barGroup, "%"),
dc.lineChart(compositeKPIChart).group(lineGroup, "Standard")
])
.brushOn(false)
.xAxis().ticks(d3.time.mondays).tickFormat(d3.time.format("%d %b"));