在VB.NET图表中显示特定日期 [英] Displaying specific dates in a VB.NET Chart
本文介绍了在VB.NET图表中显示特定日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下午好,我有一系列图表,在X轴上显示日期,但我想只显示每个月的第1天和第15天。 我已经浏览了整个互联网,但一直无法找到答案。
Good afternoon, I have a series of charts that in the X-Axis shows the dates but I would like to show only the 1st and 15th day of every month. I have looked all over the internet but have not been able to find answers to that.
任何人都可以让我知道我该怎么做吗?
Can anyone let me know how I can do that?
谢谢
推荐答案
我来了随之而来的是它按月分列第一或第15。也许你可以为它们玩它。
I came up with this it sets first or 15th by month. Perhaps you can play with it for both.
Chart1.ChartAreas(0).AxisX.Interval = 1
Chart1.ChartAreas(0).AxisX.IntervalType = DateTimeIntervalType.Months
'Chart1.ChartAreas(0).AxisX.IntervalOffset = 0 'start on first
Chart1.ChartAreas(0).AxisX.IntervalOffset = 14 'start on 15th
Chart1.ChartAreas(0).AxisX.IntervalOffsetType = DateTimeIntervalType.Days
PS我想你有这个吗?
PS I assume you have this?
https://code.msdn.microsoft.com/Samples-Environments-for-b01e9c61
https://code.msdn.microsoft.com/Samples-Environments-for-b01e9c61
这篇关于在VB.NET图表中显示特定日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文