Pre loader

Problem with alignment of line annotations and major grid lines

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

0
0

Hello SciChart-Team,
we had the requirement to show the zero line when there are negative values ​​in the chart.
We noticed the following things, especially in connection with the main grid lines.
There are some side effects at certain sizes of the window:
When the gridlines are on(see screenshot 1):
1. Grid line and tick are not on the same level (Only for certain sizes)
2. The grid line and horizontal annotation line (green) are not aligned either (Only at certain sizes)
3. The axis line (defined via BorderThickness) is also not aligned with the grid line (regardless of the size of the control).And the bottom tick is never aligned with the major grid line

If the major grid lines are switched off, the zero annotation line is not aligned to the ticks for certain sizes of the control (see screenshot 2)

It looks like different algorithms were used to calculate the line position of the ticks, grid lines and line annotations.

The problem was detected on the monitor with 100% scaling. On a 4K monitor with scaling > 100%, the problem became even more apparent

Do you have any suggestion how to solve the problem?

I’ve attached a modified example project in which the behavior can be reproduced.

Regards
Silvester Schneidt

Version
6.4.0.13629
Images
  • You must to post comments
0
0

Hi Silvester

This looks like a 1-pixel rounding error. The ticks are drawn using a different technology (our bitmap/GPU rasteriser) to the annotations (WPF) so they may not match 100% in appearance. The gridlines & ticks should line up though.

I tried out your sample on a 4K monitor. Looks close to perfect to me.

  1. I didn’t see an annotation at zero line
  2. The gridlines do match the ticks… except for sometimes the max value here is 1px out

This was the only issue I saw:

enter image description here

… Oh I can see a very tiny deviation as you resize the window. Occasionally a tickline is 1px out.

TWo things to try

  1. Try setting UseLayoutRounding=True and SnapsToDevicePixels=True on every item in the visual tree (MainWindow, HistogramView, SciChartSurface).
  2. Try updating to the latest version of SciChart (6.5.1). We often minor visual fix bugs and issues and this may be one of them

Best regards
Andrew

  • Silvester Schneidt
    Thanks Andrew for the quick reply. I will try your suggestions and give feedback if it worked
  • You must to post comments
0
0

Hi Silvester,

I’m glad to inform you that we have included a fix for the reported issue in the recently published SciChart v8.0 release.
Here you can find more details regarding the new features and fixes provided with the latest release:
https://www.scichart.com/scichart-wpf-v8-0-released/

Please try it out and let us know your feedback.

With best regards,
Lex,
SciChart Technical Support Engineer

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.