Following the “How to Template the Axis Title” sample and using a simple TextBlock with TextWrapping=”Wrap” I am seeing strange resizing of the main chart elements especially with a scrollbar.
The attached image shows an example app (code available).
The first chart is normal (title clipped).
The second chart has the wrapping textblock and a scrollbar. The scrollbar is off the edge, the chart view area is off the edge. The entire axis label is still not visible (“Lorem ipsum dolor sit amet, consectetur”)
The third chart has no scrollbar so fits elements on the window, but still does not show all text.
The components creeping offscreen is the big problem I cannot figure out how to fix. Please
Note also happens in v7
- Dave Speight asked 4 months ago
- last edited 4 months ago
- Hi Dave, this requires a quick investigation (thank you for providing code). I will hand this over to the WPF team to get you an answer. Best regards, Andrew
- You must login to post comments
Hi Dave,
Thank you for reporting this.
I managed to reproduce this behavior on our side and logged it in our tracking system for further investigation.
We’ll get back to you as soon as we have an update.
With best regards,
Lex
SciChart Technical Support Engineer
- Lex answered 4 months ago
- You must login to post comments
Hi Dave,
I’m glad to inform you that the reported issue has been fixed, and the changes are available in the latest SciChart nightly build v7.0.2.27201.
Here is how to get it:
https://support.scichart.com/index.php?/Knowledgebase/Article/View/17232/37/getting-nightly-builds-with-nuget
Please try it out and let us know your feedback.
With best regards,
Lex
SciChart Technical Support Engineer
- Lex answered 3 months ago
- You must login to post comments
Thank you. This is an improvement but still something is breaking the view size. Legend and some other element(s) seem to break it when multiline axis titles are used.
Here is a shot working better. Then if you resize the window to be smaller, chart 2 and 3 still break, whereas chart 1 behaves correctly:
- Dave Speight answered 3 months ago
- last edited 3 months ago
- You must login to post comments
Hi Dave,
I’ve investigated the multiline axis title rendering and it doesn’t seem to be a SciChart related issue.
That’s the way how WPF behaves when measuring and arranging a rotated TextBlock with text wrapping. When TextBlock applies a RotationTransform and sets TextWrapping=Wrap, the WPF layout system ignores the desired TextBlock size and renders it cropped. In addition, this measurement and arrangement behavior affects the correct size and resizing of other controls located on the same panel. Please see the attached WPFMeasureArrange project which shows these issues. The project contains pure WPF code without any SciChart libs or references.
Since utilize WPF components inside SciChart, this behavior happens with all TextBlocks that are a part of SciChartSurface as well.
As a workaround, I recommend not using Axis Titles. Instead, you should use a stand-alone TextBlock control to mimic Axis Title. It should be placed in an outer (relative to the SciChartSurface) panel to prevent any resizing issues and impacting other panel controls. This layout structure will force the WPF layout system to properly measure and arrange the TextBlock. Please see the attached SciChartWorkaround project for more details.
Best regards,
Demien
SciChart Software Engineer
- Demien B. answered 3 months ago
- You must login to post comments
Please login first to submit.