show big data point smartly

2 posts, 0 answers
  1. jzhou
    jzhou avatar
    7 posts
    Member since:
    Jul 2015

    Posted 27 Aug 2015 Link to this post


    I create a datatemplate for PointTemplate of LineSeries, each point will be displayed as a small image, it works and show the image.

    The problem is if there are a lot of points in a small area, all images are overlapped, see image1.

    Is it possible to hide the images when the points are too close, and show the image when zoom + and the points have a enough space to show (see image2)


  2. Petar Marchev
    Petar Marchev avatar
    996 posts

    Posted 31 Aug 2015 Link to this post


    There is no such a built-in feature that will allow you to do that.

    You can use custom logic to hide some of the point visuals. You can use a combination of the SizeChanged, ZoomChanged, PanOffsetChanged and DataBindingComplete events to run a custom method. In the method you can iterate all data points and check their LayoutSlots to see if they overlap. You can them set Opacity 0 to some of the data point visuals (GetDataPointVisual method of the series).

    Petar Marchev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top