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, I'm trying to use the logarithmic axis feature but it does not seem to work correctly. I'm not sure if I'm doing something wrong. Please find attach a word document with image of the plots. I have two plots "Plot 1" and "Plot 2". For both plots I set the Y-axis Min/Max and interval and the plot works fine. I have a dialog where the userchooses if the wish to use logarithmic scale. If the user selects to use the logarithmic scale and clicks apply I immediately apply the logarithmic option. I create a LogarithmicAxisValueConverter with the values for Base/Minimum/StartsFromZero as shown in the word document. The issue is:(please look at attached document for details) If I set "StartsFromZero = false" the point at (500, 0.8) for "PLOT 1" disappears. This seems to be because the log scale starts from 1.0. "Plot 2" seems to be okay even though the interval markings are not there. Note for logarithmic option we set the interval to 1. However in general the displays are consistent when navigating to and from the page displaying the chart. The points seem to get recreated when using the logarithmic scale. If I now set "StartsFromZero = true" the point at (500, 0.8) for "PLOT 1" DOES NOT disappears. And it initially looks fine. But if we navigate to and from the page displaying the chart then all of a sudden the points for "PLOT 2" are no longer shown when using the logarithmic scale. The points for "Plot 2" disappear but not the points for "Plot 1". "Plot 2" point have different range from "Plot 1". I don't know if this plays a role in the points disappearing. Is there something I'm missing? Am I using the combination different properties correctly? (i.e. Axis-Min Axis-Max Axis-Interval and the LogarithmicAxisValueConverter values Base/Minimum/StartsFromZero.) It's not clear how they are all inter-connected. Thank you Oscar p.s. I'm unable to upload the document. Is there an email I can send it to? p.s.s. Attachment is now there. I used Firefox and uploaded fine. Explorer had issues. |
|
|
Hello Oscar Thanks for contacting us about this, and apologies for the confusion here. The main confusion point for the logarithmic scale is that the equation never reaches zero, so what should the scale start at? This is the reason for adding the Minimum property on the converter, so that you can change the log scale to start at 0.001 for example. Some people prefer that the axis still starts at zero though, which is why we added the StartsFromZero option. So for Plot 1, the solution is simple. The Y value of the data point is 0.8. But the Minimum of the converter is set to 1, and StartsFromZero is false. So the Y axis starts at 1, and so the data point at 0.8 is not in the viewport. So solve this, either set StartsFromZero to true, so that the axis starts from 0. Or if you don't want the axis to start from 0, you can set the minimum of the converter to 0.1. The issue with Plot 2 is most likely the tick interval of the Y axis. The tick interval option does not currently use the converter to convert between Cartesian and logarithmic space. This is something that we can not currently add in as it would cause a breaking change. Try not setting the interval of the Y axis while the logarithmic converter is used and see if that helps. -Jason Fauchelle |
|
|
Hello, Thank you Jason for your reply. I tried your suggestions for Plot 2. I tried not setting the interval by putting it's value to 0.0 and letting the chart do the calculations. However it does not seem to work properly. Also the disappearing data is there for certain combinations specially when StartFromZero is true. Please see the attached document. I tried different scenarios. 1) I tried not setting the interval (i.e. I set the interval to 0.0 for the default behavior). And StartFromZero = false. In which case you get IMAGE 3 and IMAGE 4. I tried setting the Minimum to 0.01 but it didn't seem to start from there. I would have expected on the Y-Axis 0.01, 0.1. The numbers used in the plot don't seem clear that they are in a logrithmic scale. 2) IMAGE 5 and IMAGE 6 If I set the StartFromZero=true with Minimum=1 But with interval 1.0 or 0.0 I get two different scale which are not very useful. Also the data disappear upon reloading. 3) IMAGE 7 However if StartFromZero=true with Minimum=0.01 and interval 0.0. We get a plot similar to IMAGE 3 and IMAGE 4. Why? Especially if the Minimum should have no affect if StartFromZero is true. However in this case the data does not disappear. (Could you please look at this issue as soon as possible. Gordon and I are close to our release and wewould like to start stabilizing our product fairly soon.) Thank you for your patience and I appreciate your help. Oscar NOTE 1: Since yesterday I have done further investigation using your ScatterChart demo. (I have attached the xaml and .cs files.) I modified the demo to have a range of data similar to mine (YAxis - 0.04 to 0.08 XAxis - 0.0 to 65.0) I added the ability to switch the Y-axis between logarithmic and none logarithmic scale just like your logarithmic example. If I don't set the Minimum and Maximum values of the Y-Axis and turn on and off the logarithmic scale, the logarithmic scale looks great (just what we want). However for the none logarithmic scale the data is crowded at the bottom of the plot. If I then set my Y-Axis Minimum and Maximum to be 0.04 and 0.08. My none logarithmic scale view looks great the data is nicely spread out across the plot. However when I switch to the logarithmic scale the plot scale is horrible (similar to what seems to be happening to me). Currently we need to bind to the Minimum and Maximum values of the Axis so that i) we can get a nice distribution of the data point in the plot view and ii) let the user focus on the range of values they wish to see in the plot. (Hope this additional information and a more concrete example helps.) NOTE: 2 (June 26, 2014) I have further refined the ScatterChart demo and you can now manipulate the different values of the y-axis and see the effects when switching between the log and regular scales. Please find the changes in the new attachment ScatterAndBubbleCharts C.zip. I believe you can now reproduce the different scenarios I had in the initial document describing the behaviour in our application. |
|
|
Hello Oscar Thanks for all this information. First off, I need to take back something I mentioned earlier about not setting the interval. When using a logarithmic scale, I recommend always setting the interval to 1. This will generally provide the best values along the axis rather than displaying strange values with many decimal points. Apologies for pointing you down the wrong direction here. Setting the interval to 1 should solve a lot of the issues. Not that the Minimum value of the log scale does still make a difference when StartsFromZero is true. StartsFromZero is there to solve the issue that a log equation never reaches zero, but some people still want to display zero on the axis. The Minimum property is then used to set the first value (or next value after zero) to display on the axis. Numbers after the Minimum value then go up in logarithmic powers. In Image 5 and 6, you've set the Minimum of the log converter to 1. But 1 is far greater than the maximum Y data you've provided in the chart. I would recommend not setting the Minimum of the log converter to be larger or even close to the maximum of the Y axis. Set it to something closer to the minimum value of the data. I'm not sure if this will fully solve all the issues you've presented, but it should knock out the majority of them and make any remaining issues more clear. Let me know if you need help solving any remaining problems. -Jason Fauchelle |
|
|
Hello Jason, Thank you for your help. I'm using your suggestions and so far it seems to be working. I'll let you know if there are further issues. Thanks Oscar |
|