Pre loader

Template Axis Label and Scrollbar Sizing

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

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

Version
v6
Attachments
Images
  • Andrew Burnett-Thompson
    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 to post comments
1
0

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

  • You must to post comments
1
0

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

  • You must to post comments
1
0

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:

Images
  • You must to post comments
0
0

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

Attachments
  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies