public static Infragistics.Win.UltraWinChart.UltraChart DataPointLabel(Infragistics.Win.UltraWinChart.UltraChart UChart, Boolean Visible, string UChartType, string DataFormat) { ChartTextAppearance chartTextAppearance1 = new ChartTextAppearance(); ColumnChartAppearance columnChartAppearance1 = new ColumnChartAppearance(); LineChartAppearance lineChartAppearance1 = new LineChartAppearance(); DoughnutChartAppearance doughnuChartAppearance1 = new DoughnutChartAppearance(); PieChartAppearance pieChartAppearance1 = new PieChartAppearance(); BarChartAppearance barChartAppearance1 = new BarChartAppearance(); if (Visible == true) { chartTextAppearance1.Visible = true; chartTextAppearance1.ChartTextFont = new System.Drawing.Font("Arial", 7F); chartTextAppearance1.Column = -2; chartTextAppearance1.ItemFormatString = DataFormat; chartTextAppearance1.Row = -2; } else { chartTextAppearance1.Visible = false; } switch ((ChartType)Enum.Parse(typeof(ChartType), UChartType)) { case ChartType.ColumnChart: columnChartAppearance1.ChartText.Add(chartTextAppearance1); UChart.ColumnChart = columnChartAppearance1; break; case ChartType.LineChart: lineChartAppearance1.ChartText.Add(chartTextAppearance1); UChart.LineChart = lineChartAppearance1; break; case ChartType.DoughnutChart: doughnuChartAppearance1.ChartText.Add(chartTextAppearance1); UChart.DoughnutChart = doughnuChartAppearance1; break; case ChartType.PieChart: pieChartAppearance1.ChartText.Add(chartTextAppearance1); UChart.PieChart = pieChartAppearance1; break; case ChartType.BarChart: barChartAppearance1.ChartText.Add(chartTextAppearance1); UChart.BarChart = barChartAppearance1; break; } return(UChart); }
private void InitializeComponent() { Infragistics.Win.Appearance appearance = new Infragistics.Win.Appearance(); PaintElement element = new PaintElement(); BarChartAppearance appearance2 = new BarChartAppearance(); ChartTextAppearance item = new ChartTextAppearance(); GradientEffect effect = new GradientEffect(); this.tableLayoutPanel1 = new TableLayoutPanel(); this.ultraButton1 = new UltraButton(); this.ultraChart1 = new UltraChart(); this.panel1 = new Panel(); this.pictureBox2 = new PictureBox(); this.pictureBox1 = new PictureBox(); this.backgroundWorker1 = new BackgroundWorker(); this.tableLayoutPanel1.SuspendLayout(); this.ultraChart1.BeginInit(); this.panel1.SuspendLayout(); ((ISupportInitialize)this.pictureBox2).BeginInit(); ((ISupportInitialize)this.pictureBox1).BeginInit(); base.SuspendLayout(); this.tableLayoutPanel1.BackColor = Color.Silver; this.tableLayoutPanel1.ColumnCount = 4; this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 5f)); this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 320f)); this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f)); this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 6f)); this.tableLayoutPanel1.Controls.Add(this.ultraButton1, 2, 1); this.tableLayoutPanel1.Controls.Add(this.ultraChart1, 2, 2); this.tableLayoutPanel1.Controls.Add(this.panel1, 1, 1); this.tableLayoutPanel1.Dock = DockStyle.Fill; this.tableLayoutPanel1.Location = new Point(0, 0); this.tableLayoutPanel1.Margin = new Padding(0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 4; this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 5f)); this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 50f)); this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100f)); this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 5f)); this.tableLayoutPanel1.Size = new Size(0x45d, 270); this.tableLayoutPanel1.TabIndex = 0; appearance.BackColor = Color.FromArgb(0xc0, 0xc0, 0xff); appearance.BackColor2 = Color.White; appearance.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical; this.ultraButton1.Appearance = appearance; this.ultraButton1.Dock = DockStyle.Fill; this.ultraButton1.Font = new Font("Arial", 18f, FontStyle.Bold, GraphicsUnit.Point, 0); this.ultraButton1.Location = new Point(0x148, 8); this.ultraButton1.Name = "ultraButton1"; this.ultraButton1.Size = new Size(780, 0x2c); this.ultraButton1.TabIndex = 1; this.ultraButton1.Text = "NASLOV"; this.ultraButton1.UseOsThemes = DefaultableBoolean.False; this.ultraChart1.ChartType = ChartType.BarChart; this.ultraChart1.Axis.BackColor = Color.FromArgb(0xff, 0xf8, 220); element.ElementType = PaintElementType.None; element.Fill = Color.FromArgb(0xff, 0xf8, 220); this.ultraChart1.Axis.PE = element; this.ultraChart1.Axis.X.Extent = 20; this.ultraChart1.Axis.X.Labels.Font = new Font("Verdana", 12f, FontStyle.Bold, GraphicsUnit.Point, 0); this.ultraChart1.Axis.X.Labels.FontColor = Color.Red; this.ultraChart1.Axis.X.Labels.HorizontalAlign = StringAlignment.Far; this.ultraChart1.Axis.X.Labels.ItemFormatString = "<DATA_VALUE:0>"; this.ultraChart1.Axis.X.Labels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto; this.ultraChart1.Axis.X.Labels.Orientation = TextOrientation.Horizontal; this.ultraChart1.Axis.X.Labels.SeriesLabels.Font = new Font("Verdana", 20.25f, FontStyle.Regular, GraphicsUnit.Point, 0); this.ultraChart1.Axis.X.Labels.SeriesLabels.FontColor = Color.DimGray; this.ultraChart1.Axis.X.Labels.SeriesLabels.FormatString = ""; this.ultraChart1.Axis.X.Labels.SeriesLabels.HorizontalAlign = StringAlignment.Far; this.ultraChart1.Axis.X.Labels.SeriesLabels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto; this.ultraChart1.Axis.X.Labels.SeriesLabels.Orientation = TextOrientation.VerticalLeftFacing; this.ultraChart1.Axis.X.Labels.SeriesLabels.VerticalAlign = StringAlignment.Center; this.ultraChart1.Axis.X.Labels.VerticalAlign = StringAlignment.Center; this.ultraChart1.Axis.X.LineThickness = 1; this.ultraChart1.Axis.X.MajorGridLines.AlphaLevel = 0xff; this.ultraChart1.Axis.X.MajorGridLines.Color = Color.Gainsboro; this.ultraChart1.Axis.X.MajorGridLines.DrawStyle = LineDrawStyle.Dot; this.ultraChart1.Axis.X.MajorGridLines.Visible = true; this.ultraChart1.Axis.X.MinorGridLines.AlphaLevel = 0xff; this.ultraChart1.Axis.X.MinorGridLines.Color = Color.LightGray; this.ultraChart1.Axis.X.MinorGridLines.DrawStyle = LineDrawStyle.Dot; this.ultraChart1.Axis.X.MinorGridLines.Visible = false; this.ultraChart1.Axis.X.RangeMax = 100.0; this.ultraChart1.Axis.X.RangeType = AxisRangeType.Custom; this.ultraChart1.Axis.X.TickmarkInterval = 10.0; this.ultraChart1.Axis.X.TickmarkStyle = AxisTickStyle.Smart; this.ultraChart1.Axis.X.Visible = true; this.ultraChart1.Axis.X2.Labels.Font = new Font("Verdana", 7f); this.ultraChart1.Axis.X2.Labels.FontColor = Color.Gray; this.ultraChart1.Axis.X2.Labels.HorizontalAlign = StringAlignment.Far; this.ultraChart1.Axis.X2.Labels.ItemFormatString = "<DATA_VALUE:00.##>"; this.ultraChart1.Axis.X2.Labels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto; this.ultraChart1.Axis.X2.Labels.Orientation = TextOrientation.VerticalLeftFacing; this.ultraChart1.Axis.X2.Labels.SeriesLabels.Font = new Font("Verdana", 7f); this.ultraChart1.Axis.X2.Labels.SeriesLabels.FontColor = Color.Gray; this.ultraChart1.Axis.X2.Labels.SeriesLabels.FormatString = ""; this.ultraChart1.Axis.X2.Labels.SeriesLabels.HorizontalAlign = StringAlignment.Far; this.ultraChart1.Axis.X2.Labels.SeriesLabels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto; this.ultraChart1.Axis.X2.Labels.SeriesLabels.Orientation = TextOrientation.VerticalLeftFacing; this.ultraChart1.Axis.X2.Labels.SeriesLabels.VerticalAlign = StringAlignment.Center; this.ultraChart1.Axis.X2.Labels.VerticalAlign = StringAlignment.Center; this.ultraChart1.Axis.X2.Labels.Visible = false; this.ultraChart1.Axis.X2.LineThickness = 1; this.ultraChart1.Axis.X2.MajorGridLines.AlphaLevel = 0xff; this.ultraChart1.Axis.X2.MajorGridLines.Color = Color.Gainsboro; this.ultraChart1.Axis.X2.MajorGridLines.DrawStyle = LineDrawStyle.Dot; this.ultraChart1.Axis.X2.MajorGridLines.Visible = true; this.ultraChart1.Axis.X2.MinorGridLines.AlphaLevel = 0xff; this.ultraChart1.Axis.X2.MinorGridLines.Color = Color.LightGray; this.ultraChart1.Axis.X2.MinorGridLines.DrawStyle = LineDrawStyle.Dot; this.ultraChart1.Axis.X2.MinorGridLines.Visible = false; this.ultraChart1.Axis.X2.TickmarkInterval = 40.0; this.ultraChart1.Axis.X2.TickmarkStyle = AxisTickStyle.Smart; this.ultraChart1.Axis.X2.Visible = false; this.ultraChart1.Axis.Y.Extent = 400; this.ultraChart1.Axis.Y.Labels.Font = new Font("Verdana", 24f, FontStyle.Bold, GraphicsUnit.Point, 0); this.ultraChart1.Axis.Y.Labels.HorizontalAlign = StringAlignment.Far; this.ultraChart1.Axis.Y.Labels.ItemFormatString = "<ITEM_LABEL>"; this.ultraChart1.Axis.Y.Labels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto; this.ultraChart1.Axis.Y.Labels.Orientation = TextOrientation.Horizontal; this.ultraChart1.Axis.Y.Labels.SeriesLabels.HorizontalAlign = StringAlignment.Center; this.ultraChart1.Axis.Y.Labels.SeriesLabels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto; this.ultraChart1.Axis.Y.Labels.SeriesLabels.Orientation = TextOrientation.VerticalLeftFacing; this.ultraChart1.Axis.Y.Labels.SeriesLabels.VerticalAlign = StringAlignment.Center; this.ultraChart1.Axis.Y.Labels.SeriesLabels.Visible = false; this.ultraChart1.Axis.Y.Labels.VerticalAlign = StringAlignment.Center; this.ultraChart1.Axis.Y.LineThickness = 1; this.ultraChart1.Axis.Y.MajorGridLines.AlphaLevel = 0xff; this.ultraChart1.Axis.Y.MajorGridLines.Color = Color.Gainsboro; this.ultraChart1.Axis.Y.MajorGridLines.DrawStyle = LineDrawStyle.Dot; this.ultraChart1.Axis.Y.MajorGridLines.Visible = true; this.ultraChart1.Axis.Y.MinorGridLines.AlphaLevel = 0xff; this.ultraChart1.Axis.Y.MinorGridLines.Color = Color.LightGray; this.ultraChart1.Axis.Y.MinorGridLines.DrawStyle = LineDrawStyle.Dot; this.ultraChart1.Axis.Y.MinorGridLines.Visible = false; this.ultraChart1.Axis.Y.TickmarkStyle = AxisTickStyle.Smart; this.ultraChart1.Axis.Y.Visible = true; this.ultraChart1.Axis.Y2.Labels.Font = new Font("Verdana", 7f); this.ultraChart1.Axis.Y2.Labels.FontColor = Color.Gray; this.ultraChart1.Axis.Y2.Labels.HorizontalAlign = StringAlignment.Near; this.ultraChart1.Axis.Y2.Labels.ItemFormatString = "<ITEM_LABEL>"; this.ultraChart1.Axis.Y2.Labels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto; this.ultraChart1.Axis.Y2.Labels.Orientation = TextOrientation.Horizontal; this.ultraChart1.Axis.Y2.Labels.SeriesLabels.Font = new Font("Verdana", 7f); this.ultraChart1.Axis.Y2.Labels.SeriesLabels.FontColor = Color.Gray; this.ultraChart1.Axis.Y2.Labels.SeriesLabels.HorizontalAlign = StringAlignment.Center; this.ultraChart1.Axis.Y2.Labels.SeriesLabels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto; this.ultraChart1.Axis.Y2.Labels.SeriesLabels.Orientation = TextOrientation.VerticalLeftFacing; this.ultraChart1.Axis.Y2.Labels.SeriesLabels.VerticalAlign = StringAlignment.Center; this.ultraChart1.Axis.Y2.Labels.VerticalAlign = StringAlignment.Center; this.ultraChart1.Axis.Y2.Labels.Visible = false; this.ultraChart1.Axis.Y2.LineThickness = 1; this.ultraChart1.Axis.Y2.MajorGridLines.AlphaLevel = 0xff; this.ultraChart1.Axis.Y2.MajorGridLines.Color = Color.Gainsboro; this.ultraChart1.Axis.Y2.MajorGridLines.DrawStyle = LineDrawStyle.Dot; this.ultraChart1.Axis.Y2.MajorGridLines.Visible = true; this.ultraChart1.Axis.Y2.MinorGridLines.AlphaLevel = 0xff; this.ultraChart1.Axis.Y2.MinorGridLines.Color = Color.LightGray; this.ultraChart1.Axis.Y2.MinorGridLines.DrawStyle = LineDrawStyle.Dot; this.ultraChart1.Axis.Y2.MinorGridLines.Visible = false; this.ultraChart1.Axis.Y2.TickmarkStyle = AxisTickStyle.Smart; this.ultraChart1.Axis.Y2.Visible = false; this.ultraChart1.Axis.Z.Labels.Font = new Font("Verdana", 7f); this.ultraChart1.Axis.Z.Labels.FontColor = Color.DimGray; this.ultraChart1.Axis.Z.Labels.HorizontalAlign = StringAlignment.Near; this.ultraChart1.Axis.Z.Labels.ItemFormatString = ""; this.ultraChart1.Axis.Z.Labels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto; this.ultraChart1.Axis.Z.Labels.Orientation = TextOrientation.Horizontal; this.ultraChart1.Axis.Z.Labels.SeriesLabels.Font = new Font("Verdana", 7f); this.ultraChart1.Axis.Z.Labels.SeriesLabels.FontColor = Color.DimGray; this.ultraChart1.Axis.Z.Labels.SeriesLabels.HorizontalAlign = StringAlignment.Near; this.ultraChart1.Axis.Z.Labels.SeriesLabels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto; this.ultraChart1.Axis.Z.Labels.SeriesLabels.Orientation = TextOrientation.Horizontal; this.ultraChart1.Axis.Z.Labels.SeriesLabels.VerticalAlign = StringAlignment.Center; this.ultraChart1.Axis.Z.Labels.VerticalAlign = StringAlignment.Center; this.ultraChart1.Axis.Z.Labels.Visible = false; this.ultraChart1.Axis.Z.LineThickness = 1; this.ultraChart1.Axis.Z.MajorGridLines.AlphaLevel = 0xff; this.ultraChart1.Axis.Z.MajorGridLines.Color = Color.Gainsboro; this.ultraChart1.Axis.Z.MajorGridLines.DrawStyle = LineDrawStyle.Dot; this.ultraChart1.Axis.Z.MajorGridLines.Visible = true; this.ultraChart1.Axis.Z.MinorGridLines.AlphaLevel = 0xff; this.ultraChart1.Axis.Z.MinorGridLines.Color = Color.LightGray; this.ultraChart1.Axis.Z.MinorGridLines.DrawStyle = LineDrawStyle.Dot; this.ultraChart1.Axis.Z.MinorGridLines.Visible = false; this.ultraChart1.Axis.Z.TickmarkStyle = AxisTickStyle.Smart; this.ultraChart1.Axis.Z.Visible = false; this.ultraChart1.Axis.Z2.Labels.Font = new Font("Verdana", 7f); this.ultraChart1.Axis.Z2.Labels.FontColor = Color.Gray; this.ultraChart1.Axis.Z2.Labels.HorizontalAlign = StringAlignment.Near; this.ultraChart1.Axis.Z2.Labels.ItemFormatString = ""; this.ultraChart1.Axis.Z2.Labels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto; this.ultraChart1.Axis.Z2.Labels.Orientation = TextOrientation.Horizontal; this.ultraChart1.Axis.Z2.Labels.SeriesLabels.Font = new Font("Verdana", 7f); this.ultraChart1.Axis.Z2.Labels.SeriesLabels.FontColor = Color.Gray; this.ultraChart1.Axis.Z2.Labels.SeriesLabels.HorizontalAlign = StringAlignment.Near; this.ultraChart1.Axis.Z2.Labels.SeriesLabels.Layout.Behavior = AxisLabelLayoutBehaviors.Auto; this.ultraChart1.Axis.Z2.Labels.SeriesLabels.Orientation = TextOrientation.VerticalLeftFacing; this.ultraChart1.Axis.Z2.Labels.SeriesLabels.VerticalAlign = StringAlignment.Center; this.ultraChart1.Axis.Z2.Labels.VerticalAlign = StringAlignment.Center; this.ultraChart1.Axis.Z2.Labels.Visible = false; this.ultraChart1.Axis.Z2.LineThickness = 1; this.ultraChart1.Axis.Z2.MajorGridLines.AlphaLevel = 0xff; this.ultraChart1.Axis.Z2.MajorGridLines.Color = Color.Gainsboro; this.ultraChart1.Axis.Z2.MajorGridLines.DrawStyle = LineDrawStyle.Dot; this.ultraChart1.Axis.Z2.MajorGridLines.Visible = true; this.ultraChart1.Axis.Z2.MinorGridLines.AlphaLevel = 0xff; this.ultraChart1.Axis.Z2.MinorGridLines.Color = Color.LightGray; this.ultraChart1.Axis.Z2.MinorGridLines.DrawStyle = LineDrawStyle.Dot; this.ultraChart1.Axis.Z2.MinorGridLines.Visible = false; this.ultraChart1.Axis.Z2.TickmarkStyle = AxisTickStyle.Smart; this.ultraChart1.Axis.Z2.Visible = false; this.ultraChart1.BackgroundImageLayout = ImageLayout.Center; item.ChartTextFont = new Font("Arial", 20.25f, FontStyle.Regular, GraphicsUnit.Point, 0); item.Column = -2; item.HorizontalAlign = StringAlignment.Far; item.ItemFormatString = "<DATA_VALUE:0>"; item.Row = -2; item.Visible = true; appearance2.ChartText.Add(item); this.ultraChart1.BarChart = appearance2; this.ultraChart1.ColorModel.AlphaLevel = 150; this.ultraChart1.ColorModel.ColorBegin = Color.Pink; this.ultraChart1.ColorModel.ColorEnd = Color.DarkRed; this.ultraChart1.ColorModel.ModelStyle = ColorModels.CustomLinear; this.ultraChart1.Dock = DockStyle.Fill; this.ultraChart1.Effects.Effects.Add(effect); this.ultraChart1.EmptyChartText = "Učitavanje podataka..."; this.ultraChart1.Legend.Location = LegendLocation.Left; this.ultraChart1.Location = new Point(0x148, 0x3a); this.ultraChart1.Name = "ultraChart1"; this.ultraChart1.Size = new Size(780, 0xcc); this.ultraChart1.TabIndex = 2; this.ultraChart1.Tooltips.HighlightFillColor = Color.DimGray; this.ultraChart1.Tooltips.HighlightOutlineColor = Color.DarkGray; this.panel1.Controls.Add(this.pictureBox2); this.panel1.Controls.Add(this.pictureBox1); this.panel1.Dock = DockStyle.Fill; this.panel1.Location = new Point(5, 5); this.panel1.Margin = new Padding(0); this.panel1.Name = "panel1"; this.tableLayoutPanel1.SetRowSpan(this.panel1, 2); this.panel1.Size = new Size(320, 260); this.panel1.TabIndex = 3; this.pictureBox2.BackColor = Color.Sienna; this.pictureBox2.BackgroundImageLayout = ImageLayout.Stretch; this.pictureBox2.BorderStyle = BorderStyle.FixedSingle; this.pictureBox2.Location = new Point(0, 0); this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Size = new Size(100, 50); this.pictureBox2.TabIndex = 1; this.pictureBox2.TabStop = false; this.pictureBox1.BackColor = Color.Maroon; this.pictureBox1.BackgroundImageLayout = ImageLayout.Stretch; this.pictureBox1.BorderStyle = BorderStyle.Fixed3D; this.pictureBox1.Dock = DockStyle.Fill; this.pictureBox1.Location = new Point(0, 0); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new Size(320, 260); this.pictureBox1.TabIndex = 0; this.pictureBox1.TabStop = false; this.backgroundWorker1.DoWork += new DoWorkEventHandler(this.backgroundWorker1_DoWork); this.backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted); base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = AutoScaleMode.Font; base.Controls.Add(this.tableLayoutPanel1); base.Margin = new Padding(10, 15, 3, 0); base.Name = "UVSvest"; base.Size = new Size(0x45d, 270); this.tableLayoutPanel1.ResumeLayout(false); this.ultraChart1.EndInit(); this.panel1.ResumeLayout(false); ((ISupportInitialize)this.pictureBox2).EndInit(); ((ISupportInitialize)this.pictureBox1).EndInit(); base.ResumeLayout(false); }