private static void OnPointSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DataFollowChart chart = (DataFollowChart)d;

            PointsGraphBase previous = e.OldValue as PointsGraphBase;

            if (previous != null)
            {
                previous.VisiblePointsChanged -= chart.Source_VisiblePointsChanged;
            }

            PointsGraphBase current = e.NewValue as PointsGraphBase;

            if (current != null)
            {
                current.ProvideVisiblePoints  = true;
                current.VisiblePointsChanged += chart.Source_VisiblePointsChanged;
                if (current.VisiblePoints != null)
                {
                    chart.searcher = new SortedXSearcher1d(current.VisiblePoints);
                }
            }

            chart.UpdateUIRepresentation();
        }
        private static void OnMarkerTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DataFollowChart chart    = (DataFollowChart)d;
            DataTemplate    template = (DataTemplate)e.NewValue;

            FrameworkElement marker;

            if (template != null)
            {
                marker = (FrameworkElement)template.LoadContent();
            }
            else
            {
                marker = CreateDefaultMarker();
            }

            chart.Children.Remove(chart.marker);
            chart.Marker = marker;
            chart.Children.Add(marker);
        }
        private static void OnMarkerPositionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DataFollowChart chart = (DataFollowChart)d;

            chart.MarkerPositionChanged.Raise(chart);
        }