public ActionResult Index()
        {
            RazorChartViewer     viewer       = ViewBag.Viewer = new RazorChartViewer(HttpContext, "chart1");
            RazorViewPortControl viewPortCtrl = ViewBag.ViewPortControl = new RazorViewPortControl(HttpContext, "chart2");

            //
            // This script handles both the full page request, as well as the subsequent partial updates
            // (AJAX chart updates). We need to determine the type of request first before we processing
            // it.
            //
            if (RazorChartViewer.IsPartialUpdateRequest(Request))
            {
                // Is a partial update request.
                drawChart(viewer);
                return(Content(viewer.PartialUpdateChart()));
            }

            //
            // If the code reaches here, it is a full page request.
            //

            // Initialize the WebChartViewer and draw the chart.
            initViewer(viewer);
            drawChart(viewer);

            // Draw a thumbnail chart representing the full range in the WebViewPortControl
            drawFullChart(viewPortCtrl, viewer);
            return(View());
        }
        public ActionResult Index()
        {
            RazorChartViewer viewer = ViewBag.Viewer = new RazorChartViewer(HttpContext, "chart1");

            //
            // This script handles both the full page request, as well as the subsequent partial updates
            // (AJAX chart updates). We need to determine the type of request first before we processing
            // it.
            //
            if (RazorChartViewer.IsPartialUpdateRequest(Request))
            {
                // Is a partial update request.
                drawChart(viewer);
                return(Content(viewer.PartialUpdateChart()));
            }

            //
            // If the code reaches here, it is a full page request.
            //

            // In this exapmle, we just need to initialize the WebChartViewer and draw the chart.
            initViewer(viewer);
            drawChart(viewer);

            return(View());
        }