This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Does anyone know if there is a binding variable that allow me to pause updates to graphs with live data? Thanks, Andy |
|
|
Hello Andy Live data is achieved by dynamically updating the items source. pausing updates to live data would be done by stopping updates to the items source. Or if you mean to keep the live data streaming in, but stop auto-updating the viewport, you'll need to set IsAutoViewPortEnabled of the XAxis to false before updating the items source, and then set it to true again after finishing the live data update. You may also need to bind to the ActualMinimum and ActualMaximum properties of the X axis so that you can control them yourself. Let me know if I've missunderstood the question. -Jason Fauchelle |
|
|
Hi Jason, Data will constantly come in but I don't want to stop the inflow of new data. I just want to pause the graph so its not showing anything until the user resumes it. I can work around this by storing the data into another variable and updating the item source when they're not paused but was wondering if there was something already built in to do it. I know this isn't on the same topic but instead of putting it into another thread I threw it in here. I noticed that for Line series, if I initialized the X min/max to NaN, the alternative X doesn't get updated or called with the right data. My Alternative X axis has a converter and the values going into it are always the default values. I've tried initializing the X min/max to actual numbers (min = 0, max = 2000) and it seems to fix the alternative X. But because my data set is dynamic in nature, I can't really do that. Could you check into this for me please? Thanks again, Andy |
|
|
Hello Andy Thanks for clarifying the dynamic data. The Chart will display whatever data you add to the ItemsSource. Unfortunately there is no feature to split the items source into which data is included. The approach you mentioned of storing the data that needs to be visualized in a separate collection than the full data is the best way to do implement this. Another alternative would be to implement a custom collection that has an index variable that limits what data is passed to the chart (vie the GetEnumerator and index implementations). If you need the data after that index in other parts of you application, you'd need to add methods or properties to get them. This could be a lot of work so would only be worth looking at if you find that 2 collections cause performance issues. Unfortunately I have not been able to reproduce your other issue. Setting the axis min/max values to NaN is supposed to put the axis into auto viewport mode. Try setting both the min and max to 0 instead. Setting both min and max to be the same is another signal to update automatically. If the problem remains, please send a repro project if it doesn't take long to create. -Jason Fauchelle |
|
|
Hi Jason, I was able to solve the first question. As for the second one where the alternative X axis doesn't seem to update I have gotten it to reproduce with the heatmap demo you provide. I have provided the changes below. Thanks again for the help. Andy MainWindow.xaml - modified it to have these
MainWindow.xaml.cs - modified setting the min/max to be a binding value and added getter/setter for them
|
|
|
Hello Andy Good to hear you've solved the first question. The reason why the code changes you posted doesn't work is probably because the bindings would not be resolved. Using the heatmap demo with your modifications, please set
at the end of the constructor of MainWindow so that the bindings will be resolved. Then you should see that the alternate X axis will correctly show the minimum and maximum values that you set. Could this be a similar issue in your application? If not let me know another way to reproduce the problem. -Jason Fauchelle |
|
|
Hi Jason, it didn't have the same behavior but I figured how to get it to work. Thanks again, ~ Andy |
|
|
Excellent, let me know if you ever have further questions about this. -Jason Fauchelle |
|