UltraChart 相关设置
    
Infragistics.Win.UltraWinChart.UltraChart chart=new Infragistics.Win.UltraWinChart.UltraChart();;
            if (Cds.Tables.Count > 0)

            
{
                chart.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                | System.Windows.Forms.AnchorStyles.Right)));

                chart 属性#region chart 属性
                chart.Axis.X.Extent = 45;
                chart.Axis.X.Labels.Flip = false;
                chart.Axis.X.Labels.HorizontalAlign = System.Drawing.StringAlignment.Near;
                chart.Axis.X.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
                chart.Axis.X.Labels.OrientationAngle = 0;
                chart.Axis.X.Labels.SeriesLabels.Flip = false;
                chart.Axis.X.Labels.SeriesLabels.FormatString = DateTime.Now.ToLongTimeString();
                chart.Axis.X.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Center;
                chart.Axis.X.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.VerticalLeftFacing;
                chart.Axis.X.Labels.SeriesLabels.OrientationAngle = 0;
                chart.Axis.X.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
                chart.Axis.X.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
                chart.Axis.X.LineThickness = 1;
                chart.Axis.X.MajorGridLines.AlphaLevel = ((byte)(255));
                chart.Axis.X.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
                chart.Axis.X.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
                chart.Axis.X.MajorGridLines.Thickness = 1;
                chart.Axis.X.MajorGridLines.Visible = true;
                chart.Axis.X.MinorGridLines.AlphaLevel = ((byte)(255));
                chart.Axis.X.MinorGridLines.Color = System.Drawing.Color.LightGray;
                chart.Axis.X.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
                chart.Axis.X.MinorGridLines.Thickness = 1;
                chart.Axis.X.MinorGridLines.Visible = false;
                chart.Axis.X.ScrollScale.Height = 10;
                chart.Axis.X.ScrollScale.Visible = false;
                chart.Axis.X.ScrollScale.Width = 15;
                chart.Axis.X.TickmarkInterval = 0;
                chart.Axis.X.Visible = true;
                chart.Axis.Y.Extent = 30;
                chart.Axis.Y.Labels.Flip = false;
                chart.Axis.Y.Labels.HorizontalAlign = System.Drawing.StringAlignment.Far;
                chart.Axis.Y.Labels.ItemFormatString = "<DATA_VALUE:00.##>";
                chart.Axis.Y.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
                chart.Axis.Y.Labels.OrientationAngle = 0;
                chart.Axis.Y.Labels.SeriesLabels.Flip = false;
                chart.Axis.Y.Labels.SeriesLabels.FormatString = "";
                chart.Axis.Y.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Far;
                chart.Axis.Y.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
                chart.Axis.Y.Labels.SeriesLabels.OrientationAngle = 0;
                chart.Axis.Y.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
                chart.Axis.Y.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
                chart.Axis.Y.LineThickness = 1;
                chart.Axis.Y.RangeMax = 1000;
                chart.Axis.Y.RangeType = Infragistics.UltraChart.Shared.Styles.AxisRangeType.Automatic;//Y轴最大值设置为自动
                chart.Axis.Y.MajorGridLines.AlphaLevel = ((byte)(255));
                chart.Axis.Y.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
                chart.Axis.Y.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
                chart.Axis.Y.MajorGridLines.Thickness = 1;
                chart.Axis.Y.MajorGridLines.Visible = true;
                chart.Axis.Y.MinorGridLines.AlphaLevel = ((byte)(255));
                chart.Axis.Y.MinorGridLines.Color = System.Drawing.Color.LightGray;
                chart.Axis.Y.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
                chart.Axis.Y.MinorGridLines.Thickness = 1;
                chart.Axis.Y.MinorGridLines.Visible = true;
                chart.Axis.Y.ScrollScale.Height = 10;
                chart.Axis.Y.ScrollScale.Visible = false;
                chart.Axis.Y.ScrollScale.Width = 15;
                chart.Axis.Y.TickmarkInterval = 0;
                chart.Axis.Y.Visible = true;
                chart.Border.Color = System.Drawing.Color.Silver;
                chart.Border.CornerRadius = 5;
                chart.Border.Raised = true;
                chart.ColorModel.AlphaLevel = ((byte)(150));
                chart.ColorModel.ColorBegin = System.Drawing.Color.LimeGreen;
                chart.ColorModel.ColorEnd = System.Drawing.Color.Gold;
                chart.ColorModel.ModelStyle = Infragistics.UltraChart.Shared.Styles.ColorModels.LinearRange;
                chart.ColorModel.Scaling = Infragistics.UltraChart.Shared.Styles.ColorScaling.Increasing;
                chart.Data.EmptyStyle.LineStyle.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dash;
                chart.Data.EmptyStyle.LineStyle.EndStyle = Infragistics.UltraChart.Shared.Styles.LineCapStyle.NoAnchor;
                chart.Data.EmptyStyle.LineStyle.MidPointAnchors = false;
                chart.Data.EmptyStyle.LineStyle.StartStyle = Infragistics.UltraChart.Shared.Styles.LineCapStyle.NoAnchor;
                chart.Data.MaxValue = 500;
                chart.Data.MinValue = 0;
                chart.Data.SwapRowsAndColumns = true;
                chart.Legend.BackgroundColor = System.Drawing.Color.LemonChiffon;
                chart.Legend.BorderColor = System.Drawing.Color.DimGray;
                chart.Legend.DataAssociation = Infragistics.UltraChart.Shared.Styles.ChartTypeData.ColumnData;
                chart.Legend.Location = Infragistics.UltraChart.Shared.Styles.LegendLocation.Bottom;
                chart.Legend.SpanPercentage = 5;
                chart.Legend.Visible = true;
                chart.TitleBottom.Visible = false;
                chart.TitleTop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold);
                chart.TitleTop.FontColor = System.Drawing.Color.Red;
                chart.TitleTop.VerticalAlign = System.Drawing.StringAlignment.Center;
                chart.TitleTop.Text = "标题";
                chart.Tooltips.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F);
                chart.Tooltips.TooltipControl = null;
                chart.Tooltips.UseControl = false;
                chart.ForeColor = System.Drawing.SystemColors.ControlText;
                chart.TabIndex = 10;
                chart.Name = item.Text.ToString();
                chart.Size = new System.Drawing.Size(400, 295);//图表的大小设置
                chart.Location = new System.Drawing.Point(5, 300);//设置画图表的位置
                #endregion
                chart.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.ColumnChart;//图表的显示样式
此为简单的双向(X,Y)坐标图表,绘制多维图表可增加相应的坐标参数,如(X2,Y2,Z,Z2。。。)
                    
                
                
                
            
        
浙公网安备 33010602011771号