图表:仅绘制一系列的每N个数据 [英] Chart: Only plot every N data poing from a series

查看:95
本文介绍了图表:仅绘制一系列的每N个数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个面板中有一个图表,只有大约100个点很容易看到,至少在列之后,它变得块状且不可读。 我在每个图表中最多有4个系列,通常只有3个。 每个系列的大小相同,数据点数为200到600
。  X轴通常是时间,例如0到600秒或日期。 我有它的问题,惠斯特折线图工作正常,列和条是不可读的。目前它是自动缩放。

Hi, I have a chart in a panel and only around 100 points are easily visible, after that for column at least, it becomes blocky and unreadable.  I have upto 4 series in each chart, usually only 3.  Each series is the same size with from 200 to 600 data points.  X axis is usually time, 0 to 600 seconds for example or a date.  The problem I have it that whist line chart works fine, column and bar are unreadable. currently is it autoscaling.

所以我需要一些减少绘制的数据总量的数量。 每隔2到6个数据点仍会给出形状的整体印象。 如何在不损坏数据系列的情况下理想地执行此操作? 有没有办法循环并将
系列中的某些点写入图表?

So I need to some how reduce the number of datapouints plotted.  Every 2nd upto 6th data point will still give the overall impression of the shape.  How do I do this ideally without damaging the data series?  Is there a way to loop and write certain points of the series to a chart?

推荐答案

只是跳过这些点? ??即不要将它们添加到系列中。这将绘制每四个点:

Just skip the points ??? ie don't add them to the series. This will plot every fourth point:

  对于i As Integer = 0到最大步骤4

   For i As Integer = 0 To max Step 4

       Chart1.Series(" Channel 1")。Points.AddXY(x(i),y(i))

       Chart1.Series("Channel 1").Points.AddXY( x(i), y(i) )

  下一步

   Next



或者您可能需要根据您的具体情况更改值。


Or maybe you need to change the values depending on excactly what you are doing.



在此示例中,绘制每个第20个点并重新计算x轴比例。


In this example every 20th point is plotted and the xaxis scale is recalculated.

HTTPS:// social.msdn.microsoft.com/Forums/vstudio/en-US/ccff6fd9-3b36-4aa2-a9d4-ba3a56bae88f/how-to-draw-a-wav-chart-graph-with-real-time-postion-indicator? forum = vbgeneral

PS该示例还具有图表的缩放功能。根据您的约束条件,这可能会更好地适用于您的情况。

PS The example also has the zoom feature of the chart working. Maybe that will work better for your case again depending on exactly what your constraints are.


这篇关于图表:仅绘制一系列的每N个数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆