Blog Archives

Bar Chart random color in asp.Net

Display bars in random colors: IDictionary<string, int> list= new Dictionary<string, int>(); list.Add(“Val 1”, 90); list.Add(“Val  2”, 89); list.Add(“Val 3”, 50); list.Add(“Val 5”, 87); chrtBar2.Series[“Categories”].XValueMember = “key”; chrtBar2.Series[“Categories”].YValueMembers = “value”; chrtBar2.ChartAreas[“MainChartArea”].AxisX.MajorGrid.Enabled = false; chrtBar2.ChartAreas[“MainChartArea”].AxisX.MajorTickMark.Enabled = true; chrtBar2.ChartAreas[“MainChartArea”].AxisX.MinorGrid.Enabled = false; chrtBar2.ChartAreas[“MainChartArea”].AxisX.MinorTickMark.Enabled =

Tagged with: , , ,
Posted in .Net, Asp.Net, C#
Top Rated

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Blog Stats
  • 29,596 hits