private void ShowChart() { // 차트 설정 #region " Chart 기본설정" udcChartFX1.RPT_1_ChartInit(); udcChartFX1.RPT_2_ClearData(); // 그래프 설정 // udcChartFX1.AxisY.Font = new System.Drawing.Font("굴림체", 8, System.Drawing.FontStyle.Regular); udcChartFX1.AxisY2.Font = new System.Drawing.Font("굴림체", 8, System.Drawing.FontStyle.Regular); udcChartFX1.AxisX.Font = new System.Drawing.Font("굴림체", 8, System.Drawing.FontStyle.Regular); udcChartFX1.PointLabels = true; // ToolBar 보여주기 udcChartFX1.ToolBar = true; //3D udcChartFX1.Chart3D = true; // contion attribute 를 이용한 0 point label hidden SoftwareFX.ChartFX.ConditionalAttributes contion = udcChartFX1.ConditionalAttributes[0]; contion.Condition.From = 0; contion.Condition.To = 0; contion.PointLabels = false; #endregion switch (cboChart.SelectedIndex) { case 0: // 전체보기 { #region 전체보기 #endregion } break; case 1: // { #region Chart No.1 #endregion } break; case 2: // { #region Chart No.2 #endregion } break; } }
/// <summary> /// 팝업에서 보여줄 Title과 DataTable을 입력받는 생성자 /// </summary> /// <param name="title">Title</param> /// <param name="dt">해당 공정그룹의 정체 Lot 현황</param> public PQC031001_P1(string title, string Pattern, string Mindate, string title1) // 2010-08-27-안시홍 : title1 추가 { InitializeComponent(); this.Text = title; DataTable Data_dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", DataChart(Pattern, Mindate, title1)); // 2010-08-27-안시홍 : title1 추가 DataTable Line_dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", LineChart(Mindate)); int columnCount = 0; double max1 = 0; double max_temp = 0; udcChartFX1.RPT_1_ChartInit(); udcChartFX1.RPT_2_ClearData(); // contion attribute 를 이용한 0 point label hidden SoftwareFX.ChartFX.ConditionalAttributes contion = udcChartFX1.ConditionalAttributes[0]; contion.Condition.From = 0; contion.Condition.To = 0; contion.PointLabels = false; // 차트 설정 udcChartFX1.RPT_3_OpenData(1, Data_dt.Rows.Count); int[] tat_columns = new Int32[Data_dt.Rows.Count]; int[] columnsHeader = new Int32[Data_dt.Rows.Count]; int[] dt_columns = new Int32[Data_dt.Rows.Count]; for (int i = 0; i < dt_columns.Length; i++) { tat_columns[i] = 0 + i; dt_columns[i] = 0 + i; columnsHeader[i] = 0 + i; } max1 = udcChartFX1.RPT_4_AddData(Data_dt, tat_columns, new int[] { columnCount + 1 }, SeriseType.Column); max_temp = max1; max1 = udcChartFX1.RPT_4_AddData(Data_dt, dt_columns, new int[] { columnCount + 2 }, SeriseType.Column); if (max1 > max_temp) { max_temp = max1; } max1 = max_temp; udcChartFX1.RPT_5_CloseData(); ////각 Serise별로 다른 타입을 사용할 경우 udcChartFX1.RPT_6_SetGallery(ChartType.Curve, 0, 1, "", AsixType.Y, DataTypes.Initeger, max1 * 1.2); udcChartFX1.RPT_6_SetGallery(ChartType.Curve, 1, 1, "", AsixType.Y2, DataTypes.Initeger, max1 * 1.2); udcChartFX1.Series[0].Color = System.Drawing.Color.Red; udcChartFX1.Series[1].Color = System.Drawing.Color.Blue; udcChartFX1.Series[0].LineWidth = 2; // 2010-08-10-안시홍 : 굵은 그래프 선(RED)으로 변경 udcChartFX1.Series[1].LineWidth = 2; // 2010-08-10-안시홍 : 굵은 그래프 선(BLUE)으로 변경 //경과시간 세로Line udcChartFX1.ConstantLines[0].Value = Convert.ToInt16(Line_dt.Rows[0][0].ToString()); udcChartFX1.ConstantLines[0].Axis = SoftwareFX.ChartFX.AxisItem.X; udcChartFX1.ConstantLines[0].Width = 2; // 2010-08-10-안시홍 : 굵은 세로 그래프 선(GREEN)으로 변경 udcChartFX1.ConstantLines[0].Font = new System.Drawing.Font("Tahoma", 15.25F); // 2010-08-10-안시홍 : 글자 굵게 변경. udcChartFX1.ConstantLines[0].Text = Line_dt.Rows[0][0].ToString() + "분"; udcChartFX1.ConstantLines[0].Color = System.Drawing.Color.Green; //udcChartFX1.ConstantLines[1].Value = Convert.ToInt16(Line_dt.Rows[0][0].ToString()); //udcChartFX1.ConstantLines[1].Axis = SoftwareFX.ChartFX.AxisItem.Y; //udcChartFX1.ConstantLines[1].Width = 1; //udcChartFX1.ConstantLines[1].Text = Line_dt.Rows[0][0].ToString() + "℃"; //udcChartFX1.ConstantLines[1].Color = System.Drawing.Color.Green; udcChartFX1.RPT_7_SetXAsixTitleUsingSpreadHeader(Data_dt); udcChartFX1.Highlight.PointAttributes.PointLabelColor = System.Drawing.Color.Transparent; udcChartFX1.AxisY.Gridlines = true; udcChartFX1.AxisY.DataFormat.Decimals = 0; // 2010-08-10-안시홍 : 가로축, 세로축 수정 udcChartFX1.AxisX.Title.Text = "Minutes"; udcChartFX1.AxisY.Title.Text = "Temperature (℃)"; udcChartFX1.AxisX.Font = new System.Drawing.Font("Tahoma", 9.25F); udcChartFX1.AxisY.Font = new System.Drawing.Font("Tahoma", 9.25F); udcChartFX1.AxisY2.Font = new System.Drawing.Font("Tahoma", 9.25F); udcChartFX1.AxisX.Step = 5; udcChartFX1.AxisY.Step = 5; udcChartFX1.AxisY2.Step = 5; udcChartFX1.AxisX.Min = 0; udcChartFX1.AxisY.Min = 20; udcChartFX1.AxisY.Max = 210; udcChartFX1.AxisY2.Min = 20; udcChartFX1.AxisY2.Max = 210; // 2010-08-30-안시홍 : 30분 간격의 세로 구분선 추가 udcChartFX1.AxisX.MinorGridlines = true; udcChartFX1.AxisX.MinorStep = 30; // 2010-08-10-안시홍 : 범례 표시 udcChartFX1.SerLeg[0] = "기준온도"; udcChartFX1.SerLeg[1] = "현재온도"; udcChartFX1.SerLegBox = true; udcChartFX1.SerLegBoxObj.Docked = SoftwareFX.ChartFX.Docked.Top; }
private void ChartShow(string Pattern, string Mindate, Object obj) { /************************************************ * comment : OVEN CHART를 설정한다 * * created by : * * modified by : Si-hong An (2010-08-27-금요일) ************************************************/ udcChartFX CHART = (udcChartFX)obj; DataTable Line_dt = null; DataTable Data_dt = null; // DataTable Data_dt_Mark = null; Data_dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", DataChart(Pattern, Mindate)); // Data_dt_Mark = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", DataChart_Mark(Pattern, Mindate)); Line_dt = CmnFunction.oComm.GetFuncDataTable("DYNAMIC", LineChart(Mindate)); int columnCount = 0; double max1 = 0; double max_temp = 0; //int columnCount_Mark = 0; //double max2 = 0; //double max_temp_Mark = 0; // 차트 설정 CHART.RPT_1_ChartInit(); CHART.RPT_2_ClearData(); CHART.RPT_3_OpenData(1, Data_dt.Rows.Count); // CHART.RPT_3_OpenData(1, Data_dt_Mark.Rows.Count); // 2010-08-27-안시홍 // contion attribute 를 이용한 0 point label hidden SoftwareFX.ChartFX.ConditionalAttributes contion = CHART.ConditionalAttributes[1]; contion.Condition.From = 0; contion.Condition.To = 0; contion.PointLabels = false; int[] tat_columns = new Int32[Data_dt.Rows.Count]; int[] columnsHeader = new Int32[Data_dt.Rows.Count]; int[] dt_columns = new Int32[Data_dt.Rows.Count]; //int[] tat_columns_Mark = new Int32[Data_dt_Mark.Rows.Count]; //int[] columnsHeader_Mark = new Int32[Data_dt_Mark.Rows.Count]; //int[] dt_columns_Mark = new Int32[Data_dt_Mark.Rows.Count]; for (int i = 0; i < dt_columns.Length; i++) { tat_columns[i] = 0 + i; dt_columns[i] = 0 + i; columnsHeader[i] = 0 + i; } /* * for (int i = 0; i < dt_columns_Mark.Length; i++) * { * tat_columns_Mark[i] = 0 + i; * dt_columns_Mark[i] = 0 + i; * columnsHeader_Mark[i] = 0 + i; * } * * max2 = CHART.RPT_4_AddData(Data_dt_Mark, tat_columns_Mark, new int[] { columnCount_Mark + 1 }, SeriseType.Column); * max_temp_Mark = max2; * //max2 = CHART.RPT_4_AddData(Data_dt_Mark, dt_columns_Mark, new int[] { columnCount + 1 }, SeriseType.Column); * //if (max2 > max_temp_Mark) * //{ * // max_temp_Mark = max2; * //} * //max2 = max_temp_Mark; */ max1 = CHART.RPT_4_AddData(Data_dt, tat_columns, new int[] { columnCount + 1 }, SeriseType.Column); max_temp = max1; max1 = CHART.RPT_4_AddData(Data_dt, dt_columns, new int[] { columnCount + 2 }, SeriseType.Column); if (max1 > max_temp) { max_temp = max1; } max1 = max_temp; CHART.RPT_5_CloseData(); //각 Serise별로 다른 타입을 사용할 경우 CHART.RPT_6_SetGallery(ChartType.ThinLine, 0, 1, "", AsixType.Y, DataTypes.Initeger, max1 * 1.2); CHART.RPT_6_SetGallery(ChartType.ThinLine, 1, 1, "", AsixType.Y2, DataTypes.Initeger, max1 * 1.2); CHART.Series[0].Color = System.Drawing.Color.Red; CHART.Series[1].Color = System.Drawing.Color.Blue; CHART.Series[0].LineWidth = 2; //2010-08-06-안시홍 : 굵은 그래프 선(RED)으로 변경 CHART.Series[1].LineWidth = 2; //2010-08-06-안시홍 : 굵은 그래프 선(BLUE)으로 변경 //경과시간 세로Line CHART.ConstantLines[0].Value = Convert.ToInt16(Line_dt.Rows[0][0].ToString()); CHART.ConstantLines[0].Axis = SoftwareFX.ChartFX.AxisItem.X; CHART.ConstantLines[0].Width = 2; //2010-08-09-안시홍 : 굵은 세로 그래프 선(GREEN)으로 변경.(설비팀 요청) CHART.ConstantLines[0].Font = new System.Drawing.Font("Tahoma", 15.25F); //2010-08-10-안시홍 : 글자 굵게 변경.(설비팀 요청) CHART.ConstantLines[0].Text = Line_dt.Rows[0][0].ToString() + "분"; CHART.ConstantLines[0].Color = System.Drawing.Color.Green; CHART.RPT_7_SetXAsixTitleUsingSpreadHeader(Data_dt); CHART.AxisY2.Gridlines = true; CHART.Highlight.PointAttributes.PointLabelColor = System.Drawing.Color.Transparent; /* 2010-08-10-안시홍 : 새로 추가한 부분 */ /*****************************************************************************************/ udcChartFX1.AxisX.Title.Text = "Minutes"; udcChartFX1.AxisY.Title.Text = "Temperature (℃)"; udcChartFX1.AxisX.Font = new System.Drawing.Font("Tahoma", 9.25F); // 가로축 글자 굵게 변경 udcChartFX1.AxisY.Font = new System.Drawing.Font("Tahoma", 9.25F); // 세로축 글자 굵게 변경 udcChartFX1.AxisY2.Font = new System.Drawing.Font("Tahoma", 0.03F); // 오른쪽 세로축 udcChartFX1.AxisX.Step = 10; udcChartFX1.AxisY.Step = 10; udcChartFX1.AxisY2.Step = 5; // 2010-08-30-안시홍 : 30분 간격의 세로 구분선 추가 udcChartFX1.AxisX.MinorGridlines = true; udcChartFX1.AxisX.MinorStep = 30; //udcChartFX1.AxisX.MinorGrid.Color = System.Drawing.Color.LightYellow; udcChartFX1.AxisX.Min = 0; udcChartFX1.AxisY.Min = 20; udcChartFX1.AxisY.Max = 210; udcChartFX1.AxisY2.Min = 20; udcChartFX1.AxisY2.Max = 210; // 범례 표시 udcChartFX1.SerLeg[0] = "기준온도"; udcChartFX1.SerLeg[1] = "현재온도"; udcChartFX1.SerLegBox = true; udcChartFX1.SerLegBoxObj.Docked = SoftwareFX.ChartFX.Docked.Top; /*****************************************************************************************/ }