Shuxia Ning
2025-01-07 4397d67969ede2fe50a1fd2953ecb69b2878d29c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
namespace HStation.WinFrmUI
{
    public partial class UniversalChartViewCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        public UniversalChartViewCtrl()
        {
            InitializeComponent();
            this.bar2.OptionsBar.AllowQuickCustomization = false;
        }
 
        /// <summary>
        /// 绑定数据
        /// </summary> 
        public void SetBindingData(Yw.Vmo.PhartDiagramExGraphListVmo vmo)
        {
            if (vmo == null || vmo.GraphList == null || !vmo.GraphList.Any())
            {
                this.universalViewChart1.Clear();
                return;
            }
            var curveInfo = vmo.GraphList[0].GetCurveInfo();
            var (axis_x_title, axis_y_title) = PhartAxisTitleHelper.Get(curveInfo.Item1);
            this.universalViewChart1.AxisXTitle = axis_x_title;
            this.universalViewChart1.AxisYTitle = axis_y_title;
            this.universalViewChart1.SetBindingData(curveInfo.line_pt_list);
        }
 
        /// <summary>
        /// 清空绑定数据
        /// </summary>
        public void ClearBindingData()
        {
            this.universalViewChart1.Clear();
        }
 
        //查询线
        private void barCekLineVisible_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.universalViewChart1.LineVisible=this.barCekLineVisible.Checked;
        }  
 
        /// <summary>
        /// 获取
        /// </summary> 
        public Yw.Vmo.PhartDiagramExGraphListVmo Get()
        {
            return new();
        }
 
 
    }
}