| | |
| | | private AxisX _axis_x_flow; |
| | | private AxisY _axis_y_head; |
| | | private SecondaryAxisY _axis_y_eff, _axis_y_power; |
| | | private ConstantLine _const_line_flow; |
| | | private ConstantLine _query_head_line; |
| | | private ConstantLine _const_line_x; |
| | | private ConstantLine _const_line_y; |
| | | |
| | | private Series _series_head, _series_eff, _series_power; |
| | | private Series _series_head_pt, _series_eff_pt, _series_power_pt; |
| | |
| | | _axis_y_power = _diagram.SecondaryAxesY.GetAxisByName("AxisYQP"); |
| | | _axis_y_power.SetSecondaryAxisYQPDisplay(); |
| | | |
| | | _const_line_flow = (ConstantLine)_diagram.AxisX.ConstantLines.GetElementByName("WorkPointLine"); |
| | | _const_line_flow.SetWorkPointLineDisplay(); |
| | | _const_line_x = (ConstantLine)_diagram.AxisX.ConstantLines.GetElementByName("WorkPointLine"); |
| | | _const_line_x.SetWorkPointLineDisplay(); |
| | | |
| | | _query_head_line = (ConstantLine)_diagram.AxisY.ConstantLines.GetElementByName("WorkHLine"); |
| | | _query_head_line.SetWorkHLineDisplay(); |
| | | _const_line_y = (ConstantLine)_diagram.AxisY.ConstantLines.GetElementByName("WorkHLine"); |
| | | _const_line_y.SetWorkHLineDisplay(); |
| | | |
| | | _series_head = this.chartControl1.GetSeriesByName("SeriesCurveQH"); |
| | | _series_head.SetCurveQHDisplay(); |
| | |
| | | _axis_y_power.Visibility = DefaultBoolean.False; |
| | | _axis_y_power.GridLines.Visible = false; |
| | | |
| | | _const_line_flow.Visible = false; |
| | | _query_head_line.Visible = false; |
| | | _const_line_x.Visible = false; |
| | | _const_line_y.Visible = false; |
| | | _anno_txt_query_info.Visible = false; |
| | | |
| | | _series_head_pt.Visible = false; |
| | |
| | | _axis_y_power.Visibility = DefaultBoolean.False; |
| | | _axis_y_power.GridLines.Visible = false; |
| | | |
| | | _const_line_flow.Visible = false; |
| | | _query_head_line.Visible = false; |
| | | _const_line_x.Visible = false; |
| | | _const_line_y.Visible = false; |
| | | _anno_txt_query_info.Visible = false; |
| | | _bottom_panel.Visibility = ChartElementVisibility.Hidden; |
| | | return; |
| | | } |
| | | |
| | | _bottom_panel.Visibility = split_panel ? ChartElementVisibility.Visible : ChartElementVisibility.Hidden; |
| | | |
| | | |
| | | |
| | | //流量 |
| | | if (_qh_pt_list != null) |
| | | { |
| | |
| | | { |
| | | _series_head.Points.Clear(); |
| | | _series_head.Visible = false; |
| | | _const_line_flow.Visible = false; |
| | | _query_head_line.Visible = false; |
| | | _const_line_x.Visible = false; |
| | | _const_line_y.Visible = false; |
| | | _anno_txt_query_info.Visible = false; |
| | | } |
| | | |
| | |
| | | |
| | | (_anno_txt_query_info.AnchorPoint as ChartAnchorPoint).X = x; |
| | | (_anno_txt_query_info.AnchorPoint as ChartAnchorPoint).Y = y; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | if (!_line_visible) |
| | | { |
| | | _const_line_flow.Visible = false; |
| | | _const_line_flow.Title.Visible = false; |
| | | _query_head_line.Visible = false; |
| | | _query_head_line.Title.Visible = false; |
| | | _const_line_x.Visible = false; |
| | | _const_line_x.Title.Visible = false; |
| | | _const_line_y.Visible = false; |
| | | _const_line_y.Title.Visible = false; |
| | | _anno_txt_query_info.Visible = false; |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | _const_line_flow.Visible = true; |
| | | _const_line_flow.Title.Visible = true; |
| | | _query_head_line.Visible = true; |
| | | _query_head_line.Title.Visible = true; |
| | | _const_line_x.Visible = true; |
| | | _const_line_x.Title.Visible = true; |
| | | _const_line_y.Visible = true; |
| | | _const_line_y.Title.Visible = true; |
| | | _anno_txt_query_info.Visible = true; |
| | | } |
| | | if (_qh_pt_list == null || !_qh_pt_list.Any()) |
| | |
| | | workInfoStringBuilder.Append($"功率:{_work_point.P.Value.ToString("N1")} "); |
| | | } |
| | | |
| | | _const_line_flow.AxisValue = _work_point.Q; |
| | | _const_line_flow.Title.Text = _work_point.Q.ToString("N1"); |
| | | _const_line_x.AxisValue = _work_point.Q; |
| | | _const_line_x.Title.Text = _work_point.Q.ToString("N1"); |
| | | |
| | | _query_head_line.AxisValue = _work_point.H; |
| | | _query_head_line.Title.Text = _work_point.H.ToString("N1"); |
| | | _const_line_y.AxisValue = _work_point.H; |
| | | _const_line_y.Title.Text = _work_point.H.ToString("N1"); |
| | | |
| | | //测试展示效果 |
| | | _anno_txt_query_info.Text = workInfoStringBuilder.ToString(); |
| | |
| | | } |
| | | else if (hitInfo.InConstantLine) |
| | | { |
| | | if (hitInfo.ConstantLine == _const_line_flow) |
| | | if (hitInfo.ConstantLine == _const_line_x) |
| | | { |
| | | _onMoveWorkPointLine = true; |
| | | } |
| | | else if (hitInfo.ConstantLine == _query_head_line) |
| | | else if (hitInfo.ConstantLine == _const_line_y) |
| | | { |
| | | _onMoveWorkHLine = true; |
| | | } |