private static IEnumerable <FrameworkElement> DefaultLegendItemsBuilder(IPlotterElement plotterElement)
        {
            NewLineGraph lineGraph = (NewLineGraph)plotterElement;

            Line line = new Line {
                X1 = 0, Y1 = 10, X2 = 20, Y2 = 0, Stretch = Stretch.Fill, DataContext = lineGraph
            };

            line.SetBinding(Line.StrokeProperty, "Stroke");
            line.SetBinding(Line.StrokeThicknessProperty, "StrokeThickness");
            NewLegend.SetVisualContent(lineGraph, line);

            var legendItem = LegendItemsHelper.BuildDefaultLegendItem(lineGraph);

            yield return(legendItem);
        }
        private static void OnDataSourceReplaced(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            NewLineGraph owner = (NewLineGraph)d;

            owner.OnDataSourceReplaced((IPointDataSource)e.OldValue, (IPointDataSource)e.NewValue);
        }