Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 具有大量数据点的TeeChart Colorgrid性能_C#_.net_Teechart - Fatal编程技术网

C# 具有大量数据点的TeeChart Colorgrid性能

C# 具有大量数据点的TeeChart Colorgrid性能,c#,.net,teechart,C#,.net,Teechart,我正在用Visual Studio Express[C#]编写一个应用程序,需要同时实时显示12个彩色网格[128 x 128] 以下是我设置图表的方式: tChart1.Aspect.View3D = false; tChart1.Aspect.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed; tChart1.Legend.Visible = false;

我正在用Visual Studio Express[C#]编写一个应用程序,需要同时实时显示12个彩色网格[128 x 128]

以下是我设置图表的方式:

        tChart1.Aspect.View3D = false;
        tChart1.Aspect.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed;
        tChart1.Legend.Visible = false;
        tChart1.Axes.Bottom.Title.Text = "R";
        tChart1.Axes.Bottom.SetMinMax(0, 127);
        tChart1.Axes.Bottom.Increment = 20;
        tChart1.Axes.Left.Title.Text = "D";
        tChart1.Axes.Left.SetMinMax(0, 127);
然后我像这样初始化颜色网格:

        for (int d = 0; d < 128; d++)
        {
            for (int r = 0; r < 128; r++)
            {
                ColorGrid.Add(r, 0, d);
            }
        }
在for循环之后,我调用:

        ColorGrid.BeginUpdate();
        ColorGrid.EndUpdate();
我目前有12个TChart控件,它们一起显示在一个窗体上

我还尝试将12个图表组合成一个大图表,将12个图表绘制成一个6x2的“子图”,这只会产生很小的性能差异

有没有一种方法可以通过以下方式获得10+fps:

12个独立的[128 x 128]图形或一个[128*6 x 128*2]图形

如果我有什么不清楚的地方,请告诉我:-)

多谢各位


JD改善彩色网格绘制时间是Steema愿望列表(TF02016286)中已经存在的一项功能请求

另外请注意,一般来说,随着绘制图表的点和元素(网格线、梯度等)的增加,绘制图表所需的时间也会增加。所以我不确定它是否能改进到你需要的程度

在您的示例中,我没有看到实现的技巧是隐藏ColorGrid笔。这将稍微提高性能:

ColorGrid.Pen.Visible = false;
另请注意
ColorGrid.BeginUpdate()
ColorGrid.EndUpdate()
被认为分别在清除和重新填充序列之前和之后调用,而不是在一起调用和在修改序列值之后调用

ColorGrid.Pen.Visible = false;