User (Legacy) Posted March 7, 2003 Report Posted March 7, 2003 Hi, I am having difficulty with your setscrollview function. I create a chart with data inserted wth the API, then I set the scroll view (chartfx.axis(axis_x).setscrollview chartfx.nvalues - 20, chartfx.nvalue). The problem occurs when I attempt to update a value of one of the last point (lngcount) in the chart : ChartFX.OpenDataEx COD_VALUES, COD_UNCHANGE, COD_UNCHANGE ChartFX.OpenDataEx COD_XVALUES, COD_UNCHANGE, COD_UNCHANGE ' '|| Pass the data in the order expected by Chart FX FE ' ChartFX.ValueEx(0, lngCount) = dblLow 'low 'ChartFX.ValueEx(1, lngCount) = dblOpen 'open ChartFX.ValueEx(2, lngCount) = dblTickBid 'close ChartFX.ValueEx(3, lngCount) = dblHigh 'high ' '|| Dates are passed in julian form using CDate Function ChartFX.XValueEx(0, lngCount) = CDate(dtDate) ' '|| Close the Communication Channels ChartFX.CloseData COD_VALUES Or COD_SMOOTH ChartFX.CloseData COD_XVALUES Or COD_SMOOTH Aftter this is called, the scrollview is destroyed and I am back to looking at hundreds of candlesticks. Is there a way to update data without being thrown out of the scrollview? Or maybe there is another way to do this without using setscrollview? Thanking you in advance, Chase Gale
Software FX Posted March 7, 2003 Report Posted March 7, 2003 No. ScrollView will be reset when new data is assigned as scaling may change completely and current scroll setting may make no sense. If your particular case ensures that the data range remains constant and therefore the current scroll view can be re-applied to the new data, you can simply call GetScrollView prior to OpenDataEx to retrieve the current values, then call SetScrollView after CloseData to re-apply these. -- FP Software FX, Inc.
User (Legacy) Posted March 10, 2003 Author Report Posted March 10, 2003 Yes, But then you have an odd effect - it zooms out and then a second later back in. Is there a way to prevent that from happening? Thanks, Chase Gale "SoftwareFX Support" <support@softwarefx.com> wrote in message news:YzPVuSP5CHA.3148@webserver1.softwarefx.com... > No. ScrollView will be reset when new data is assigned as scaling may change > completely and current scroll setting may make no sense. > > If your particular case ensures that the data range remains constant and > therefore the current scroll view can be re-applied to the new data, you can > simply call GetScrollView prior to OpenDataEx to retrieve the current > values, then call SetScrollView after CloseData to re-apply these. > > -- > FP > Software FX, Inc. > >
Software FX Posted March 10, 2003 Report Posted March 10, 2003 There will be no refresh, Paint doesn't occur until you yield control so if you do CloseData and immediately after you do SetScrollView you will get only one paint. -- FP Software FX, Inc.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.