• SciChart WPF Charts SDK v6.x


    SciChart WPF Charts SDK v6.x

    一、前言

    SciChart SDK v6.x有破解版的,至2099年到期,有水印。官方教程见:[SciChart WPF Documentation - Tutorial 01 - Referencing SciChart DLLs | WPF Chart Documentation](https://www.scichart.com/documentation/win/current/webframe.html#Tutorial 01 - Referencing SciChart DLLs.html)。

    二、2D Charts基础教程。

    1、引用DLL

    创建了WPF项目后,第一步就是要引用DLL,DLL位于SDK的安装目录下。
    在这里插入图片描述

    2、SciChartSurface

    需要引入命名空间:

    xmlns:sci="http://schemas.abtsoftware.co.uk/scichart"
    
    • 1
                    
                        
                            
                        
                        
                            
                        
                    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
            private string _chartTitle = "Hello SciChart World!";
            private string _xAxisTitle = "XAxis";
            private string _yAxisTitle = "YAxis";
    
            public string ChartTitle
            {
                get { return _chartTitle; }
                set
                {
                    _chartTitle = value;RaisePropertyChanged();
                }
            }
            public string XAxisTitle
            {
                get { return _xAxisTitle; }
                set
                {
                    _xAxisTitle = value;
                    RaisePropertyChanged();
                }
            }
            public string YAxisTitle
            {
                get { return _yAxisTitle; }
                set
                {
                    _yAxisTitle = value;
                    RaisePropertyChanged();
                }
            }
    
    • 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

    3、RenderableSeries

                    
    
                        
                            
                        
                        
                            
                        
                    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
     private readonly ObservableCollection _series = 
                new ObservableCollection();
    
    public ObservableCollection Series
            {
                get { return _series; }
            }
    
                var xyData = new XyDataSeries() { SeriesName="Series1"};
                for (int i = 0; i < 1000; i++)
                {
                    xyData.Append(i, Math.Sin(i * 0.02));
                }
    
                Series.Add(new LineRenderableSeriesViewModel
                {
                    DataSeries=xyData,
                });
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18

    4、Zoom和Pan

                        
                            
                                
                            
    
                            
                                
                            
                            
                                
                                    
                                
                            
    
                        
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18

    需要添加到ChartModifier中,其中有一个ModifierGroup.这里有很多行为可以添加.

    Modifier NameDescription
    MouseWheelZoomModifier鼠标滑轮进行缩放
    RubberBandXyZoomModifier鼠标画矩形进行放大
    XAxisDragModifier拖拽X轴,进行X轴的缩放
    YAxisDragModifier拖拽Y轴,进行Y轴的缩放
    ZoomExtentsModifier双击复原缩放为原始值
    ZoomPanModifier可以在XY方向上直接拖拽
    
                            
                                
                            
    
                            
                                
                            
                            
                                
                                    
                                    
    
                                    
                                    
                                    
                                    
                                
                            
                        
    
    • 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

    5、ToolTip和Legends

    
                            
                                
                            
    
                            
                                
                            
                            
                                
                                    
                                    
    
                                    
                                    
                                    
                                    
                                    
                                    
                                
                            
                        
    
    • 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

    6、实时更新

  • 相关阅读:
    服务效率飙升!2024最新Zoho Desk功能解析
    Jmeter的使用教程(安装)
    关于一个图算法的应用
    人工智能技术的应用前景:改变我们的生活和工作方式
    Java之Collections的综合小练习
    阿里云服务器上部署Flask
    uniapp实现登录组件之外区域置灰并引导登录
    分享5个和安全相关的 VSCode 插件
    Android Jetpack之Lifecycle的使用及源码分析
    R语言plotly可视化:plotly可视化箱图、并添加抖动数据点jitter(Adding Jittered Points)
  • 原文地址:https://blog.csdn.net/zhudaokuan/article/details/126252995