Click here to Skip to main content
11,806,818 members (56,766 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# .NET MVC3
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

   <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
   <script type="text/javascript" src=""></script>
   <script type="text/javascript">
       google.load('visualization', '1', { packages: ['corechart'] });
   <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" }
 <div id="visualization" style="width: 600px; height: 400px;"></div>

Anyone can help me
Thank you
Posted 11-Mar-13 0:31am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 ppolymorphe 245
1 OriginalGriff 150
2 George Jonsson 145
3 CPallini 100
4 Abhinav S 80
0 OriginalGriff 3,380
1 Maciej Los 1,990
2 CPallini 1,915
3 KrunalRohit 1,907
4 ppolymorphe 1,317

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 11 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100