Hello,
I have seen how to set the palette color for a series in a chart and it works. But below when I use DataBindTable I cannot set any of the properties for the chart. I didn't know if I use Chart1.Series(0) which isn't working or what. Can someone tell me how to change the chart properties using this method to bind the data? Thanks!
I have seen how to set the palette color for a series in a chart and it works. But below when I use DataBindTable I cannot set any of the properties for the chart. I didn't know if I use Chart1.Series(0) which isn't working or what. Can someone tell me how to change the chart properties using this method to bind the data? Thanks!
Code:
Dim myTopCommand As SqlCommand = New SqlCommand("SELECT [Prod One],[Prod Two],[Prod Three],[Salesman] FROM Demo1 Order By Salesman", MyConnection)
MyConnection.Open()
Dim dr As SqlDataReader = myTopCommand.ExecuteReader()
Chart1.Series(0).Palette = ChartColorPalette.Chocolate
Chart1.Series(0).ChartType = SeriesChartType.Column
Chart1.Series(0).Label = "aaa"
Chart1.DataBindTable(dr, "Salesman")