Quantcast
Viewing all articles
Browse latest Browse all 27059

VS 2008 Setting colors in MS Chart question

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!

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")


Viewing all articles
Browse latest Browse all 27059

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>