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 There, One of our clients found the problem, when you put 4X4 chart into one page, so that the plot area is very small as showing in the screen capture image. One of the chart is flashing all the time, so it makes the UI thread super busy and the application is unresponsive. See the red-circled plot captured in 2 different times. I check our code, there is no dead loop happening, so it may be in your library when try to calculate the plot area perhaps??? we are using April 10, 2014 nightly builds, version 6.0 This is similar to this one, I guess. Sometimes, it will cost a lot to get reproducing project. Thanks, Gordon |
|
|
Thanks Gordon I was able to reproduce this problem, but only when the axis titles are using text-wrapping which was added recently. From your images, it looks like you are not using axis-title text-wrapping though. Without text wrapping I was unable to reproduce this problem, so I'm guessing it is quite rare. The rendering of the X axis relies on the final width of the Y axis, and the rendering of the Y axis relies on the final height of the X axis. In most cases this is no problem as the calculations stabilize in 3 axis render operations. It seems that when the available space is small, and there is a reasonable variation in the size of the axis labels, an impossible scenario can occur. The best solution I can think of for you is to set a MinWidth and MinHeight on each chart so that this scenario can not occur. When they are so small, they are somewhat unreadable, so specifying minimum dimensions should be fine. -Jason Fauchelle |
|
|
Hi Jason, Is this text-wrapping can be controlled? I download the most recently one and did not see the TextWrapping Property on Axis. As the testing project I sent to you off line. Without text wrapping it is still happening. Thanks, Gordon |
|
|
Hello Gordon The TextWrapping can not currently be controlled by a property, but it can be changed by creating a custom ChartAxis style. The default style now has text wrapping enabled in the nightly build that you downloaded. When using your repro project, I was using the latest WPF Elements dll which has text wrapping in the axes. I thought maybe the text wrapping was causing the issue and so temporarily removed it and then wasn't able to reproduce the problem any more. But then I noticed your images did not have text wrapping enabled, so it seems text wrapping can make it easier for this issue to occur but it is not the prime cause of the issue. (I have since been able to reproduce the issue in your project with no text wrapping). As I mentioned, the size of the X and Y axis is dependant on each other. Once the size of one axis changes, the size of the other axis will change and trigger a redraw of the axis. This redraw could then affect the size of the axis again such as if the size is now larger and so an extra label can be displayed which was not displayed before. This triggers the other axis to redraw which can continue the cycle if size changes continue to occur. In general, the height of the X axis should only need to be calculated once which then stabilizes the cycle. But with text wrapping enabled, the title can affect the height of the X axis which is why it is easier to reproduce this problem with text wrapping. When the chart is small enough, a large label on the Y axis can cause the X axis to be pushed completely off the view which causes the labels of the X axis to no longer be drawn which reduces the size of the X axis and thus feeds this cycle which is what is happening in your application. I have looked into this for quite some time but have not found a solution within the Chart control. For now, the only option I have come up with to solve this is for you to set the MinWidth and MinHeight values of each chart so that they can never be small enough for this to occur. -Jason Fauchelle |
|