Chart Data

Performance !!!

Bar and Column Charts

Line and Area Charts

Pie Charts

Scatter and Bubble Charts

Radar and Polar Charts

Financial Charts

Combinational Charts

Dynamic Charts

Working with Chart Axes

Chart Features

Customizing Chart

Client-Side Events


The different charts can be easily combined. This sample demonstrates how to combine Line and Scatter chart types.

For detailed implementation, please take a look at the Aspx, Razor and Controller code tabs.
 
<%@ Page  Language="C#"  Inherits="System.Web.Mvc.ViewPage<IEnumerable<SamplesBrowser.Models.ScatterChartData>>" %>

<%@ Import Namespace="JQChart.Web.Mvc" %>

<!DOCTYPE html>
<html>
<head runat="server">
    <title></title>    
    <link rel="stylesheet" type="text/css" href="~/Content/jquery.jqChart.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/jquery.jqRangeSlider.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/themes/le-frog/jquery-ui-1.8.20.css" />
    <script src="<%: Url.Content("~/Scripts/jquery-1.5.2.min.js") %>" type="text/javascript"></script>    
    <script src="<%: Url.Content("~/Scripts/jquery.jqChart.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery.jqRangeSlider.min.js") %>" type="text/javascript"></script>
    <!--[if IE]><script lang="javascript" type="text/javascript" src="<%: Url.Content("~/Scripts/excanvas.js") %>"></script><![endif]-->   
</head>
<body>
    <div>
        <%= Html.JQChart()
                .Chart(Model)
                .ID("jqChart")
                .Width(500)
                .Height(300)
                .Title("Spline and Scatter")
                .Animation(TimeSpan.FromSeconds(1))
                .Series(series =>
                    {
                        series.Spline().Title("Spline")
                                       .XValues(el => el.ValueX)
                                       .YValues(el => el.ValueY1);

                        series.Scatter().Title("Scatter")
                                        .XValues(el => el.ValueX)
                                        .YValues(el => el.ValueY2)
                                        .Markers(marker => marker.MarkerType(MarkerType.Diamond).Size(10));
                    }
                )
                .Render()%>
    </div>
</body>
</html>

                                        
 
@model IEnumerable<SamplesBrowser.Models.ScatterChartData>
@using JQChart.Web.Mvc

<!DOCTYPE html>
<html>
<head runat="server">
    <title></title>    
    <link rel="stylesheet" type="text/css" href="~/Content/jquery.jqChart.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/jquery.jqRangeSlider.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/themes/le-frog/jquery-ui-1.8.20.css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.2.min.js")" type="text/javascript"></script>    
    <script src="@Url.Content("~/Scripts/jquery.jqChart.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.jqRangeSlider.min.js")" type="text/javascript"></script>
    <!--[if IE]><script lang="javascript" type="text/javascript" src="@Url.Content("~/Scripts/excanvas.js")"></script><![endif]-->   
</head>
<body>
    <div>
          @(Html.JQChart()
                .Chart(Model)
                .ID("jqChart")
                .Width(500)
                .Height(300)
                .Title("Spline and Scatter")
                .Animation(TimeSpan.FromSeconds(1))
                .Series(series =>
                    {
                        series.Spline().Title("Spline")
                                       .XValues(el => el.ValueX)
                                       .YValues(el => el.ValueY1);

                        series.Scatter().Title("Scatter")
                                        .XValues(el => el.ValueX)
                                        .YValues(el => el.ValueY2)
                                        .Markers(marker => marker.MarkerType(MarkerType.Diamond).Size(10));
                    }
                )
                .Render() 
          )
    </div>
</body>
</html>

                                        
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SamplesBrowser.Models;

namespace SamplesBrowser.Controllers
{
    public class ChartController : Controller
    {

        public ActionResult SplineScatter()
        {
            return View(ScatterChartData.GetSplineScatterSampleData());
        }

    }
}