Essential Studio for Asp.Net | Demos

SHOWCASE SAMPLES
Showcase samples
    <%@ Page Title="Chart-DateTime Category Axis-ASP.NET-SYNCFUSION" Language="C#" MetaDescription="This sample demonstrates how to render and configure date time category axis using Syncfusion ASP.NET Web Forms Chart control" MasterPageFile="~/Samplebrowser.Master" AutoEventWireup="true" CodeBehind="DateTimeCategoryAxis.aspx.cs" Inherits="WebSampleBrowser.Chart.DateTimeCategoryAxis" %>
    
    <asp:Content ID="Content5" ContentPlaceHolderID="ControlsSection" runat="server">
         <div>
            <script type="text/javascript" src="../Scripts/ChartData.js"></script>
            <ej:WaitingPopup runat="server" ID="waitingpopup" ShowOnInit="false"></ej:WaitingPopup>
            <ej:Chart ID="Chart1" runat="server" Height="600" IsResponsive="true" OnClientLoad="onChartLoad">
                <PrimaryXAxis ValueType="DateTimeCategory" LabelFormat="ddd, dd" IntervalType="days" Title-Text="Business Days" /> 
                <PrimaryYAxis LabelFormat="{value}%" Title-text="Sales Count in %" />
                 <Series>
                   <ej:Series EnableAnimation="True" Type="Column" Name="Sales" XName="Xvalue" YName="YValue1"  Fill="#ff9900"
                       Tooltip-Visible="true" Tooltip-Format="Date : #point.x#  &lt;br/> Sales : #point.y#">
                   </ej:Series>
                  </Series>
                <Title Text="Sales Comparison of a Product"></Title>
                <Legend Visible="false"></Legend>
            </ej:Chart>
        </div>
    </asp:Content>
    
    
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Syncfusion.JavaScript.DataVisualization;
    using Syncfusion.JavaScript.DataVisualization.Models;
    
    namespace WebSampleBrowser.Chart
    {
        public partial class DateTimeCategoryAxis : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                //Setting Range for PrimaryXAxis
                this.Chart1.PrimaryXAxis.Range.Interval = 1;
    
                List<DatetimeCategoryData> data = new List<DatetimeCategoryData>();
    
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 02), 30));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 03), 50));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 04), 45));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 05), 65));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 06), 90));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 09), 85));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 10), 30));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 11), 55));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 12), 25));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 13), 40));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 16), 75));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 17), 70));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 18), 60));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 19), 30));
                data.Add(new DatetimeCategoryData(new DateTime(2015, 03, 20), 15));
                //Binding Datasource to Chart
                this.Chart1.DataSource = data;
                this.Chart1.DataBind();
    
            }
        }
         
    }
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Data;
    using System.ComponentModel;
    using System.Web.Script.Serialization;
       [Serializable]
            public class DatetimeCategoryData
            {
                public DatetimeCategoryData(DateTime xval, double yvalue1)
                {
                    this.Xvalue = xval;
                    this.YValue1 = yvalue1;
    
    
                }
                public DateTime Xvalue
                {
                    get;
                    set;
                }
                public double YValue1
                {
                    get;
                    set;
                }
            }