Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Using DateTime for X values of Scatter Plot (Read 6714 times)
DaveDeakins
YaBB Newbies
*
Offline



Posts: 15
Joined: Mar 5th, 2008
Using DateTime for X values of Scatter Plot
Mar 5th, 2008 at 3:14am
Print Post  
When populating a LineChart from a DataTable, is it possible to have the X values of the data points be DateTime values rather than integer or floating point numbers?  When I am trying to do this in my application, it appears that the LineChart component is trying to parse them as doubles and Iget a FormatException.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Using DateTime for X values of Scatter Plot
Reply #1 - Mar 5th, 2008 at 7:53am
Print Post  
Indeed, the control can handle only numerical data, although it can display date/times as labels. We will try to implement a version that can display time data as well - it should be ready today or tomorrow and I will upload it here. Until then, you could try converting the time data yourself, e.g. by creating a TimeSpan from the initial time to each date/time value, and passing the TimeSpan minutes or seconds as X values.

Stoyan
« Last Edit: Mar 7th, 2008 at 7:52am by Stoyo »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Using DateTime for X values of Scatter Plot
Reply #2 - Mar 6th, 2008 at 5:48pm
Print Post  
Hi,

This version should work fine with DateTime values:
https://www.mindfusion.eu/_beta/datetime.zip

Stoyan
  
Back to top
 
IP Logged
 
DaveDeakins
YaBB Newbies
*
Offline



Posts: 15
Joined: Mar 5th, 2008
Re: Using DateTime for X values of Scatter Plot
Reply #3 - Mar 7th, 2008 at 4:48am
Print Post  
Thank you.  That works much better now!
-Dave
  
Back to top
 
IP Logged
 
DaveDeakins
YaBB Newbies
*
Offline



Posts: 15
Joined: Mar 5th, 2008
Re: Using DateTime for X values of Scatter Plot
Reply #4 - Mar 8th, 2008 at 6:18am
Print Post  
As one extension to this new capability, is it possible to specify the StartDate that the XData is referenced to.  In some cases I may have a specific date that I want to be at the Y-axis (not just the earliest date in the data set).  For example, I may want to show a graph from Jan 1 to Jan 31, even though there are no actual data points until Jan 3.

Thanks,
-David Deakins
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Using DateTime for X values of Scatter Plot
Reply #5 - Mar 8th, 2008 at 9:41am
Print Post  
Sure, our developer is going to add some properties that let you specify the time interval corresponding to an axis. This should be ready in a few days and we'll post the updated version here.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint