- mvc_chart1.zip
- Mvc_Chart
- _svn
- dir-prop-base
- entries
- format
- prop-base
- props
- text-base
- Default.aspx.cs.svn-base
- Default.aspx.svn-base
- Global.asax.cs.svn-base
- Global.asax.svn-base
- Mvc_Chart.csproj.svn-base
- Web.config.svn-base
- tmp
- prop-base
- props
- text-base
- App_Data
- _svn
- entries
- format
- prop-base
- props
- text-base
- tmp
- prop-base
- props
- text-base
- bin
- Mvc_Chart.dll
- Content
- _svn
- entries
- format
- prop-base
- props
- text-base
- Site.css.svn-base
- tmp
- prop-base
- props
- text-base
- Site.css
- Controllers
- Default.aspx
- Default.aspx.cs
- Global.asax
- Global.asax.cs
- Models
- _svn
- entries
- format
- prop-base
- props
- text-base
- tmp
- prop-base
- props
- text-base
- StaticModel.cs
- Mvc_Chart.csproj
- Mvc_Chart.csproj.user
- Properties
- _svn
- entries
- format
- prop-base
- props
- text-base
- AssemblyInfo.cs.svn-base
- tmp
- prop-base
- props
- text-base
- AssemblyInfo.cs
- Scripts
- Views
- _svn
- entries
- format
- prop-base
- props
- text-base
- Web.config.svn-base
- tmp
- prop-base
- props
- text-base
- Account
- Home
- Shared
- Web.config
- Web.config
- Mvc_Chart.zip
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="XamlOnly.aspx.cs" Inherits="Mvc_Chart.Views.Home.XamlOnly" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<%
System.Web.UI.DataVisualization.Charting.Chart Chart2 = new System.Web.UI.DataVisualization.Charting.Chart();
Chart2.Width = 412;
Chart2.Height = 296;
Chart2.RenderType = RenderType.ImageTag;
Chart2.Palette = ChartColorPalette.BrightPastel;
Title t = new Title("XAML Only", Docking.Top, new System.Drawing.Font("Trebuchet MS", 14, System.Drawing.FontStyle.Bold), System.Drawing.Color.FromArgb(26, 59, 105));
Chart2.Titles.Add(t);
Chart2.ChartAreas.Add("Series 1");
// create a couple of series
Chart2.Series.Add("Series 1");
Chart2.Series.Add("Series 2");
// add points to series 1
foreach (int value in (List<int>)ViewData["Chart"])
{
Chart2.Series["Series 1"].Points.AddY(value);
}
// add points to series 2
foreach (int value in (List<int>)ViewData["Chart"])
{
Chart2.Series["Series 2"].Points.AddY(value + 1);
}
Chart2.BorderSkin.SkinStyle = BorderSkinStyle.Emboss;
Chart2.BorderColor = System.Drawing.Color.FromArgb(26, 59, 105);
Chart2.BorderlineDashStyle = ChartDashStyle.Solid;
Chart2.BorderWidth = 2;
Chart2.Legends.Add("Legend1");
// Render chart control
Chart2.Page = this;
HtmlTextWriter writer = new HtmlTextWriter(Page.Response.Output);
Chart2.RenderControl(writer);
%>
</asp:Content>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Contractor in Desktop and Web applications.
Gold Coast, Queensland.