Exemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            // gets the name of the button
            attName = (sender as Button).Content.ToString();
            graphViewModel.VM_AttUserChoose = attName;
            corrName = graphViewModel.FindCorralativeFeature(attName);
            graphViewModel.VM_corralative = corrName;

            //setting up 3 plot models - attPlot
            graphViewModel.SetUpModel(graphViewModel.VM_AttPlotModel);
            graphViewModel.VM_AttPlotModel.Series.Clear();
            graphViewModel.LoadLineDataGraph(graphViewModel.VM_currLine, Attpv, graphViewModel.VM_attChooseFloatList, graphViewModel.VM_AttPlotModel);
            attPlot.InvalidatePlot(true);
            //corrPlot
            graphViewModel.SetUpModel(graphViewModel.VM_CorrPlotModel);
            graphViewModel.VM_CorrPlotModel.Series.Clear();
            graphViewModel.LoadLineDataGraph(graphViewModel.VM_currLine, Corrpv, graphViewModel.VM_corrFloatList, graphViewModel.VM_CorrPlotModel);
            corrPlot.InvalidatePlot(true);
            //regLine or minCircle plot
            graphViewModel.SetUpModel(graphViewModel.VM_RegLinePlotModel);
            graphViewModel.VM_RegLinePlotModel.Series.Clear();
            if (vmCon.isRegLine)
            {
                graphViewModel.LoadScatterGraphData(graphViewModel.VM_currLine, RegLinepv, graphViewModel.VM_attChooseFloatList, graphViewModel.VM_corrFloatList, graphViewModel.VM_RegLinePlotModel);
            }
            if (vmCon.isCircel)
            {
                graphViewModel.LoadCircleGraphData(graphViewModel.VM_currLine, RegLinepv, graphViewModel.VM_attChooseFloatList, graphViewModel.VM_corrFloatList, graphViewModel.VM_RegLinePlotModel);
            }
            LRPlot.InvalidatePlot(true);
        }