I am loading google block chart on my MVC application using partial view. Chart loaded successfully for the first time using partial view. But i am trying to reduce the number of bar on google block chart by calling same partial view but in that chart is not reloaded.
i am just getting HTML from the partial view not chart related data.
there is my partial view code
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', { packages: ['corechart'] });
</script>
<script type="text/javascript">
function drawVisualization() {
// Create and populate the data table.
var data = google.visualization.arrayToDataTable(
[
['Months' @Html.Raw(ViewBag.Reseller) @Html.Raw(ViewBag.Client) @Html.Raw(ViewBag.Project) ],
['@(ViewBag.SixthDate)' @(ViewBag.MonthResellers6) @(ViewBag.MonthClient6) @(ViewBag.MonthProject6)],
['@ViewBag.FifthDate' @(ViewBag.MonthResellers5) @(ViewBag.MonthClient5) @(ViewBag.MonthProject5)],
['@ViewBag.FourthDate' @ViewBag.MonthResellers4 @ViewBag.MonthClient4 @ViewBag.MonthProject4],
['@ViewBag.ThirdDate' @ViewBag.MonthResellers3 @ViewBag.MonthClient3 @ViewBag.MonthProject3],
['@ViewBag.SecoundDate' @ViewBag.MonthResellers2 @ViewBag.MonthClient2 @ViewBag.MonthProject2],
['@ViewBag.FirstDate' @ViewBag.MonthResellers1 @ViewBag.MonthClient1 @ViewBag.MonthProject1]
]);
// Create and draw the visualization.
new google.visualization.ColumnChart(document.getElementById('visualization')).draw(data, { title: "Bar Chart",
width: 600, height: 400,
hAxis: { title: "Months" }
}
);
}
google.setOnLoadCallback(drawVisualization);
</script>
</head>
<div id="visualization" style="width: 600px; height: 400px;"></div>
Anyone can help me
Thank you