every since i try to use view box with bootstrap dons work but when i using in different html it work.
dose bootstrap support viewbox ?? any idea ??
var con1svg = d3.select('#con1svg').append('svg')
// .attr('width',width + margin.left + margin.right)
// .attr('height',height + margin.top + margin.bottom)
.attr("viewBox", "0 0 535 600")
.attr("preserveAspectRatio", "xMinxMax")
.append('g')//grouping rect
.attr('transform','translate('+ margin.left +', '+margin.top +')')
.append('g')//grouping rect
// .attr('transform','translate('+ margin.left +', '+margin.top +')')
.selectAll('rect').data(bardata1)
//ENTER
.enter().append('rect')
.style('fill', function(d,i) {return colors(i);})
.attr('width', xScale.rangeBand())
//below...if xScale(i) then #14 will be empty...must be xScale(i + 1)
.attr('x', function(d,i) {return xScale(i + 1);})//xScale(i + 1)
.attr("height", 0)
.attr('y', height)// zero for trans purpose
best regards