private void ThongkeKH_Load(object sender, EventArgs e) { tkBLL.CapNhatLoai(); label1.Text = "/" + testkh.Descendants("khachhang").Count().ToString(); DataSet ds = new DataSet(); ds.ReadXml("..\\..\\Data\\thongkeloai.xml"); chartLoaiKH.Series["LoaiKH"].XValueMember = "ten"; chartLoaiKH.Series["LoaiKH"].YValueMembers = "soluong"; chartLoaiKH.DataSource = ds; chartLoaiKH.DataBind(); chartLoaiKH.Series[0].IsValueShownAsLabel = true; chartLoaiKH.Series[0].Label = "#PERCENT"; chartLoaiKH.Series[0].LegendText = "#AXISLABEL"; this.chartLoaiKH.Legends.Add("Legend1"); this.chartLoaiKH.Legends[0].Enabled = true; this.chartLoaiKH.Legends[0].Docking = Docking.Bottom; this.chartLoaiKH.Legends[0].Alignment = System.Drawing.StringAlignment.Center; this.chartLoaiKH.Series[0].LegendText = "#VALX (#PERCENT)"; }