public List <DataValue> getPredictData(String shiYanNumber)
 {
     return(SelectData.getAllPredictValue(shiYanNumber));
 }
Exemplo n.º 2
0
        private void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                predictYData  = SelectData.getAllPredictValue("000051");
                predictY1Data = SelectData.getAllPredictValue("000052");
                predictY2Data = SelectData.getAllPredictValue("000053");
                predictY3Data = SelectData.getAllPredictValue("000054");

                colGrainPredict.MarkerType      = MarkerType.None;
                colGrainPredict.Thickness       = 5;
                colGrainPredict.ItemsSource     = predictYData;
                colGrainPredict.ValueMemberPath = "PredictData";
                colGrainPredict.XAxis           = categoryDateAxis;
                colGrainPredict.YAxis           = numericYAxis;
                colGrainPredict.Opacity         = 0.5;
                colGrainPredict.Visibility      = Visibility.Hidden;
                colGrainPredict.ToolTip         = colGrain.ToolTip;
                colGrainPredict.Brush           = new SolidColorBrush(Colors.Green);

                this.CategoryChart.Series.Add(colGrainPredict);



                colCornPredict.MarkerType      = MarkerType.None;
                colCornPredict.Thickness       = 5;
                colCornPredict.ItemsSource     = predictY1Data;
                colCornPredict.ValueMemberPath = "PredictData";
                colCornPredict.XAxis           = categoryDateAxis;
                colCornPredict.YAxis           = numericYAxis;
                colCornPredict.Opacity         = 0.5;
                colCornPredict.Visibility      = Visibility.Hidden;
                colCornPredict.ToolTip         = colCorn.ToolTip;
                colCornPredict.Brush           = new SolidColorBrush(Colors.Black);
                this.CategoryChart.Series.Add(colCornPredict);


                colRicePredict.MarkerType      = MarkerType.None;
                colRicePredict.Thickness       = 5;
                colRicePredict.ItemsSource     = predictY2Data;
                colRicePredict.ValueMemberPath = "PredictData";
                colRicePredict.XAxis           = categoryDateAxis;
                colRicePredict.YAxis           = numericYAxis;
                colRicePredict.Opacity         = 0.5;
                colRicePredict.Visibility      = Visibility.Visible;
                colRicePredict.ToolTip         = colRice.ToolTip;
                colRicePredict.Brush           = new SolidColorBrush(Colors.Chocolate);
                this.CategoryChart.Series.Add(colRicePredict);


                colTCCPredict.MarkerType      = MarkerType.None;
                colTCCPredict.Thickness       = 5;
                colTCCPredict.ItemsSource     = predictY3Data;
                colTCCPredict.ValueMemberPath = "PredictData";
                colTCCPredict.XAxis           = categoryDateAxis;
                colTCCPredict.YAxis           = numericYAxis;
                colTCCPredict.Opacity         = 0.5;
                colTCCPredict.Visibility      = Visibility.Hidden;
                colTCCPredict.ToolTip         = colTCC.ToolTip;
                colTCCPredict.Brush           = new SolidColorBrush(Colors.Blue);
                this.CategoryChart.Series.Add(colTCCPredict);

                categoryDateAxis.ItemsSource = predictYData;
                colCorn.ItemsSource          = predictY1Data;
                colRice.ItemsSource          = predictY2Data;
                colGrain.ItemsSource         = predictYData;
                colTCC.ItemsSource           = predictY3Data;


                numericXAxis.MinimumValue = 1;
                numericXAxis.MaximumValue = predictYData.Count;

                double[] high = new double[8];
                high[0] = getMax(predictYData);
                high[1] = getMax(predictY1Data);
                high[2] = getMax(predictY2Data);
                high[3] = getMax(predictY3Data);

                numericYAxis.MaximumValue = SelectData.getHigh(high) + 5;
            }
            catch (Exception e1)
            {
                MessageBox.Show(e1.Message);
            }
            labTitle.Content = "常温条件下当初始虫口密度为2头/kg时不同储存时间的储粮害虫米象种群数量预测情况";
            wheatePeatsZongQunHeader.miaoShu.Document = convertToBox.convertStringToFlowDocument(model2.chartMiaoShu);
        }