User (Legacy) Posted September 12, 2002 Report Share Posted September 12, 2002 Hi, I am curious if there is a way that I can pass x and y values into a table at differing times. By this I mean that I am getting information from a source that gives me the X and Y data at different time and in different function calls( caching this data to write them together is not my problem ). The problem that I have run into is the fact that I do not know how to force ChartFx to not over write old points when I pass new ones in( which is why I currently use the COD_ADDPOINTS and COD_REALTIME flags to add data to charts that do not need X values. Is there a way to do this? I could store all the points and write them all at once, but that could potentially be a large amount of data to hold onto. Is there a way that I could keep track of the array index of XValueEX and ValueEx and then add point that way? Does OpenDataEx flush its data if not passed the COD_ADDPOINTS flag? Also what exactly does the COD_REMOVE flag do inside of the CloseData function? BTW I am using chartFx in VC++ w/o MFC. Thanks in advance. -Mac Link to comment Share on other sites More sharing options...
Software FX Posted September 13, 2002 Report Share Posted September 13, 2002 1) COD_ADDPOINTS is not supported for X-Values in Chart FX 5.x (Charts with X-Values can not use COD_ADDPOINTS), 2) Data is not removed when new data comes in, doing OpenData COD_VALUES, Series+1,Values+1 will keep all data as it was and will add 1 new point for each series, and one whole new series. But the data that was there will remain unchanged. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted September 13, 2002 Author Report Share Posted September 13, 2002 Question about the second part: Do I have to add all of the same point over again? From what I gather that you are saying I have a scenario like this: OpenDataEx( COD_VALUES, 2, 1 ) ValueEX[0][0] = NUM ValueEX[1][0] = NUM CloseData() //later OpenDataEx( COD_VALUES, 2, 2 ) //does this need to be done again? ValueEX[0][0] = NUM ValueEX[1][0] = NUM //Or can I just do this? ValueEX[0][1] = NUM ValueEX[1][1] = NUM CloseData() what I am trying to do is just add more points to the same amount of series.....is what I did correct? -Mac "SoftwareFX Support" <support@softwarefx.com> wrote in message news:QaGEC7yWCHA.3136@webserver1.softwarefx.com... > 1) COD_ADDPOINTS is not supported for X-Values in Chart FX 5.x (Charts with > X-Values can not use COD_ADDPOINTS), > > 2) Data is not removed when new data comes in, doing OpenData COD_VALUES, > Series+1,Values+1 will keep all data as it was and will add 1 new point for > each series, and one whole new series. But the data that was there will > remain unchanged. > > -- > FP > Software FX, Inc. > > Link to comment Share on other sites More sharing options...
Software FX Posted September 13, 2002 Report Share Posted September 13, 2002 No, you don't need to do it again, ValueEX[0][0] and ValueEX[1][0] will remain unchanged. This is easy proved by building a small test program with two buttons: Private Sub Command1_Click() ChartFX1.OpenDataEx COD_VALUES, 2, 1 ChartFX1.ValueEx(0, 0) = 10 ChartFX1.ValueEx(1, 0) = 20 ChartFX1.CloseData COD_VALUES End Sub Private Sub Command2_Click() ChartFX1.OpenDataEx COD_VALUES, 2, 1 ChartFX1.ValueEx(0, 1) = 30 ChartFX1.ValueEx(1, 1) = 40 ChartFX1.CloseData COD_VALUES End Sub You will see that data assigned in Command1_Click remains after doing Command2_Click. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted April 16, 2004 Author Report Share Posted April 16, 2004 In an old post you wrote: > 1) COD_ADDPOINTS is not supported for X-Values in Chart FX 5.x (Charts with > X-Values can not use COD_ADDPOINTS), > I should use ChartFX for creating charts with: 1) multiple series of samples (X,Y) 2) samples in different series having X values belonging to the same value range (e.g, real numbers from -1,234 up to 54,67) and always increasing Series Samples 1 (21, -1.2), (19, -1.13), (1, -1.05), (13, -1.01),(41, -0.3), (22, 7.2), (13, 8.56), (41, 9.3) 2 (21, -1.25), (19, -1.23), (1, -1.02), (13, 18.5), (41, 19.3), (22, 27.2), (13, 28.01),(41, 29.3) 3 (21, -1.09), (19, -1.03), (1, 1.05), (13, 1.71), (41, 5.3), (22, 7.21), (13, 8.01), (41, 19.3) Note that in different series, X values are independent. 3) I have to add samples in different chunks, ie., a first block of ten samples in a first step, a second block of 100 samples in a second block, and so on. 4) I want unlimited chart (i.e., i cannot foresee in advance how much samples i will manage, but if NSamples > MaxSamples i can throw an exception). The limitation you describe is still valid? Is there a workaround to reach the same result? Thank you in advance for your attention. Lroenzo Saladini INTEGRA Sistemi Link to comment Share on other sites More sharing options...
Software FX Posted April 16, 2004 Report Share Posted April 16, 2004 The limitation: > COD_ADDPOINTS is not supported for X-Values in Chart FX 5.x (Charts with > X-Values can not use COD_ADDPOINTS), Applies ONLY to real-time charts, charts with a circular buffer that scroll automatically as the buffer cycles. This restriction DOES NOT apply to regular charts. Also, in Chart FX 6.2, X-Values are supported in real-time charts. What platform are you sing ? (COM, .NET, Java ?) > 1) multiple series of samples (X,Y) Multiple series are supported. >2) samples in different series having X values belonging to the same value range (e.g, real > numbers from -1,234 up to 54,67) and always >increasing X-Values are independent by series. They can be the same for all series or different. Your choice. > 3) I have to add samples in different chunks, i.e.., a first block of ten samples in a first step, a > second block of 100 samples in a second block, and so on. Depending on what do you want to do with the old points as you add new ones, you may or may not need a real-time chart. If you are simply adding points "forever" not having a predetermined buffer size, you don't need Real-Time charts and therefore won't be affected by the restriction described above. Also, if you are using Chart FX 6.0 or higher, this restriction does not apply to you. > 4) I want unlimited chart (i.e., i cannot foresee in advance how much samples i will manage, > but if NSamples > MaxSamples i can throw an exception). You can add data to a chart a any time simply by increasing the number of points. For example: chart.OpenDataEx (COD_VALUES, <number of series>, <old number of values> + 100) ' Set he data for new 100 points (old points will remain untouched) chart.CloseData COD_VALUES -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.