Exemplo n.º 1
0
        public ChartPlotter(ChartPlotterSettings settings)
        {
            this.settings = settings;
            Loaded       += new RoutedEventHandler(ChartPlotter_Loaded);
            Binding c = new Binding();

            c.Source = this.LeftPanel;
            c.Path   = new PropertyPath("Width");
            c.Mode   = BindingMode.TwoWay;
            SetBinding(ChartPlotter.LeftPanelWidthProperty, c);
        }
Exemplo n.º 2
0
        void Page_Loaded(object sender, RoutedEventArgs e)
        {
            //Creating plotter without a legend and button navigation
            ChartPlotterSettings settings = new ChartPlotterSettings();
            settings.IsButtonNavigationPresents = false;
            settings.IsLegendPresents = false;
            mainPlotter = new ChartPlotter(settings);
            RootStackPanel.Children.Add(mainPlotter);

            //Adding legened to custom location
            legend = new Legend(mainPlotter);
            //Wrapper to provide easy usage of the legend if it is too big
            ScrollWraper wraper = new ScrollWraper(legend);
            RootStackPanel.Children.Insert(0,wraper);

            //Adding custom buttons to plotter hovering panel
            buttonAdd = new Button() { Content="Add random polynomial"};
            buttonAdd.Click+=new RoutedEventHandler(ButtonAddClick);
            buttonClear = new Button() { Content="Remove all charts"};
            buttonClear.Click +=new RoutedEventHandler(ButtonClearClick);
            StackPanel internalStackPanel = new StackPanel() { Orientation = Orientation.Vertical, Margin= new Thickness(5) };
            internalStackPanel.Children.Add(buttonAdd);
            internalStackPanel.Children.Add(buttonClear);
            mainPlotter.HoveringStackPanel.Children.Add(internalStackPanel);

            //Adding button navigation to custom location
            Microsoft.Research.DynamicDataDisplay.Navigation.buttonsNavigation n =
                new Microsoft.Research.DynamicDataDisplay.Navigation.buttonsNavigation(mainPlotter);
            RootStackPanel.Children.Add(n);

            //Adding some data to the plotter
            for (int i = 0; i < 10; i++)
                addRandomPolynomial();
            
            mainPlotter.FitToView();
        }
Exemplo n.º 3
0
        public ChartPlotter(ChartPlotterSettings settings)
        {
            this.settings = settings;
            Loaded += new RoutedEventHandler(ChartPlotter_Loaded);
            Binding c = new Binding();
            c.Source = this.LeftPanel;
            c.Path = new PropertyPath("Width");
            c.Mode = BindingMode.TwoWay;
            SetBinding(ChartPlotter.LeftPanelWidthProperty, c);

        }
Exemplo n.º 4
0
 public ChartPlotter(ChartPlotterSettings settings)
 {
     this.settings = settings;
     Loaded += new RoutedEventHandler(ChartPlotter_Loaded);
 }
Exemplo n.º 5
0
 public ChartPlotter()
 {
     settings = new ChartPlotterSettings();
     Loaded += new RoutedEventHandler(ChartPlotter_Loaded);
 }
Exemplo n.º 6
0
 public ChartPlotter(ChartPlotterSettings settings)
 {
     this.settings = settings;
     Loaded       += new RoutedEventHandler(ChartPlotter_Loaded);
 }
Exemplo n.º 7
0
 public ChartPlotter()
 {
     settings = new ChartPlotterSettings();
     Loaded  += new RoutedEventHandler(ChartPlotter_Loaded);
 }