Any ASP.NET MVC controls that support pie charts with different slice radii?

I need to create a kind of pie chart that has slices with different radii - similarly:

http://www.andypope.info/charts/pieradius.htm .

I also want to overlay the second line on it, like a line.

The solution should be ASP.NET MVC-friendly - and I need to be able to associate links with details.

If there is no ready-made solution, is it possible to configure the Microsoft Chart Controls pie chart in this case? Or is it too big a setting, and I would spend more time fighting with existing code than with my own?

+4
source share
5 answers

jqPlot is great. It took us less than an hour to get beautiful diagrams. This is a pure js implementation. They worked in all browsers and even on mobile phones.

http://www.jqplot.com/

+1
source

Have you tried watching http://plugins.jquery.com/project/gchart ? It should be MVC friendly, given its jquery. I'm not sure if he can do exactly what you want, but it may be worth the look.

0
source

You looked at the tall charts. You can create pie charts with a radius of spread ( demo ), and also impose a line ( demo ) above it. Although, I'm not sure that you can accurately repeat the type of diagram you mentioned, you can always send a request to the developer. He quickly gets new features.

0
source

Webmatrix has built-in chart support.

I don't know if it supports pie charts with different cuts. I am using WebGrid (also from Webmatrix) in my current asp.net mvc project, and it works pretty well.

Here are some useful links:

how-webmatrix-razor-asp-net-web-pages-and-mvc-fit-together

Pie chart data display

0
source

It can help you ** Controller ***

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using MvcApp.Models; using System.Web.Helpers; namespace MvcApp.Controllers { public class HomeController : Controller { public ActionResult Index() { ViewBag.Message = "Welcome to ASP.NET MVC!"; return View(); } public ActionResult About() { return View(); } public ActionResult ChartDispaly() { ChartImage(); return View(); } public void ChartImage() { IEnumerable<Product> productList = new List<Product> { new Product {Name = "Kayak", Category = "Watersports", Price = 275m}, new Product {Name = "Lifejacket", Category = "Watersports", Price = 48.95m}, new Product {Name = "Soccer ball", Category = "Football", Price = 19.50m}, new Product {Name = "Corner flags", Category = "Football", Price = 34.95m}, new Product {Name = "Stadium", Category = "Football", Price = 150m}, new Product {Name = "Thinking cap", Category = "Chess", Price = 16m} }; Chart chart = new Chart(400, 200, @"<Chart BackColor=""Gray"" BackSecondaryColor=""WhiteSmoke"" BackGradientStyle=""DiagonalRight"" AntiAliasing=""All"" BorderlineDashStyle = ""Solid"" BorderlineColor = ""Gray""> <BorderSkin SkinStyle = ""Emboss"" /> <ChartAreas> <ChartArea Name=""Default"" _Template_=""All"" BackColor=""Wheat"" BackSecondaryColor=""White"" BorderColor=""64, 64, 64, 64"" BorderDashStyle=""Solid"" ShadowColor=""Transparent""> </ChartArea> </ChartAreas> </Chart>"); chart.AddSeries( chartType: "Pie", yValues: productList.Select(e => e.Price).ToArray(), xValue: productList.Select(e => e.Name).ToArray() ); chart.Write(); } } } 

* Model *****

 using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace MvcApp.Models { public class Product { public string Name { get; set; } public string Category { get; set; } public decimal Price { get; set; } } } 
0
source

All Articles