public void PopulateChartData()
        {
            int       TheId = this.TheOfficeId;
            DataTable dt    = ChartManagement.GetReceiptPaymentReport(TheId);

            //foreach (DataRow drow in dt.Rows)
            //{
            //    Random rnd = new Random();
            //    int randomNumber1 = rnd.Next(1, 50); // creates a number between 1 and 12
            //    drow["Receipt"] = int.Parse(drow["Receipt"].ToString()) + randomNumber1;

            //    int randomNumber2 = rnd.Next(1, 20); // creates a number between 1 and 20
            //    drow["Payment"] = int.Parse(drow["Payment"].ToString()) + randomNumber2;
            //}
            try
            {
                chart_ReceiptPayment.Width  = this.Width;
                chart_ReceiptPayment.Height = this.Height;

                chart_ReceiptPayment.DataSource = dt;
                chart_ReceiptPayment.DataBind();

                // if all values labels are not displaying, set the interval for AxisX or AxisY
                chart_ReceiptPayment.ChartAreas[0].AxisX.Interval        = -1;
                chart_ReceiptPayment.ChartAreas[0].AxisX.TextOrientation = TextOrientation.Rotated90;

                // to change the Label font style set the font
                chart_ReceiptPayment.ChartAreas[0].AxisX.LabelStyle.Font      = new System.Drawing.Font("Verdana", 9f);
                chart_ReceiptPayment.ChartAreas[0].AxisX.LabelStyle.ForeColor = GetChartLabelColor();
                chart_ReceiptPayment.ChartAreas[0].AxisY.LabelStyle.ForeColor = GetChartLabelColor();

                // Changing the backgroud color of the charting area
                chart_ReceiptPayment.ChartAreas[0].BackColor = GetChartBackColor();

                // Changing the backgroud image
                //chart_ReceiptPayment.ChartAreas[0].BackImage = "~/Themes/Common/Images/ChartBackground_MLFL.png";
                //chart_ReceiptPayment.ChartAreas[0].BackGradientStyle = GradientStyle.TopBottom;
                //chart_ReceiptPayment.ChartAreas[0].BackImageAlignment = ChartImageAlignmentStyle.TopRight;

                chart_ReceiptPayment.Series[0].BackSecondaryColor = GetChartBackColor();
                chart_ReceiptPayment.Series[1].BackSecondaryColor = GetChartBackColor();
                //chart_ReceiptPayment.Series[0].BorderColor = GetChartLabelColor();

                //chart_ReceiptPayment.ChartAreas[0].AxisX.TitleForeColor = GetChartLabelColor();
            }
            catch (Exception ex)
            {
                Log.Error(ex);
            }
        }
        public HttpResponseMessage Get(string chart_name)
        {
            DataTable dtData = ChartManagement.GetStudentStrengthYearWise();

            return(new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = new StringContent(JArray.FromObject(dtData).ToString(), Encoding.UTF8, "application/json")
            });

            //return new string[] { "value1", "value2" };
            //List<WebMenu> theParentWebMenuList = WebMenuManagement.GetInstance.GetParentWebMenuAll();

            //return new HttpResponseMessage(HttpStatusCode.OK)
            //{
            //	Content = new StringContent(JArray.FromObject(theParentWebMenuList).ToString(), Encoding.UTF8, "application/json")
            //};
        }