1 2 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
| For i = 0 To Form16.DataGridView1.RowCount - 2
If Form16.DataGridView1.Rows(i).Cells(34).Value.ToString <> Form16.DataGridView1.Rows(i + 1).Cells(34).Value.ToString Then
Dim typ As String
typ = Form16.DataGridView1.Rows(i).Cells(34).Value.ToString.Substring(5, Form16.DataGridView1.Rows(i).Cells(34).Value.ToString.Length - 5)
Dim nbelmt As Integer
nbelmt = i + 1 - lastpos
Dim proptyp As Double
proptyp = Math.Round(nbelmt * 100 / Form16.DataGridView1.RowCount(), 2)
Select Case Form16.DataGridView1.Rows(i).Cells(34).Value.ToString.Substring(0, 3).ToString
Case "1.1", "1.2", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "3.1", "5.1", "5.3", "5.4", "5.6", "6.1", "6.2", "6.3", "7.1"
seriesb_1.Points.AddXY(typ, proptyp)
seriesb_1.Points(indexserie1).Label = proptyp & "%"
indexserie1 += 1
Case "4.1", "4.2", "4.3", "4.4", "5.2", "6.12", "6.4", "6.5", "6.6", "6.7", "6.8", "6.9"
seriesbb_1.Points.AddXY(typ, proptyp)
seriesbb_1.Points(indexserie2).Label = proptyp & "%"
indexserie2 += 1
End Select
lastpos = i + 1
End If
Next
chart_allocglobdet.ChartAreas(0).Name = "chart1"
chart_allocglobdet.ChartAreas(1).Name = "chart2"
chart_allocglobdet.ChartAreas(0).AxisX.Title = "Poche Taux"
chart_allocglobdet.ChartAreas(1).AxisX.Title = "Poche Actions"
seriesb_1.Color = Color.FromArgb(33, 63, 129)
seriesbb_1.Color = Color.FromArgb(33, 63, 129)
chart_allocglobdet.Series.Add(seriesb_1)
chart_allocglobdet.Series.Add(seriesbb_1)
chart_allocglobdet.Series(0).ChartArea = "chart1"
chart_allocglobdet.Series(1).ChartArea = "chart2"
chart_allocglobdet.Series(0).IsXValueIndexed = True
chart_allocglobdet.Series(1).IsXValueIndexed = True
chart_allocglobdet.ChartAreas(0).AxisX.MajorGrid.Enabled = False
chart_allocglobdet.ChartAreas(0).AxisX.Interval = 1
chart_allocglobdet.ChartAreas(1).AxisX.MajorGrid.Enabled = False
chart_allocglobdet.ChartAreas(1).AxisX.Interval = 1 |
Partager