User (Legacy) Posted May 3, 2002 Report Share Posted May 3, 2002 Greetings all, I'm evaluating ChartFX as a potential replacement for Webchart (since support is virtually nonexistent for that product), but I need some help replicating what I currently have, as well as figuring out new functionality. I have three questions right now regarding ChartFX. **************** Question 1 **************** Basically, my data table is set up like this: ItemID, Value, DateEntered So for a single series, I can just pull the data with a select, and use the chart's AdoResultSet method to chart the data (setting the DataType fields appropriately). However, I don't think I can use AdoResultSet for multiple items, because if I do a SELECT like this: Select ItemID,Value,DateEntered from MyTable Where ItemID in (3,4,5) Order by DateEntered Asc I will receive data like this: ItemID Value DateEntered 3 5.3 5/2/2002 10AM 4 3.6 5/2/2002 10AM 5 8.9 5/2/2002 10AM And so on. So what I have basically is that ItemID would be the series, Value is the Y value, and DateEntered is the X value. I've started to play with OpenDataEx, but I'm not quite sure how it works with dates. I can't seem to assign dates to the XValue property. **************** Question 2 **************** I am wondering exactly how missing data works. For example, if I have the following data: X Y 1 3 2 4 3 missing 4 3 5 6 I need to be able to plot that. Now, I know that using OpenDataEx, I can use CHART_HIDDEN to say that the value there is hidden. However, I would like the option of saying to either connect the dots (meaning that the line will be drawn from X=2 directly to X=4) *or* to break the line (meaning the line will break at X=2 and pick up again at X=4). Does ChartFX support both of these methods, and if so, how? And is missing data in an AdoResultSet supposed to be represented as NULL? That seems to be the case. **************** Question 3 **************** Let's say I'm graphing hourly data on the same graph as once a minute data. If they are graphable together (the correct scale), then I would have only 1 point of the first series for every 60 points of the second series. So looking at 24 hours worth of data, for example, I will have Series1 with 24 datapoints, and Series2 with 1440 datapoints. So looking at a snippet of the data, we might see this: Series1 Series2 Time missing 5.4 10:58 missing 6.3 10:59 6.1 6.3 11:00 missing 5.3 11:01 missing 6.7 11:02 I need to be able to plot this correctly as well (and hopefully have the lines all connect) without having to put CHART_HIDDEN in the other 59 points every hour. I'm hoping there's some magic in the functionality of COD_UNKNOWN and OpenDataEx that will help me here. If anyone could help me out here, it would be very much appreciated! The documentation isn't very good when it comes to these subjects. Thank you in advance for replying! David Terracino dterracino@NOSPAMhvc.rr.com Link to comment Share on other sites More sharing options...
Software FX Posted May 8, 2002 Report Share Posted May 8, 2002 Hello, Thank you for considering ChartFX as a suitable replacement. Q1) Yes you can pass multiple series of data using the ADO resultset. There is a limitation of 32 series when using datatype but it doesn't sound like this would be an issue for you (Please view this article on our support web site for more detail on this issue http://support.softwarefx.com/kb/134/1/176.htm) If I am understanding your question correctly then what you really want is to read the recordset as if you turned it on it's side. The default way ChartFX reads a recordset is to read it in a columnar format where each column represents a series of data. | | | | | | V V V ItemID Value DateEntered 3 5.3 5/2/2002 10AM 4 3.6 5/2/2002 10AM 5 8.9 5/2/2002 10AM But if you use the CHART_DS_TRANSPOSE flag of the DataStyle property then you can read the recordset where each row represents a series of data. ChartName.DataStyle = ChartName.DataStyle or CHART_DS_TRANSPOSE ItemID Value DateEntered ~~~~> 3 5.3 5/2/2002 10AM ~~~~> 4 3.6 5/2/2002 10AM ~~~~> 5 8.9 5/2/2002 10AM Q2) and Q3) ChartFX interprets missing values in the recordset as Chart_Hidden. ChartFX will not connect the line when this occurs but with some extra scripting on your part then there is way to get around this. Instead of pass the data to ChartFX using ADOResultSet you could manually pass the data using the OpenDataex method in conjunction with the ValueEX and XValueEX properties. You would create a script where you would manually loop through the recordset and pass the contents of the recordset to ChartFX. If you came across a Null value in a cell then you would skip this entry increment a variable that would act as counter and continue through the recordset. When you reached the end of your recordset then you would pass as many Chart_Hiddens as your counter variable had incremented. Let me know if you would like me to send you a sample that demonstrates this. Justin Trask Software FX Tech. Support Support@SoftwareFX.com 561-392-2023 "Dave Terracino" <dterracino@NOSPAMhvc.rr.com> wrote in message news:EFOgZas8BHA.2884@webserver1.softwarefx.com... > Greetings all, > > I'm evaluating ChartFX as a potential replacement for Webchart (since > support is virtually nonexistent for that product), but I need some help > replicating what I currently have, as well as figuring out new > functionality. I have three questions right now regarding ChartFX. > > > **************** > Question 1 > **************** > Basically, my data table is set up like this: > > ItemID, Value, DateEntered > > So for a single series, I can just pull the data with a select, and use the > chart's AdoResultSet method to chart the data (setting the DataType fields > appropriately). However, I don't think I can use AdoResultSet for multiple > items, because if I do a SELECT like this: > > Select ItemID,Value,DateEntered from MyTable Where ItemID in (3,4,5) Order > by DateEntered Asc > > I will receive data like this: > > ItemID Value DateEntered > 3 5.3 5/2/2002 10AM > 4 3.6 5/2/2002 10AM > 5 8.9 5/2/2002 10AM > > And so on. So what I have basically is that ItemID would be the series, > Value is the Y value, and DateEntered is the X value. I've started to play > with OpenDataEx, but I'm not quite sure how it works with dates. I can't > seem to assign dates to the XValue property. > > **************** > Question 2 > **************** > I am wondering exactly how missing data works. For example, if I have the > following data: > > X Y > 1 3 > 2 4 > 3 missing > 4 3 > 5 6 > > I need to be able to plot that. Now, I know that using OpenDataEx, I can use > CHART_HIDDEN to say that the value there is hidden. However, I would like > the option of saying to either connect the dots (meaning that the line will > be drawn from X=2 directly to X=4) *or* to break the line (meaning the line > will break at X=2 and pick up again at X=4). Does ChartFX support both of > these methods, and if so, how? And is missing data in an AdoResultSet > supposed to be represented as NULL? That seems to be the case. > > **************** > Question 3 > **************** > Let's say I'm graphing hourly data on the same graph as once a minute data. > If they are graphable together (the correct scale), then I would have only 1 > point of the first series for every 60 points of the second series. So > looking at 24 hours worth of data, for example, I will have Series1 with 24 > datapoints, and Series2 with 1440 datapoints. So looking at a snippet of the > data, we might see this: > > Series1 Series2 Time > missing 5.4 10:58 > missing 6.3 10:59 > 6.1 6.3 11:00 > missing 5.3 11:01 > missing 6.7 11:02 > > I need to be able to plot this correctly as well (and hopefully have the > lines all connect) without having to put CHART_HIDDEN in the other 59 points > every hour. I'm hoping there's some magic in the functionality of > COD_UNKNOWN and OpenDataEx that will help me here. > > > > If anyone could help me out here, it would be very much appreciated! The > documentation isn't very good when it comes to these subjects. Thank you in > advance for replying! > > David Terracino > dterracino@NOSPAMhvc.rr.com > > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.