Click here to Skip to main content
13,097,012 members (69,572 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 11 Mar 2013
Copyright © CodeProject, 1999-2017
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