I want to plot TimeSpan data on the x axis. For everything I have tried, XamDataGrid chokes on it. Is there a way to do it?
Bill
Hi Bill,
Could you please provide more information about the type of the chart and how do you want the TimeSpan to appears (string or some value) ? In case you are using Column chart and want to display the TimeSpan elements as labels on the x axis you can take a look at my sample project.
Hope this helps
Vlad
Vlad,
I downloaded your sample and looked at it in VS. My charts are ScatterLine. I don't think I can do what you did for your Column chart. Here is some relevant xaml from my project.
<igCA:Series ChartType="ScatterLine" Label="val1" DataSource="{Binding Path=''}" DataMapping="ValueX = timeSpan; ValueY = val1" />
"val1" is a DataColumn of type double. "timeSpan" is a DataColumn of type TimeSpan.
Is it possible for the X Axis to plot TimeSpan.Ticks as a double, and then have a ValueToDisplayTextConverter that would format Ticks to "days.hours:minutes:seconds.milliseconds"? Where in the class heirarchy can I find such a ValueToDisplayTextConverter?
I don't think this is possible because in your case ValueX is from long type and you are trying to format the string representation based on a TimeSpan value. However using DateTime values and the following example maybe helpful for your :
http://help.infragistics.com/Help/NetAdvantage/WPF/2008.1/CLR3.X/html/xamChart_Modifying_a_Date_Time_Axis.html