با سلام خدمت دوستان
من میخوام توی وب فرم یدونه چارت که دیتاشو از دیتابیس میخونه بسازم کد زیر رو وارد کردم ولی صفحه به صورت خالی نمایش داده میشه کسی میدونه مشکل کجاست که نشون داده نمیشه

کد HOME.ASPX
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">
<title></title>
<script src="scripts/Chart.js"></script>
<script src="scripts/jquery-3.4.1.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Literal ID="itchart" runat="server">


</asp:Literal>
</div>
</form>
</body>
</html>




کد HOME.CS


using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;


namespace WebApplication3
{
public partial class chart : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
Showdata();
}
private void Showdata()
{
String myconnection = ConfigurationManager.ConnectionStrings["myconnection"].ToString();
SqlConnection con = new SqlConnection(myconnection);
String query = "select male from Population";
SqlCommand cmd = new SqlCommand(query, con);
DataTable tb = new DataTable();
try
{
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
tb.Load(dr, LoadOption.OverwriteChanges);
con.Close();
}
catch {}
if (tb != null)
{
String chart = "";
chart = "<canvas id="line-chart" width="50%" height="400"></canvas>";
chart += "<script>";
chart += "new chart(document.getElmentById("line-chart"), { type: 'line', data: {";
chart += "labels: [50, 40, 55, 66, 44, 478,236]";
chart += ",datasets: [{ data: [";
// my cod
String value = "";
for (int i = 0; i < tb.Rows.Count; i++)
value += tb.Rows[i]["male"].ToString() + ",";
value = value.Substring(0, value.Length - 1);
chart += value;
chart += "],label: "Air Temperature", bordercolor: "#3e95cd",fill: false}";
chart += "]},options: { title: {display: true,text: 'Air Temperature (oC)'}}";
chart += "});";
chart += "</script>";


itchart.Text = chart;
}
}
}
}