Dim dtPieChartData = New DataTable()
dtPieChartData.Columns.Add("Datum a čas")
dtPieChartData.Columns.Add("Plnění normy")
For Each row As DataGridViewRow In DataGridView1.Rows
Dim indexCategoryColumn As Integer = 0
Dim indexTotalColumn As Integer = 12
dtPieChartData.Rows.Add(row.Cells(indexCategoryColumn).Value, row.Cells(indexTotalColumn).Value)
Next
Chart3.DataSource = dtPieChartData
Chart3.Series("Series1").XValueMember = "Datum a čas"
Chart3.Series("Series1").YValueMembers = "Plnění normy"
Chart3.Titles.Add("Category Title")
Chart3.Series("Series1").ChartType = SeriesChartType.Line
Chart3.Series("Series1").IsValueShownAsLabel = True