Colors incorrect as adding data to bar series in random ...
Posted: Tue Jun 10, 2008 7:12 am
Greetings,
I found that if I add data to bar series in radom order, the color of bars would not be in my expectation.
Did I misuse the bar series? Would you please help to check this? Thanks.
I found that if I add data to bar series in radom order, the color of bars would not be in my expectation.
Did I misuse the bar series? Would you please help to check this? Thanks.
Code: Select all
Private Sub mDrawBarInOrder(ByRef tchart As Steema.TeeChart.TChart)
Dim bar As New Steema.TeeChart.Styles.Bar()
bar.Add(0, 9, "item1", System.Drawing.Color.Red)
bar.Add(1, 10, "item2", System.Drawing.Color.Red)
tchart.Series.Add(bar)
End Sub
Private Sub mNOT_DrawBarInOrder(ByRef tchart As Steema.TeeChart.TChart)
Dim bar As New Steema.TeeChart.Styles.Bar()
bar.Add(1, 10, "item2", System.Drawing.Color.Red)
bar.Add(0, 9, "item1", System.Drawing.Color.Red)
tchart.Series.Add(bar)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.mDrawBarInOrder(TChart1)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Me.mNOT_DrawBarInOrder(TChart2)
End Sub