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
|
Hello, Jason I have a little problem with IAxisValueConverter: there is red line around X Axis after application load. This happened after last components update (6.0.2532.23036). And I checked previous version (6.0.2385.22862) - it works fine. |
|
|
Hello Thanks for pointing this out. I will resolve this within the next couple of days. Jason Fauchelle |
|
|
Hello In the repro project you posted, the red line is being caused by the Minimum and Maximum bindings. The Minimum and Maximum properties of the ChartAxis are type object so that it can support many different types such as doubles, strings and dates. The type of value that these properties expect is based on the IValueConverter that you use. In the repro project you have a custom IAxisValueConverter that converts DateTime values. This means the ChartAxis is expecting DateTime values for the Minimum and Maximum properties. To solve this issue, change the Min and Max properties in MainWindow.xaml.cs to be DateTime properties. Then you can set the Min and Max properties directly to be DateTime values which is generally more convenient than setting numbers. Your custom value converter will then tell the chart how to interpret these DateTime values as plot positions. On a similar note, it is important that both methods in a custom IAxisValueConverter convert back and forth using the same logic. In the repro project, it looks like you are interpreting the axisPosition as the number of seconds in a DateTime, but then returning DateTime.Ticks in the GetAxisPlotPosition method. You'll want the GetAxisPlotPosition method to return the total number of seconds in the given DateTime to match your logic in the GetDataObjectAt method. Let me know if you need more help with IAxisValueConverter Jason Fauchelle |
|
|
Hello, Jason I have related question about LogarithmicAxisValueConverter: according to the "Minimum" property it based on double date type, but when I binded Minimum/Maximum property of Y Axis to double MinY/MaxY, I got the same error. Why this happens ? |
|
|
Thanks for pointing this out Yael There was a point in our LogarithmicAxisValueConverter that was returning 0 as an integer instead of a double which was causing this binding exception. This will be resolved in the next nightly build. Jason Fauchelle |
|