Esempio n. 1
0
        private void AddStackedColumnSeries(frmClassificationGraph pClassGraph, string strSeriesName, System.Drawing.Color FillColor, double[,] adblValues, int intStats, int intNfeatures)
        {
            try
            {
                var pSeries = new System.Windows.Forms.DataVisualization.Charting.Series
                {
                    Name              = strSeriesName,
                    Color             = FillColor,
                    BorderColor       = Color.Black,
                    IsVisibleInLegend = false,
                    ChartType         = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.StackedColumn,
                };

                pClassGraph.pChart.Series.Add(pSeries);

                for (int j = 0; j < intNfeatures; j++)
                {
                    pSeries.Points.AddXY(j, adblValues[j, intStats]);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this.Handle.ToString() + " Error:" + ex.Message);
                return;
            }
        }
Esempio n. 2
0
        private void AddVerticalLineSeries(frmClassificationGraph pClassGraph, string strSeriesName, System.Drawing.Color FillColor, double dblX, double dblYMin, double dblYMax)
        {
            try
            {
                var pSeries = new System.Windows.Forms.DataVisualization.Charting.Series
                {
                    Name              = strSeriesName,
                    Color             = FillColor,
                    BorderColor       = Color.Black,
                    IsVisibleInLegend = false,
                    ChartType         = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line,
                };

                pClassGraph.pChart.Series.Add(pSeries);

                pSeries.Points.AddXY(dblX, dblYMin);
                pSeries.Points.AddXY(dblX, dblYMax);
            }
            catch (Exception ex)
            {
                MessageBox.Show(this.Handle.ToString() + " Error:" + ex.Message);
                return;
            }
        }