Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>protected void Page_Load(object sender, EventArgs e) { Title tl = new Title("Players Score Card"); tl.Font = new System.Drawing.Font("vardana",12); //chrtGroup.Titles.Add(tl); //ChartArea a = new ChartArea("players"); //a.AxisX.Title = "Player's Yearwise"; //a.AxisY.Title = "Scores"; //chrtGroup.ChartAreas.Add(a); DataTable dt = new DataTable(); dt.Columns.Add("Years", typeof(int)); dt.Columns.Add("Afridi", typeof(int)); dt.Columns.Add("Akmal", typeof(int)); dt.Columns.Add("Nasir", typeof(int)); dt.Columns.Add("Shoib",typeof(int)); dt.Columns.Add("Hafiz", typeof(int)); Random rn = new Random(); for (int i = 1; i &lt; 10; i++) { DataRow dr = dt.NewRow(); dr["Years"] = "200" +i; dr["Afridi"] = 700 + rn.Next(200,800); dr["Akmal"] = 500 + rn.Next(200,800); dr["Nasir"] = 400 + rn.Next(200,800); dr["Shoib"] = 800 + rn.Next(300,500); dr["Hafiz"] = 200 + rn.Next(200, 900); dt.Rows.Add(dr); } Series afridi = new Series("Afridi"); Series akmal = new Series("Akmal"); Series nasir = new Series("Nasir"); Series shoib = new Series("Shoib"); Series hafiz = new Series("Hafiz"); afridi.IsValueShownAsLabel = true; akmal.IsValueShownAsLabel = true; nasir.IsValueShownAsLabel = true; shoib.IsValueShownAsLabel = true; hafiz.IsValueShownAsLabel = true; foreach (DataRow r in dt.Rows) { afridi.Points.AddXY(Convert.ToDouble(r["Years"]),Convert.ToDouble(r["Afridi"])); akmal.Points.AddXY(Convert.ToDouble(r["Years"]), Convert.ToDouble(r["Akmal"])); nasir.Points.AddXY(Convert.ToDouble(r["Years"]),Convert.ToDouble(r["Nasir"])); shoib.Points.AddXY(Convert.ToDouble(r["Years"]), Convert.ToDouble(r["Shoib"])); hafiz.Points.AddXY(Convert.ToDouble(r["Years"]), Convert.ToDouble(r["Hafiz"])); } chrtGroup.Series.Add(afridi); chrtGroup.Series.Add(akmal); chrtGroup.Series.Add(nasir); chrtGroup.Series.Add(shoib); chrtGroup.Series.Add(hafiz); chrtGroup.Legends.Add(new Legend("Afridi")); chrtGroup.Legends.Add(new Legend("Akmal")); chrtGroup.Legends.Add(new Legend("Nasir")); chrtGroup.Legends.Add(new Legend("Shoib")); chrtGroup.Legends.Add(new Legend("Hafiz")); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload