User (Legacy) Posted June 28, 2004 Report Share Posted June 28, 2004 Hi, I have found strange behaviour with ChartFX: 1. When inverting the axis, Min and Max are swapped. This is a bit confusing. I can also cause the chart to crash when I disable AutoScale and set the axis to inverted before passing data and not initializing Min and Max before, but after passing the data. Is there an order required when initializing axis properties? 2. SetScrollView and GetScrollView also swap min and max for an inverted axis. 3. SetScrollView sometimes does not work. I traced it down to a HitTest call in my MouseMove event handler. Calling UpdateSizeNow() after SetScrollView cured the problem. 4. I would like to set my data in the PrePaint event to avoid setting it for every data update. However, this can cause ChartFX to crash when the number of points have changed. Some more questions: I would like to synchronize another window with my plot, which means I have to trace zooming events. The only solution I found was to check for scroll view changes in a PostPaint event. Wonder if there is a more elegant way... Rgds, Frederik Siegmund Link to comment Share on other sites More sharing options...
Software FX Posted June 30, 2004 Report Share Posted June 30, 2004 > 1. When inverting the axis, Min and Max are swapped. This is a bit confusing. > I can also cause the chart to crash when I disable AutoScale and set the axis to inverted > before passing data and not initializing Min and Max before, but after passing the data. > Is there an order required when initializing axis properties? This is by design. If you disable AutoScale you are responsible for setting Min and Max, if you don't do it, you will get unexpected results. When Data is set, if AutoScale is true, the Min and Max will be calculated, so if you turn off AutoScale BEFORE setting the data it will have a different effect than if you do it afterwards. > 2. SetScrollView and GetScrollView also swap min and max for an inverted axis. By design. An is simply and axis where Min > Max. > 3. SetScrollView sometimes does not work. I traced it down to a HitTest call in my MouseMove event handler. > Calling UpdateSizeNow() after SetScrollView cured the problem. Can you provide a repro case ? > 4. I would like to set my data in the PrePaint event to avoid setting it for every data update. > However, this can cause ChartFX to crash when the number of points have changed. You can not make any changes to the chart during a Paint Event. This may cause another re-paint and you will end up in an infinite loop. What do you mean by "avoid setting it for every data update" ? The chart will only re-paint when you change a property to it, I do not understand why do you want to set the data during a Paint event. Can you please elaborate. > Some more questions: I would like to synchronize another window with my plot, which means I have > to trace zooming events You can track MouseDown and MouseUp events, using the Zoom property you can determine whether a zoom was performed during these. -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.