Click here to Skip to main content
11,721,385 members (82,418 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: jQuery JSON MVC3
Hi all i am working on Piecharts using jquery json in mvc3
Here i had created my models and controllers & view when i am exicuting it is taking the values in controllers but in case of vies not displayinng the pie chart could u plz chek it and plz help me to do this work
thank in advance
here my models :
=====================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
 
namespace JqueryCharts.Models
{
    public class PiechartModel:DbContext
    {
       public static List<PiechartModel> Employeelist { get; set; }
 
        public Int16 EmployeeId { get; set; }
        public string EmployeeName { get; set; }
        public string EmployeeEmailId { get; set; }
        public string GroupName { get; set; }
        public string EmployeePassword { get; set; }
        public List<PiechartModel> List { get; set; } 
 
    }
}
 
and hers are  my controllers :
======================================
<pre>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using JqueryCharts.Models;
using System.Data.SqlClient;
 
namespace JqueryCharts.Controllers
{
    public class PiechartsController : Controller
    {
        //
        // GET: /Piecharts/
      public BugtrackerNewEntities1 db = new BugtrackerNewEntities1();
 
        public ActionResult Index()
        {
            return View();
        }
 

        public JsonResult GetData()
        {
            
            var ViewEmployelist = db.EmployeeDetails.ToList<EmployeeDetail>().Select(e =>
           new
           {
               
               EmployeId = e.EmployeId,
               EmployeeName = e.EmployeeName
           }).ToList();
            return Json(ViewEmployelist, JsonRequestBehavior.AllowGet);
        }
    }
}
 

 

 
and here my View page
=============================
<pre><%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<JqueryCharts.Models.PiechartModel>" %>
<script src="../../Scripts/highcharts.src.js" type="text/javascript"></script>



could u plz help to do this work it is not displaying data in ives page
Thank in Advance
Posted 26-Aug-12 20:22pm

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 380
1 OriginalGriff 254
2 Mika Wendelius 170
3 cyycoish 70
4 ppolymorphe 66
0 Sergey Alexandrovich Kryukov 2,249
1 OriginalGriff 1,024
2 F-ES Sitecore 690
3 Maciej Los 619
4 Richard MacCutchan 580


Advertise | Privacy | Mobile
Web03 | 2.8.150901.1 | Last Updated 27 Aug 2012
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