| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 
 | private void Compte_rendu_ventesForm_Load(object sender, EventArgs e)
        {
            // initialisation du NumericUpDown (année)
            AnneeNumericUpDown.Value = DateTime.Now.Year;
            AnneeNumericUpDown.Maximum = DateTime.Now.Year;
            annee = int.Parse(AnneeNumericUpDown.Value.ToString());
 
            // initialisation des combobox (pour le style)
            List<ComboBoxDataSourceClass> radar_style = new List<ComboBoxDataSourceClass>();
            radar_style.Add(new ComboBoxDataSourceClass("Area", "Zone"));
            radar_style.Add(new ComboBoxDataSourceClass("Line", "Ligne"));
            radar_style.Add(new ComboBoxDataSourceClass("Marker", "Marqueur"));
            RadarComboBox.DataSource = radar_style;
            RadarComboBox.DisplayMember = "GetName";
            RadarComboBox.ValueMember = "GetText";
 
            List<ComboBoxDataSourceClass> zone_style = new List<ComboBoxDataSourceClass>();
            zone_style.Add(new ComboBoxDataSourceClass("Circle", "Cercle"));
            zone_style.Add(new ComboBoxDataSourceClass("Polygon", "Polygone"));
            ZoneComboBox.DataSource = zone_style;
            ZoneComboBox.DisplayMember = "GetName";
            ZoneComboBox.ValueMember = "GetText";
 
            List<ComboBoxDataSourceClass> legende_style = new List<ComboBoxDataSourceClass>();
            legende_style.Add(new ComboBoxDataSourceClass("Circular", "Circulaire"));
            legende_style.Add(new ComboBoxDataSourceClass("Radial", "Radiale"));
            legende_style.Add(new ComboBoxDataSourceClass("Horizontal", "Horizontale"));
            LegendeComboBox.DataSource = legende_style;
            LegendeComboBox.DisplayMember = "GetName";
            LegendeComboBox.ValueMember = "GetText";
 
            /*List<reunir> lesVentesAnnuelles = new List<reunir>();
            double[] yValues = new double[];
            string[] xValues = new string[];
            // Populate series data
            for (int i = 0; i <= lesVentesAnnuelles.Count; i++)
            {
                //yValues[i] = lesVentesAnnuelles[i].
                //xValues[i] = lesVentesAnnuelles[i].
            }
 
            double[] yValues = { 65.62, 75.54, 60.45, 34.73, 85.42, 55.9, 63.6, 55.1, 77.2 };
            string[] xValues = { "France", "Canada", "Germany", "USA", "Italy", "Spain", "Russia", "Sweden", "Japan" };
 
            Categ_prod_ventesChart.Series["Series1"].Points.DataBindXY(xValues, yValues);*/
 
            // Set selection
            RadarComboBox.SelectedIndex = 0;
            ZoneComboBox.SelectedIndex = 0;
            LegendeComboBox.SelectedIndex = 0;
 
            UpdateChartSettings();
        }
 
private void UpdateChartSettings()
        {
            // titre de la page
            Titre_bilan_annuelLabel.Text = "Situation de votre entreprise pour l'année " + annee;
 
            // radar circulaire
            Categ_prod_ventesChart.Series["Series1"]["RadarDrawingStyle"] = ((ComboBoxDataSourceClass)(RadarComboBox.SelectedItem)).GetName;
            if (((ComboBoxDataSourceClass)(RadarComboBox.SelectedItem)).GetName == "Area")
            {
                Categ_prod_ventesChart.Series["Series1"].BorderColor = Color.FromArgb(100, 100, 100);
                Categ_prod_ventesChart.Series["Series1"].BorderWidth = 1;
            }
            else if (((ComboBoxDataSourceClass)(RadarComboBox.SelectedItem)).GetName == "Line")
            {
                Categ_prod_ventesChart.Series["Series1"].BorderColor = Color.Empty;
                Categ_prod_ventesChart.Series["Series1"].BorderWidth = 2;
            }
            else if (((ComboBoxDataSourceClass)(RadarComboBox.SelectedItem)).GetName == "Marker")
            {
                Categ_prod_ventesChart.Series["Series1"].BorderColor = Color.Empty;
            }
            Categ_prod_ventesChart.Series["Series1"]["AreaDrawingStyle"] = ((ComboBoxDataSourceClass)(ZoneComboBox.SelectedItem)).GetName;
            Categ_prod_ventesChart.Series["Series1"]["CircularLabelsStyle"] = ((ComboBoxDataSourceClass)(LegendeComboBox.SelectedItem)).GetName;
            Categ_prod_ventesChart.Series["Series1"].LegendText = "Ventes de l'année " + annee;
        } | 
Partager