title: Change chart bars color in visual studio. C# Winforms
body: <p><a href="https://i.stack.imgur.com/qH7Y0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qH7Y0.png" alt="enter image description here"></a></p>
  
  <p>How to change those blue colors in design time? i found a method earlier but its only changing the color on the bars and not on the legend. </p>
  
  <p>This chart can show many data depending on the user so i need it to change color for all the data. Thank you</p>
  
  <p>code:</p>
  
  <pre><code>   private void loadchartFast()
      {
          chart1.Series[0].Points.Clear();
          chart1.ChartAreas["ChartArea1"].AxisX.Interval = 1;
          using (SqlConnection connection = new SqlConnection("Data Source=BENJOPC\\SQLEXPRESS;Initial Catalog=MARISCHELLdatabase;Integrated Security=True"))
          {          
              SqlCommand command = new SqlCommand("SELECT TOP 5 ProductName, Sum(QtySold) as QtySold FROM Sales_productholder group by ProductName order by SUM(QtySold) desc", connection); //top selling with desc
              connection.Open();
              SqlDataReader read = command.ExecuteReader();
  
              while (read.Read())
              {
                  this.chart1.Series["Pieces Sold"].Points.AddXY(read["ProductName"], read["QtySold"]);
  
              }
              read.Close();
             // chart3.Series["Pieces Sold"].Points[0].Color = Color.LightSeaGreen; ;
          }
      }
  </code></pre>