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
- You must login to post comments
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.
- I didn’t see an annotation at zero line
- The gridlines do match the ticks… except for sometimes the max value here is 1px out
This was the only issue I saw:
… Oh I can see a very tiny deviation as you resize the window. Occasionally a tickline is 1px out.
TWo things to try
- Try setting UseLayoutRounding=True and SnapsToDevicePixels=True on every item in the visual tree (MainWindow, HistogramView, SciChartSurface).
- 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
- Andrew Burnett-Thompson answered 2 years ago
-
Thanks Andrew for the quick reply. I will try your suggestions and give feedback if it worked
- You must login to post comments
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
- Lex answered 12 months ago
- last edited 12 months ago
- You must login to post comments
Please login first to submit.