0
Answer

barchart percentage for single value

how to set percentage in bar chart. My code like this
google.load("visualization", "1", { packages: ["corechart"] });
google.setOnLoadCallback(drawChart);
function drawChart()
{
var data = new google.visualization.DataTable();

data.addColumn('string', 'default');
data.addColumn('number', 'Count');
data.addColumn({type: 'string', role: 'style'});


var localService = @Html.Raw(Json.Encode(@ViewBag.localList));
for(var i = 0; i < localService.length; i ++ )
{
data.addRow(["ResponseTime",localService[i].ResponseTime, 'color: purple']);
data.addRow(["TravelTime",localService[i].TravelTime, 'color: purple']);
data.addRow(["ServiceTime",localService[i].ServiceTime, 'color: purple']);
}

var options = {


hAxis: {title: 'Record Count'},
bar: {groupWidth: "95%"},
legend: { position: "none" },

isStacked: true


};
var chart = new google.visualization.BarChart(document.getElementById('barChart1_div'));

chart.draw(data, options);
}
in the abouve code values coming from dynamically . How i set each bar as percentage