Hello,
I am using xamDataChart for both WPF and Silverlight to display financial stocks history data. A distinguish feature of stocks data is that meaningful values do present on weekdays and no data is present for weekends. Other dates can have no data too for instance it is the stock is closed on public holidays. One of my requirements is put away any dates which have no data from the chart surface so that it would not occupy space that can be used by other data points. This approach assumes that a distance between data points is exactly 1 day (24 hours) in common except of the edge of each week.
Please notice how the dates are being displayed in the above screenshot. It shows June 3, and then June 6, skipping the 4th and 5th, and so it does for June 10 and June 14 skipping the 11th, 12th and 13th and so forth. And the distance between data points is exactly one day.
I am looking into having similar functionality in xamDataChart. I played around the CategoryDateTimeXAxis enough to have a feeling in that I can make the labels to skip the weekends by applying conditional formatting however it is not the same because the time series would still occupy the space. My another thought is to override GetScaledValue method in a way so that it would return the same scaled value for any point between Friday and Monday for instance.
My concern is if the above approach would ever affect the behavior time series so it would skip the weekends in a way that the requirement states.
Please let me know if hiding weekends functionality is possible to achieve using xamDataChart. I would appreciate if you provide any code snippets that would be very helpful.
Thanks!
Alexander
Again, we require this feature as well. It's supported by the legacy vendor's charting package and this is a showstopper if we can't implement the equivalent with Infragistics.
Hi - I know this is an old request, but we need the same thing. I can't find the feature request to vote on.
Has this feature been implemented?
Thanks Graham. Feature request submitted - twice :)
My requirement relates to the needs of traders looking at price development for markets which are not open on weekends (or public holidays). These days are simply irrelevant from a business perspective. So the scale needs to be linear in "business time". I would expect to be able to supply some kind of calendar to the chart to have precise control over which dates were omitted.
It is possible that some or all of my needs would be addressed by the CategoryXAxis, but I would need to manage the axis to include dates where data might not be available to preserve the linearity of the time scale. This would require substantial re-engineering of my existing solution because I rely heavily on X axis value scaling/unscaling for the extansions I have applied. I also need to explicitly manage the min/max values of the X axis because of the mechanism I use to load data on demand (i.e. when viewport touches an unpopulated region, load data in the background to seemlessly extend the data being displayed).
I can only justify a large refactoring effort such as this if CategoryDateTimeXAxis will never meet the weekend-skipping requirement. As it stands, this remains unclear.
HtD
You would also have to set the UnknownValuePlotting to dontPlot rather than linearInterpolate if using the double.NaN/null strategy.
Hi,
You can use a double.NaN value or a null value to create a discontinuity in the chart so that it will leave the weekend blank, but this will not cause the space taken up by the weekend on the axis to be omitted.
The current behavior of the CategoryDateTimeXAxis is that it is a linear scale, if you want the weekends removed in that way, it necessitates the scale being non linear, which is a muc more complex requirement.
As such, this is probably not something you could easily tack onto the existing functionality through extension. So it would merit a feature request.
The CategoryXAxis changes the assumption such that all data points are equally spaced, so if you omit weekends from the data, then they are also not represented on the axis. Which may provide the functionality you desire, but I assume that there was some reason that you did not want to go this way?
-Graham