Chart GridLines SnapToDevicePixels

2 posts, 0 answers
  1. Marc
    Marc avatar
    6 posts
    Member since:
    Sep 2011

    Posted 06 Dec 2011 Link to this post

    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:

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

    Do you have a sample which fixes the blurry GridLines?
  2. Sia
    Sia avatar
    667 posts

    Posted 09 Dec 2011 Link to this post

    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,
    the Telerik team

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

  3. DevCraft banner
Back to Top