The Winforms Charting package of the XtraCharts Suite has always provided a comprehensive and advanced solution for visualizing data in your application. When it comes to financial charts, you can select to use OHLC or Candelstick charts to plot your data and then draw the necessary trend lines.
But what happens when you have real market data that excludes weekends and holidays? You end up with gaps in the chart that may look like this:
As requested in S33880, in the upcoming release of DXperience 2010.2, we have implemented the ability to exclude weekends, holidays as well as any other custom dates that should not be displayed on the chart. This is accomplished using the WorkdaysOnly property of an axis.
When set to ‘True’, weekends are automatically filtered out, and a WorkdaysOptions property collection becomes available for the axis.
The ExactWorkdays property allows you to specify days that are treated as workdays, even if they coincide with the holidays defined via the Holidays property, or weekends defined via the Workdays property. In other words, the days defined via the ExactWorkdays property have a priority over other properties settings, and are always represented in the axis range, as working days.
You can use the Workdays property to specify the standard business days within a week. This may come in handy if you are collecting or rendering data from a country where the standard work week might be slightly different.
The Holidays property allows you to specify holidays that should be filtered out. You have the option to manually add dates which should be treated as holidays.
Or, you may import an existing list of holidays in the DevExpress Scheduler (.xml) or Microsoft Office Outlook® (.hol) formats. So for example, if you use the “holidays.xml” file included in the demos installed with DXperience, you will be presented with the following dialog to select which holidays to import:
After excluding all the weekends and market holidays, the original chart will look like this:
To see a walkthrough of how this accomplished, check out the video on the DevExpress Channel: http://tv.devexpress.com/XtraChartsExcludeDays.movie