================================================================== ASPX Content <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" EnableViewState="true" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <%@ Register Assembly="Nevron.Chart.WebForm, Version=13.6.3.12, Culture=neutral, PublicKeyToken=346753153ef91008" Namespace="Nevron.Chart.WebForm" TagPrefix="ncwc" %> <%@ Register Assembly="Nevron.Chart.ThinWeb, Version=13.6.3.12, Culture=neutral, PublicKeyToken=e35134330ba499ca" Namespace="Nevron.Chart.ThinWeb" TagPrefix="cc1" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
==================================================================================================== CodeBehind protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { LoadAverageCharts(); } } protected void RadButton1_Click(object sender, EventArgs e) { LoadAverageCharts(); lbltime.Text = System.DateTime.Now.ToString(); lblname.Text = "Tested"; } protected void LoadAverageCharts() { //if (!nChartControl1.Initialized) //{ // Nevron.Chart.WebForm.NChartControl nChartControl1 = new Nevron.Chart.WebForm.NChartControl(); //nChartControl1.RecalcLayout(); nChartControl1.Panels.Clear(); //nChartControl1.RenderControl(null); nChartControl1.EnableViewState = true; nChartControl1.BackgroundStyle.FrameStyle.Visible = true; nChartControl1.Settings.JitterMode = JitterMode.Enabled; //nChartControl1.StateId = "Chart1"; nChartControl1.Width = Unit.Parse("670"); nChartControl1.Height = Unit.Parse("620"); NDockPanel gaugeArea = new NDockPanel(); gaugeArea.Dock = System.Windows.Forms.DockStyle.Fill; int yaxis = 0; NDockPanel Container = LoadBarChartOnload(); Container.Size = new NSizeL(new NLength((float)(100.0), NRelativeUnit.ParentPercentage), new NLength((float)(100.0 / 4.1), NRelativeUnit.ParentPercentage)); Container.Location = new NPointL(new NLength(25, NGraphicsUnit.Pixel), new NLength(16, NGraphicsUnit.Pixel)); yaxis += 185; gaugeArea.ChildPanels.Add(Container); nChartControl1.Panels.Add(gaugeArea); NDockPanel gaugeArea1 = new NDockPanel(); gaugeArea1.Dock = System.Windows.Forms.DockStyle.Fill; //Line series NDockPanel LineContainer = LoadLineChartOnload(); LineContainer.Size = new NSizeL(new NLength((float)(100.0), NRelativeUnit.ParentPercentage), new NLength((float)(100.0 / 1.45), NRelativeUnit.ParentPercentage)); LineContainer.Location = new NPointL(new NLength(-36, NGraphicsUnit.Pixel), new NLength(yaxis, NGraphicsUnit.Pixel)); gaugeArea1.ChildPanels.Add(LineContainer); nChartControl1.Panels.Add(gaugeArea1); nChartControl1.Visible = true; //dvGeneEcom.Visible = true; NLabel label = new NLabel(DateTime.Now.ToString()); nChartControl1.Panels.Add(label); serverAvgMouseEventTool = new NServerMouseEventTool(); //nChartControl1.Controller.Tools.Add(serverAvgMouseEventTool); serverAvgMouseEventTool.MouseMove = new NMouseMoveAvgCallback(); nChartControl1.Visible = true; nChartControl1.EnableViewState = true; //nChartControl1.CustomRequestCallback = new CustomRequestCallback(); NPostbackTool postbackTool = new NPostbackTool(); //nChartControl1.Controller.Tools.Add(postbackTool); nChartControl1.ServerSettings.EnableAutoUpdate = true; // refresh every second //hartControl1.ServerSettings.AutoUpdateInterval = 1000; nChartControl1.ServerSettings.JQuery.SourceType = JQuerySourceType.Embedded; //nChartControl1.ServerSettings.JQuery.Url = @"http://localhost:1902/NevronNew/jquery/jquery-1.7.1.min.js"; //} }