using System; using System.Data; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Infragistics.UltraChart.Shared.Styles; using Infragistics.UltraChart.Resources.Appearance; using Infragistics.UltraChart.Core.Layers; public partial class UserControls_Charts_ucChart : System.Web.UI.UserControl { public Unit Width {get; set;} public Unit Height {get; set;} private ChartType chartType; public ChartType ChartType { set { this.chartType = value; } } private bool swapRowscols; public bool SwapRowsCols { set { this.swapRowscols = value; } } private System.Drawing.Color colorBegin; public System.Drawing.Color ColorBegin { set { this.colorBegin = value; } } private System.Drawing.Color colorEnd; public System.Drawing.Color ColorEnd { set { this.colorEnd = value; } } private System.Drawing.Color legendBackcolor; public System.Drawing.Color LegendBackColor { set { this.legendBackcolor = value; } } private System.Drawing.Color legendForecolor; public System.Drawing.Color LegendForeColor { set { this.legendForecolor = value; } } private bool legendVisible; public bool LegendVisible { set { this.legendVisible = value; } } private ColorModels colorModel; public ColorModels ColorModel { set { this.colorModel = value; } } private DataTable dataSource; public DataTable DataSource { set { this.dataSource = value; } } private bool showAnnotations; public bool ShowAnnotations { set { this.showAnnotations = value; } } private int annotationLocationX; public int AnnotationLocationX { set { this.annotationLocationX = value; } } private int annotationLocationY; public int AnnotationLocationY { set { this.annotationLocationY = value; } } private string annotationText; public string AnnotationText { set { this.annotationText = value; } } private int rotation3D_X; public int Rotation3D_X { set { this.rotation3D_X = value; } } private int rotation3D_Y; public int Rotation3D_Y { set { this.rotation3D_Y = value; } } private int scale3D; public int Scale3D { set { this.scale3D = value; } } public string ucChartLabel { get; set; } public string ucClientOnMouseClick { get; set; } protected void Page_Load(object sender, EventArgs e) { //if (Page.IsPostBack) { return; } Bind_Chart_Data(); } public void Bind_Chart_Data() { if (ucClientOnMouseClick != string.Empty) { this.UltraChart.ClientSideEvents.ClientOnMouseClick = ucClientOnMouseClick; } //this.chartLabel.InnerHtml = ucChartLabel; this.UltraChart.PieChart.Labels.FormatString = ": (%)"; this.UltraChart.ColorModel.AlphaLevel = 255; this.UltraChart.Data.SwapRowsAndColumns = swapRowscols; this.UltraChart.Width = Width; this.UltraChart.Height = Height; this.UltraChart.ChartType = chartType; this.UltraChart.ColorModel.ColorBegin = colorBegin; this.UltraChart.ColorModel.ColorEnd = colorEnd; this.UltraChart.ColorModel.ModelStyle = colorModel; this.UltraChart.Legend.Visible = legendVisible; this.UltraChart.Legend.BackgroundColor = legendBackcolor; this.UltraChart.Legend.FontColor = legendForecolor; this.UltraChart.Legend.AlphaLevel = 150; this.UltraChart.PieChart.OthersCategoryPercent = 0; if (showAnnotations) { BoxAnnotation boxAnnotation1 = new BoxAnnotation(); boxAnnotation1.Location.Type = LocationType.Pixels; boxAnnotation1.Location.LocationX = this.annotationLocationX; boxAnnotation1.Location.LocationY = this.annotationLocationY; boxAnnotation1.Text = this.annotationText; this.UltraChart.Annotations.Add(boxAnnotation1); } if (scale3D > 0) { this.UltraChart.Transform3D.Scale = scale3D; } if (!Page.IsPostBack) { if (rotation3D_X > 0) { this.UltraChart.Transform3D.XRotation += rotation3D_X; } if (rotation3D_Y > 0) { this.UltraChart.Transform3D.YRotation += rotation3D_Y; } } this.UltraChart.DataSource = dataSource; this.UltraChart.DataBind(); this.UltraChart.TabIndex = 42; this.UltraChart.AccessKey = "C"; this.UltraChart.Focus(); this.UltraChart.Section508Compliant = true; this.UltraChart.Section508.ChartItems.AltTextFormatString = ": (%)"; this.UltraChart.Section508.ChartItems.TitleFormatString = ": (%)"; this.UltraChart.Section508.ChartImage.AltTextFormatString ="ICASS Program Other"; this.UltraChart.Section508.ChartImage.AltFormatString = "ICASS Program Other"; this.UltraChart.Tooltips.Display = TooltipDisplay.Never; } }