时间序列线图与图表控件 [英] Time Series Line Charts with Charting Controls

查看:126
本文介绍了时间序列线图与图表控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在绘制带有.NET图表控件的时间序列的折线图,X轴上有时间。数据样本通常是统一的时间间隔,但是,如果缺少数据,怎么能我确保X轴上的缩放反映了捕获数据的实际时间
,而不是实际存在的数据样本上的等级,有效地折叠了数据丢失的时间尺度(出现时间)作为处理时间序列数据的默认方式。)

I am drawing line charts of time-series with the .NET chart control, with time on the X-axis. Data samples are generally at uniform time intervals but, if there is missing data, how can I ensure that the scaling on the X axis reflects the actual time at which the data was captured, rather than a scale equidistanced on the data-samples actually present, effectively collapsing the time scale where the data is missing (which appears to be the default way of handling time-series data).

 

推荐答案

如果你的x值是数字或日期(无论如何都转换为OADate格式,也是一个数字),除非你明确地将Series.IsXValueIndexed属性设置为true,否则图表控件不会折叠比例。

If your x values are numbers or dates (which are converted to OADate format anyway, which is a number too), the chart control will not collapse the scale unless you explicitly set Series.IsXValueIndexed property to true.

如果您的x值是字符串或每个字符串为零,图表控件将自动索引x值,您将看到折叠行为。

If your x values are strings or every one of them a zero, the chart control will automatically index the x values and you'll see the collapsing behaviour.

请确保您实际上并没有在系列中添加字符串(或将Series.IsXValueIndexed属性设置为true,当然。)

Please make sure you're not actually adding strings to the series (or setting the Series.IsXValueIndexed property to true, ofcourse.)


这篇关于时间序列线图与图表控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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