| | |
| | | |
| | | _axis_x_flow.Visibility = DefaultBoolean.False; |
| | | _axis_x_flow.GridLines.Visible = false; |
| | | _axis_x_flow.GridLines.Color = Color.Silver; |
| | | _axis_y_head_loss.Visibility = DefaultBoolean.False; |
| | | _axis_y_head_loss.GridLines.Visible = false; |
| | | _axis_y_head_loss.GridLines.Color = Color.Silver; |
| | | |
| | | _axis_x_opening = _diagram.SecondaryAxesX[0]; |
| | | _axis_x_opening.SetAxisXQDisplay(); |
| | |
| | | |
| | | _axis_x_opening.Visibility = DefaultBoolean.False; |
| | | _axis_x_opening.GridLines.Visible = false; |
| | | _axis_x_opening.GridLines.Color = Color.Silver; |
| | | _axis_y_k.Visibility = DefaultBoolean.False; |
| | | _axis_y_k.GridLines.Visible = false; |
| | | _axis_y_k.GridLines.Color = Color.Silver; |
| | | |
| | | _const_line_x_flow = (ConstantLine)_axis_x_flow.ConstantLines.GetElementByName("ConstantLineFlow"); |
| | | _const_line_x_flow.SetWorkPointLineDisplay(); |
| | |
| | | _anno_txt_query_info.SetTextAnnoWorkPointDisplay(); |
| | | _anno_txt_query_info.Visible = false; |
| | | |
| | | this.chartControl1.SetChartMonoColorDisplay(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | |
| | | |
| | | AddPointSeries(vm.Color, axis_x, axis_y, pane, vm.DefPointList); |
| | | // AddPointSeries(vm.Color, axis_x, axis_y, pane, vm.DefPointList); |
| | | AddLineSeries(vm.Color, axis_x, axis_y, pane, vm.FitPointList); |
| | | |
| | | if (!string.IsNullOrEmpty(vm.Name) && vm.CurveType == Ahart.eCurveType.QL) |
| | |
| | | SetChartAxis(); |
| | | this.chartControl1.EndInit(); |
| | | _initial_data = true; |
| | | SetAxisXFlowValue(); |
| | | SetAxisXOpeningValue(); |
| | | |
| | | } |
| | | |
| | |
| | | _axis_x_opening.GridLines.Visible = false; |
| | | _axis_y_k.Visibility = DefaultBoolean.False; |
| | | _axis_y_k.GridLines.Visible = false; |
| | | |
| | | return; |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | _axis_x_flow.Visibility = DefaultBoolean.False; |
| | | _axis_x_flow.GridLines.Visible = false; |
| | | _axis_y_head_loss.Visibility = DefaultBoolean.False; |
| | | _axis_y_head_loss.GridLines.Visible = false; |
| | | _default_pane.Visibility = ChartElementVisibility.Hidden; |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | _axis_x_opening.Visibility = DefaultBoolean.False; |
| | | _axis_x_opening.GridLines.Visible = false; |
| | | _axis_y_k.Visibility = DefaultBoolean.False; |
| | | _axis_y_k.GridLines.Visible = false; |
| | | _bottom_pane.Visibility = ChartElementVisibility.Hidden; |
| | | } |
| | | |
| | |
| | | { |
| | | _const_line_x_flow.Visible = false; |
| | | _const_line_x_flow.Title.Visible = false; |
| | | _const_line_x_opening.Visible = false; |
| | | _const_line_x_opening.Title.Visible = false; |
| | | _const_line_y_k.Visible = false; |
| | | _const_line_y_k.Title.Visible = false; |
| | | _anno_txt_query_info.Visible = false; |
| | | return; |
| | | } |
| | |
| | | { |
| | | _const_line_x_flow.Visible = true; |
| | | _const_line_x_flow.Title.Visible = true; |
| | | _const_line_x_opening.Visible = true; |
| | | _const_line_x_opening.Title.Visible = true; |
| | | _const_line_y_k.Visible = true; |
| | | _const_line_y_k.Title.Visible = true; |
| | | _anno_txt_query_info.Visible = true; |
| | | } |
| | | if (this.IsInvalidData()) |
| | |
| | | var query_info_builder = new StringBuilder(); |
| | | var x_value = x.Value; |
| | | |
| | | query_info_builder.AppendLine($"流量:{x_value:N2} "); |
| | | query_info_builder.AppendLine($"{x_value:N2} m³/h "); |
| | | var str_list = new List<(string, string)>(); |
| | | foreach (var vm in vm_list) |
| | | { |
| | | var y_value = vm.FitPointList.GetInterPointsY(x_value)?.FirstOrDefault(); |
| | | if (y_value.HasValue) |
| | | { |
| | | str_list.Add((vm.Name, y_value.Value.ToString("N2"))); |
| | | var name= string.IsNullOrEmpty(vm.Name) ? "默认" : vm.Name; |
| | | str_list.Add((name, y_value.Value.ToString("N2"))); |
| | | } |
| | | } |
| | | for (int i = 0; i < str_list.Count; i++) |
| | | { |
| | | var str = str_list[i]; |
| | | var txt = $"{str.Item2} m [{str.Item1}]"; |
| | | if (i== str_list.Count-1) |
| | | { |
| | | query_info_builder.Append($"{str.Item1}:{str.Item2}"); |
| | | query_info_builder.Append(txt); |
| | | } |
| | | else |
| | | { |
| | | query_info_builder.AppendLine($"{str.Item1}:{str.Item2}"); |
| | | query_info_builder.AppendLine(txt); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (!_line_visible || !_exist_ol) |
| | | { |
| | | _const_line_x_flow.Visible = false; |
| | | _const_line_x_flow.Title.Visible = false; |
| | | _const_line_x_opening.Visible = false; |
| | | _const_line_x_opening.Title.Visible = false; |
| | | _const_line_y_k.Visible = false; |
| | | _const_line_y_k.Title.Visible = false; |
| | | _anno_txt_query_info.Visible = false; |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | _const_line_x_flow.Visible = true; |
| | | _const_line_x_flow.Title.Visible = true; |
| | | _const_line_x_opening.Visible = true; |
| | | _const_line_x_opening.Title.Visible = true; |
| | | _const_line_y_k.Visible = true; |
| | | _const_line_y_k.Title.Visible = true; |
| | | _anno_txt_query_info.Visible = true; |
| | | } |
| | | |
| | | if (this.IsInvalidData()) |