Essential Studio for Asp.Net | Demos

SHOWCASE SAMPLES
Showcase samples
    <%@ Page Title="Chart-DateTime Axis-ASP.NET-SYNCFUSION"   Language="C#" MetaDescription="This sample demonstrates how to render and configure date time axis using Syncfusion ASP.NET Web Forms Chart control" AutoEventWireup="true" MasterPageFile="~/Samplebrowser.Master" CodeBehind="DateTimeAxis.aspx.cs" Inherits="WebSampleBrowser.Chart.DateTimeAxis" %>
    
     <asp:Content ID="ControlContent" runat="server" ContentPlaceHolderID="ControlsSection">
        <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" Width="970" Height="600" IsResponsive="true" OnClientLoad="onChartLoad">
                <PrimaryXAxis ValueType="Datetime" LabelFormat="MMM-yyyy" IntervalType="Years" Title-Text="Sales Across Years" /> 
                <PrimaryYAxis LabelFormat="${value}" Title-text="Sales Amount in millions(USD)" />
                 <Series>
                   <ej:Series EnableAnimation="True" Type="Line" Name="Sales" XName="Xvalue" YName="YValue1" 
                       Border-Width="3" Marker-Visible="true" Marker-Size-Height="10"  Marker-Size-Width="10" Tooltip-Visible="true" 
                       Tooltip-Format="Date : #point.x#  &lt;br/> Profit : #point.y#"></ej:Series>
                  </Series>
                <Legend Visible="false"></Legend>
            </ej:Chart>
        </div>
    </asp:Content>
    
    
    using Syncfusion.JavaScript.DataVisualization;
    using Syncfusion.JavaScript.DataVisualization.Models;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    
    namespace WebSampleBrowser.Chart
    {
        public partial class DateTimeAxis : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                //Setting Range for PrimaryXAxis
                this.Chart1.PrimaryXAxis.Range.Min = new DateTime(2000, 6, 1);
                this.Chart1.PrimaryXAxis.Range.Max = new DateTime(2010, 6, 1);
                this.Chart1.PrimaryXAxis.Range.Interval = 1;
    
                List<DatetimeData> data = new List<DatetimeData>();
    
                data.Add(new DatetimeData(new DateTime(2000, 06, 11), 10));
                data.Add(new DatetimeData(new DateTime(2002, 03, 07), 30));
                data.Add(new DatetimeData(new DateTime(2004, 03, 06), 15));
                data.Add(new DatetimeData(new DateTime(2006, 03, 30), 65));
                data.Add(new DatetimeData(new DateTime(2008, 03, 08), 90));
                data.Add(new DatetimeData(new DateTime(2010, 03, 08), 85));
    
                //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 DatetimeData
        {
            public DatetimeData(DateTime xval, double yvalue1)
            {
                this.Xvalue = xval;
                this.YValue1 = yvalue1;
    
    
            }
            public DateTime Xvalue
            {
                get;
                set;
            }
            public double YValue1
            {
                get;
                set;
            }
        }