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
Hi,
This is a backlog feature for the CategoryDateTimeXAxis, but isnt present currently. It will currently always make the intervening time take up space.
One option that you have currently, if you want each data point to be displayed an equal space from the last, is to use the CategoryXAxis instead of the CategoryDateTimeXAxis, and just don't include data for any days that should be skipped. This will result in each datapoint appearing an equal space form the previous, and no gaps where days have been skipped. If you assign the date property to the label of the CategoryXAxis you will see dates (which you can format as you like) on the x axis.
Does that help? Or does it not meet some of your requirements? You could submit a feature request for the date skipping for the CategoryDateTimeXAxis, to be sure that we've logged your interest in the feature, but as I said, I believe it may already on the backlog.
-Graham
Hi Graham. Is this still on the backlog? We have an emerging requirement to skip weekends, but we have invested a lot of development effort in our CategoryDateTimeXAxis implementation and moving to a CategoryXAxis is not really viable.
As it stands, is there any way to simulate this behaviour in the current (11.2) XamDataChart? I don't mind getting my hands dirty :)
I have submitted a feature request for the same.
Many thanks
Ping Infragistics
I understand that statements like "on the backlog" are not a commitment to deliver a feature, but can we expect to see the ability to skip weekends with CategoryDateTimeXAxis anytime soon?
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?
You would also have to set the UnknownValuePlotting to dontPlot rather than linearInterpolate if using the double.NaN/null strategy.
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