Reputation: 192
I created a row chart by Dc.js. I've got dynamic data, So i've got multiple kind of data every time. Now, my problem is that my row chart's height is statica and Svg is Compressed and unclear:
rowChart = dc.rowChart('#rowChart');
rowChart
.width(300)
.height(300)
.margins({ top: 20, left: 10, right: 10, bottom: 20 })
.group(barChartDimensionGroup)
.dimension(barChartDimension)
...
And i've got a error:
Error: Invalid negative value for attribute height="-4.894322420223788"
Upvotes: 2
Views: 1301
Reputation: 192
I found the solution through @gordon:
rowChart = dc.rowChart('#rowChart');
var heightRowChart=0;
heightRowChart = rowChartDimensionGroup.all().length;
tmpRowChart /* dc.rowChart('#day-of-week-chart', 'chartGroup') */
.width(300)
.height(heightRowChart*30)
...
Upvotes: 2