G
Gtripodi
Guest
I am creating a chart on a tab-page dynamically. I set the 3rd argument of DataBindCrossTable to add as X values, and it is ignoring rows and I am not sure why..
With OperationTabPage
Dim DT As New DataTable
_FormMain.TCIPBS.Filter = "Assembly ='" & AssemNo & "' AND Operation ='" & .Name & "'"
DT = _FormMain.DSet.Tables("TCIP").DefaultView.ToTable
Dim ChartArea1 As DataVisualization.Charting.ChartArea = New DataVisualization.Charting.ChartArea()
Dim Legend1 As DataVisualization.Charting.Legend = New DataVisualization.Charting.Legend()
Dim ProcChart As New DataVisualization.Charting.Chart
With ProcChart
ChartArea1.Name = "ChartArea1"
.ChartAreas.Add(ChartArea1)
Legend1.Name = "Legend1"
.Legends.Add(Legend1)
.Palette = DataVisualization.Charting.ChartColorPalette.SeaGreen
.TabIndex = 0
.Text = "Chart1"
.DataBindCrossTable(DT.DefaultView, "Process", "MonthYear", "Operation", "")
.DataManipulator.GroupByAxisLabel("COUNT", "*")
.Dock = DockStyle.Fill
End With
.Controls.Add(ProcChart)
End With

Apr and May are missing and causing me much sadness
Live as if you were going to die today, learn as if you were going to live forever -Mahatma Gandhi
Continue reading...
With OperationTabPage
Dim DT As New DataTable
_FormMain.TCIPBS.Filter = "Assembly ='" & AssemNo & "' AND Operation ='" & .Name & "'"
DT = _FormMain.DSet.Tables("TCIP").DefaultView.ToTable
Dim ChartArea1 As DataVisualization.Charting.ChartArea = New DataVisualization.Charting.ChartArea()
Dim Legend1 As DataVisualization.Charting.Legend = New DataVisualization.Charting.Legend()
Dim ProcChart As New DataVisualization.Charting.Chart
With ProcChart
ChartArea1.Name = "ChartArea1"
.ChartAreas.Add(ChartArea1)
Legend1.Name = "Legend1"
.Legends.Add(Legend1)
.Palette = DataVisualization.Charting.ChartColorPalette.SeaGreen
.TabIndex = 0
.Text = "Chart1"
.DataBindCrossTable(DT.DefaultView, "Process", "MonthYear", "Operation", "")
.DataManipulator.GroupByAxisLabel("COUNT", "*")
.Dock = DockStyle.Fill
End With
.Controls.Add(ProcChart)
End With

Apr and May are missing and causing me much sadness
Live as if you were going to die today, learn as if you were going to live forever -Mahatma Gandhi
Continue reading...