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
|
Hi, We are currently evaluating your WPF chart control and so far we are very pleased with it. We have a few questions that we would like to ask you though.
Best regards |
|
|
Hello and thanks for evaluating our WPF chart control. It is great to hear that you are pleased with it.
Jason Fauchelle |
|
|
Hello Jason and thank you for answering so quickly Regarding question 1. Do you have an example of when you dynamically add AlternativeYAxes and still stick to the MVVM convention? Since AlternativeYAxes can't be bound and we don't want to access the Graph directly from code if possible. Best regards |
|
|
Hello I don't have an example for this specifically, but here is a link to a similar problem to this: http://blog.functionalfun.net/2009/02/how-to-databind-to-selecteditems.html Basically, you create an attached property that contains the logic for syncing an observable collection to another collection. On your model, you could have an observable collection that provides the alternative axis information. In xaml you'd use the attached property on the Chart control to bind to the property on the model that provides the observable collection. Within this attached property, you'd hook into the observable collection, and when it changes, update the alternative axis collection of the Chart control which you'll have access to within the attached property. This does mean the chart is being manipulated in code, but it is all nicely wrapped up in an attached behaviour which is the most MVVM solution to this scenario that I know of. Give this a go, and let me know if you need help with this. Jason Fauchelle |
|
|
Hello Jason Thank you so much. This helped me to solve the problem. I have some other questions. The placing/spacing of the graphs horizontal minor tickmarks behaves weird. I've attached a cropped screenshot that illustrates the problem. The lines are not evenly spaced. I've also discovered that when zooming in the graph using the zoombox, it looses the values on the X-axis and the lines disappears. Even if you zoom out again, the lines are gone. I also wonder if one can turn off the automatic horizontal scaling of the graph. We want to be able to show a certain timespan even if there are no values in the plotted series for that timespan. Our graph always crops the timespan after the plotted values. Best regards. |
|
|
Hello It sounds like you may not have the latest build as these issues should be resolved. You can get the latest build from here: http://www.mindscapehq.com/products/wpfelements/nightly-builds. This build is updated every night which means you can get bug fixes and new features very rapidly, even for the trial version. You can override the automatic axis range by setting the Minimum and Maximum properties of the X axis manually. In your case you'd set these to be DateTime values. Jason Fauchelle |
|