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 Jason, We are using version 6.0 July 14, 2014 nightly build We have a bar graph with the Y-Axis values are (X-axis values are any double value range from -20000 to 20000.0):
In our data model, between each plots, we set the Y-Axis Minimum Value="newW2_STO(125, 175)" and Y-Axis' Maximum Value = "Maximum", when we reload the plot a few times (the values between first value and last value will change but the maximum and minimum value does not change), it will only show us a single bar, since the program internally set the y-axis' Minimum value to "Maximum" The following are the call stack from WpfElement:
Our release is going to be the next week, and the main library we are using is not working. We are extremely frustrated and worried. Please fix them.... |
|
|
Hello Gordon I'm not certain what the issue is here, but my guess is that the string values that you are plotting along the Y axis are compleatly different between plots, except for "Maximum" which is always present. By default, the chart axis will map strings to consecutive integers on a first come first served basis. In the list of strings that you posted, "Maximum" will be mapped to 70. After running some more plots, new strings will be assigned to consecutive strings 71, 72 73 and so on. At some point you may be setting minimum to be a string that has been mapped to a higher integer than 70. As a result the ChartAxis will set Minimum to equal Maximum because the ChartAxis has a constraint that Minimum can not be greater than Maximum as you may have seen at line 352. One solution may be to use a custom AxisValueConverter to tell the axis what order the labels should be in. This order would be updated each time new strings are plotted so that "Maximum" as always last. I think in previous repro projects that you sent, you were using such converter. Another option which is more of a kludge, is between plots, temporarily set the ValueConverter of the axis, and then set it back to whatever it used to be (null possibly). This will reset the strings mappings which may solve the problem. If I have misunderstood the issue, please send some screen shots, and if possible, list the contents of the internal ChartAxis.LabelMap at the time of the issue. -Jason Fauchelle |
|
|
Hi Jason, Between plot loads, I reset the converter if the values on the y-Axis is different. And between reloads, the number of Y-Axis value varies from 32 to 104, and the last element is always "Maximum" When changes from 104 to 32 the plots only show one bar as in image OneBarOnly.jpg which it should be showing as in SupposeToBe.jpg. We also change the Y-axis tick label fonts when it is more that 35 bars. If we did not change the fonts, it seemed ok. The LabelMap = null when I debug.... |
|
|
Hello Gordon Is this issue still a problem? I have not been able to reproduce this. Regarding the LabelMap being null, make sure you weren't looking at the label map of the X axis. Also, if you are using a converter on the Y axis, the LabelMap will also be null. If you are using a converter on the Y axis, please send the code as it may help to reproduce this. A simple repro project would also be a huge help. Not changing the fonts to resolve the issue sounds bizzare. If we are unable to reproduce and resolve this at our end, I hope that not changing the fonts will be suitable to fix this when you release the app soon. -Jason Fauchelle |
|
|
Hi Jason, the issue is still there. we did have a converter for y-axis and as said in the previous post, we change it any time the y-axis value is changed. I wish I will have time to give you a reproducing project, but I don't. every time before I re-load the graph, I have to set Y-axis Min/Max values to null before I set it to the right range. This hack seems fix the problem, but I am not very happy to put this kind hack at all. In fact if I have to put hack/trick in the code anywhere, I am not satisfied with my code at all. I will give you a list of things that we want to do but cannot with WPF elements after we release our products... Thanks, Gordon |
|