Reputation: 821
I have used below code to show scroll bar in google visualization when the char is large,
stringBuilder.Append(" var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));");
stringBuilder.Append(" chart.draw(view, {width: 660, height: 500, title: 'Title',");
stringBuilder.Append("legend: {position: 'none'},");
stringBuilder.Append("hAxis: {title: 'Resource', titleTextStyle: {color: 'green'},slantedText:false},width:'data.getNumberOfRows() * 130',colors: ['DeepSkyBlue','green'],");
stringBuilder.Append("vAxis:{title: 'Effort (Hr)',titleTextStyle: {color: 'green'}}");
when using width:'data.getNumberOfRows() * 130' it is not working, when set width a number it works, how do I set this?
Upvotes: 0
Views: 40
Reputation: 61212
you're passing a "string", instead of a "calculation"
remove the apostrophe's...
width: data.getNumberOfRows() * 130
Upvotes: 2