how to link chart /graph with database c#

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ธ.ค. 2024

ความคิดเห็น • 4

  • @thekhanzzx3192
    @thekhanzzx3192 6 ปีที่แล้ว

    Assalm.0.Alayikum bhayi ap kaisy ho, bhayi c# chart kileai jo database connection coding hai, woh agr ap k pas data access class ya layer to us class ko yaha kaisi call krna hai aur phir chart kileai coding kaisi kringy!

  • @alanpm8268
    @alanpm8268 6 ปีที่แล้ว

    GRAPH (c #) WANT YOU TO CHANGE THE COLOR OF THE DIAMONDS AGAINST SQL SERVER VALUES
    This sounds like a traffic light when a button is clicked on to create a table, when the code and its colors go through a certain value that turns red.
    String sql = "select D_type_Spend, Price from type_spend";
    chart1.DataSource = Upload Data (sql);
    chart1.Series ["Series1"]. LegendText = "Cost per product";
    chart1.Series ["Series1"]. XValueMember = "D_type_Spend";
    chart1.Series ["Series1"]. YValueMembers = "Valuable";

  • @andresvillanueva5395
    @andresvillanueva5395 6 ปีที่แล้ว

    using System.Windows.Forms;
    using System.Windows.Forms.DataVisualization.Charting;
    SqlConnection con = new SqlConnection();
    con.ConnectionString = "";
    con.Open();
    SqlCommand cmd = new SqlCommand("Select vallue from val", con);
    SqlDataReader reader = cmd.ExecuteReader();
    Series sr = new Series();
    while (reader.Read())
    {
    chart1.Series[0].Points.AddY(reader.GetInt32(0));
    }