This is a migrated thread and some comments may be shown as answers.

Chart GridLines SnapToDevicePixels

1 Answer 75 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 06 Dec 2011, 12:28 PM
Hi Telerik,

Im currently styling the GridLines for my chart. The problem appears when I enable the GridLines with a strokethickness of 1. You now see some gridlines not snapping to the device pixels (which causes the gridline to be blurry or sharp).

This behavior is also apparent in your GridViewSample: http://demos.telerik.com/silverlight/#Chart/CustomGridLines

I've tried to customize the AxisStyles and setting SnapToDevicePixels, but this doesnt work.

Do you have a sample which fixes the blurry GridLines?

1 Answer, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 09 Dec 2011, 10:39 AM
Hello Marc,

Indeed, such blurring happens. The reason for this is actually a bug in the WPF framework, when the chart is nested in a more complex layout and the width of the grid lines is 1px. Presently, the framework does not allow a stable fix. If a snapping or clipping is used, there are some specific cases when the lines disappears. That is why we made some additional modifications to the control - they ensure that all elements are always visible - in some cases they may be slightly blurred, but they will be always visible. At present, there is no other option to handle this or work around this bug in the framework.

Best wishes,
Sia
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Chart
Asked by
Marc
Top achievements
Rank 1
Answers by
Sia
Telerik team
Share this question
or