I was wondering if the following features are possible with the NetAdvantage line chart, and if so how to use it.We use line charts to show a variable amount of data across a variable time domain. For instance, 3 years worth of patient temperature data. In some periods, 1 measurement per month can have been recorded. In another period, a measurement would have been done every 2 hours. The user looking at the graph might be interested in the 3-year trend, or the data of the last 48 hours. Exactly how much data each patient has and the timespan in which it occurs differs for each patient. The user is presented with the entire data set, and will do plenty of zooming and scrolling.One problem we run into is how to present the x-axis labels. We need:1. Dynamic x-axis text labels. When looking at a timespan of 3 years we do not want the time included in the text label. When looking at a timespan of hours, we do not want to repeat the date in each x-axis label.2. Visual grouping of parts of the x-axis, so that we can for instance specify the date only once for multiple ticks that occur on that date (but at different times). Something like the attached (google) example. How the grouping occurs should be dynamic and depend on zoom level (i.e. days, weeks, months, years).
Preferably we would use a purely declarative method (we use MVVM and try to keep the code behind to a minimum), we want to avoid having to do this programmatically.Are the described scenarios possible with NetAdvantage? Is there documentation describing how to do this?
Thanks for the example Rob, your example works as advertised. Unfortunately, CategoryXAxis requires all series on the chart to have all x-values "aligned", so if I have two series that do not have completely matching times for the x-axis data, the second series will not be rendered (see http://es.infragistics.com/community/forums/p/38082/220246.aspx). I tried to drop in a CategoryDateTimeXAxis in the example since it allows "non-aligned" x-values but that doesn't work - for example, simply changing this:
<igChart:CategoryXAxis x:Name="xAxis" ItemsSource="{StaticResource data}">
to this:
<igChart:CategoryDateTimeXAxis x:Name="xAxis" ItemsSource="{StaticResource data}" DateTimeMemberPath="Date">
does not work. Any suggestions on how to alter your example for this type of X-Axis?
Since the time Graham posted that code we have made some changes to how axis are rendered so that is the likely reason why the code no longer works. I updated the code to work with 15.1 now. Check out my attached sample.
I am using v15.1 and having the same issue as Paril in the comment above. Any ideas as to why DataLabel's aprent is NULL?
I am attempting to run sample using xamDataChart v11.2 but causes an exception at runtime. The "DateLabel" template Parent is null and hence the GetSortedLabels function cannot be executed.
Any ideas anybody?
Hmm...
I don't seem to be experiencing this. Is there anything else you can tell me to help me reproduce the problem?
-Graham