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
|
WpfElements (9/19/2012 nightly build) Hello, I have a couple of questions about the charts. I attach the source files of my test project. Bar chart
Polar chart
Regards, Tomas |
|
|
Hello Tomas Bar chart 1) Thanks for the demo, this helped me track down this issue. This was a bug in the axis logic which has now been resolved. You can download this fix through the next nightly build. The next nightly build will be available at around 1200 GMT (about 8 hours from now). Nightly builds can be downloaded from the downloads page: http://www.mindscapehq.com/products/wpfelements/nightly-builds. 2) The axis automatically calculates the min and max values based on the data of all the series you display. In your demo, the LineSeries was going an extra 0.5 logical units in both directions. This was causing the maximum of the axis to be 1 larger than the number of bars. The labels are displaying the data objects extracted from the bar data, but since there isn't a bar right at the end, it just falls back to displaying a suitable numerical value. In this case, 32. One way to solve this is to change the X value of the end of the line series. Another option is to set the Maximum of the X Axis to be 31. And a third option would be to replace the line series with a StripeLine. Here is an example:
Here I have added a StripeLine instance to the Chart.ForegroundElements collection. The StartValue sets where to render the line against the Y axis. I've styled it to look the same as the LineSeries you are using. Advantages of using a StripeLine in your scenario: It doesn't effect the axis calculations. You don't need to worry about adding 0.5 to each end of the line to work around the axis padding. You can set the Content property of the StripeLine to display a label. The disadvantage is that it does not appear in the legend. 3) We currently don't have a way to display labels for minor tick marks. I have noted this down as something we might add in a future version. One thing you could do is set the YAxis.MajorTickSpacing to 0.25, and maybe don't display minor tick marks. Polar chart 1) Unfortunately this is not currently possible as the axis labels currently only display strings. This is definitely something we will improve in the next version. For now, one thing you could do is implement the ToString method on your model object to create a string that you can decode into the various bits of information. Then you can use converters to read the string and display the appropriate values. The down side of this is the bindings won't update if your values change dynamically. Let me know if you have further questions. Jason Fauchelle |
|
|
Hello Jason, thank you very much for your answer, it helped me a lot. I can confirm that the bug in the axis logic (issue 1) has been resolved successfully. Tomas |
|
|
Hello Tomas We've just released WPF Elements 6.0. In this version, the axis labels contain the actual data values rather than just the formatted string values. In the label template, binding to the Label property will get the raw data value of the label. This helps you out with the question you originally asked about polar charts. This version also has performance improvements and other additions to the Chart control. As you are a WPF Elements customer, you can get version 6.0 for free from your account page: http://www.mindscapehq.com/store/myaccount Jason Fauchelle |
|