// SchoolRoll Forecast Chart
        private new SplineCharts GetChartSchoolRollForecast(List <BaseSPDataModel> listSchool) // query from database and return charts object
        {
            var eSplineCharts = new SplineCharts();

            eSplineCharts.SetDefault(false);
            eSplineCharts.title.text       = " School Roll ";
            eSplineCharts.yAxis.title.text = "Number of Pupils";
            eSplineCharts.series           = new List <ACCDataStore.Entity.RenderObject.Charts.SplineCharts.series>();
            //finding subject index to query data from list

            if (listSchool != null && listSchool.Count > 0)
            {
                eSplineCharts.xAxis.categories = listSchool[0].SchoolRollForecast.ListActualSchoolRoll.Select(x => x.Code).ToList(); // year on xAxis
                eSplineCharts.yAxis.title      = new Entity.RenderObject.Charts.Generic.title()
                {
                    text = "Number of Pupils"
                };

                foreach (var eSchool in listSchool)
                {
                    if (!eSchool.SeedCode.Equals("1002"))
                    {
                        var listSeriesActual = eSchool.SchoolRollForecast.ListActualSchoolRoll.Select(x => float.Parse(x.sPercent) == 0 ? null : (float?)float.Parse(x.sPercent)).ToList();

                        eSplineCharts.series.Add(new ACCDataStore.Entity.RenderObject.Charts.SplineCharts.series()
                        {
                            name      = eSchool.SchoolName,
                            color     = "#24CBE5",
                            lineWidth = 2,
                            data      = listSeriesActual,
                            visible   = true
                        });
                    }
                }
            }

            eSplineCharts.plotOptions.spline.marker = new ACCDataStore.Entity.RenderObject.Charts.Generic.marker()
            {
                enabled = true
            };

            eSplineCharts.exporting = new ACCDataStore.Entity.RenderObject.Charts.Generic.exporting()
            {
                enabled  = true,
                filename = "export"
            };
            //eSplineCharts.options.chart.options3d = new Entity.RenderObject.Charts.Generic.options3d() { enabled = true, alpha = 10, beta = 10 }; // enable 3d charts

            return(eSplineCharts);
        }
        // FSM Chart
        private SplineCharts GetChartFSM(List <BaseSPDataModel> listSchool) // query from database and return charts object
        {
            var eSplineCharts = new SplineCharts();

            eSplineCharts.SetDefault(false);
            eSplineCharts.title.text = "Free School Meal";
            eSplineCharts.series     = new List <ACCDataStore.Entity.RenderObject.Charts.SplineCharts.series>();

            string[] colors      = { "#ED561B", "#DDDF00", "#24CBE5", "#64E572", "#FF9655", "#FFF263", "#6AF9C4" };
            int      indexcolour = 0;

            if (listSchool != null && listSchool.Count > 0)
            {
                eSplineCharts.xAxis.categories = listSchool[0].listFSM.Select(x => x.year.academicyear).ToList(); // year on xAxis
                eSplineCharts.yAxis.title      = new Entity.RenderObject.Charts.Generic.title()
                {
                    text = "% of SP Roll Registered for FSM"
                };

                foreach (var eSchool in listSchool)
                {
                    var listSeriesStart = eSchool.listFSM.Select(x => x.GenericSchoolData.sPercent.Equals("n/a") ? null : (float?)float.Parse(x.GenericSchoolData.sPercent)).ToList();

                    eSplineCharts.series.Add(new ACCDataStore.Entity.RenderObject.Charts.SplineCharts.series()
                    {
                        name      = eSchool.SchoolName,
                        color     = colors[indexcolour],
                        lineWidth = 2,
                        data      = listSeriesStart,
                        visible   = true
                    });

                    indexcolour++;
                }
            }
            eSplineCharts.plotOptions.spline.marker = new ACCDataStore.Entity.RenderObject.Charts.Generic.marker()
            {
                enabled = true
            };

            eSplineCharts.exporting = new ACCDataStore.Entity.RenderObject.Charts.Generic.exporting()
            {
                enabled  = true,
                filename = "export"
            };

            //eSplineCharts.options.chart.options3d = new Entity.RenderObject.Charts.Generic.options3d() { enabled = true, alpha = 10, beta = 10 }; // enable 3d charts

            return(eSplineCharts);
        }
        // Overall Destinations Chart
        protected SplineCharts GetChartTimelieDestinations(List <DataHubData> listSchoolData) // query from database and return charts object
        {
            string[] colors     = new string[] { "#50B432", "#24CBE5", "#f969e8", "#DDDF00", "#64E572", "#FF9655", "#FFF263", "#6AF9C4" };
            int      indexColor = 0;

            var eSplineCharts = new SplineCharts();

            eSplineCharts.SetDefault(false);
            eSplineCharts.title.text       = "Participation Timeline";
            eSplineCharts.yAxis.title.text = "% of pupils";

            eSplineCharts.series = new List <ACCDataStore.Entity.RenderObject.Charts.SplineCharts.series>();


            if (listSchoolData != null && listSchoolData.Count > 0)
            {
                eSplineCharts.xAxis.categories = listSchoolData[1].listsumarydestination.Select(x => x.sdataset.name).ToList(); // year on xAxis
                eSplineCharts.yAxis.title      = new Entity.RenderObject.Charts.Generic.title()
                {
                    text = "% of pupils"
                };

                foreach (var eSchool in listSchoolData)
                {
                    var listSeriesStart = eSchool.listsumarydestination.Select(x => (float?)x.listdata[0].Percent).ToList();

                    eSplineCharts.series.Add(new ACCDataStore.Entity.RenderObject.Charts.SplineCharts.series()
                    {
                        name      = eSchool.SchoolName + " Participating",
                        color     = colors[indexColor],
                        lineWidth = 2,
                        data      = listSeriesStart,
                        visible   = true
                    });

                    indexColor++;

                    listSeriesStart = eSchool.listsumarydestination.Select(x => (float?)x.listdata[1].Percent).ToList();

                    eSplineCharts.series.Add(new ACCDataStore.Entity.RenderObject.Charts.SplineCharts.series()
                    {
                        name      = eSchool.SchoolName + " Not participating",
                        color     = colors[indexColor],
                        lineWidth = 2,
                        data      = listSeriesStart,
                        visible   = true
                    });

                    indexColor++;

                    listSeriesStart = eSchool.listsumarydestination.Select(x => (float?)x.listdata[2].Percent).ToList();

                    eSplineCharts.series.Add(new ACCDataStore.Entity.RenderObject.Charts.SplineCharts.series()
                    {
                        name      = eSchool.SchoolName + " Unknown",
                        color     = colors[indexColor],
                        lineWidth = 2,
                        data      = listSeriesStart,
                        visible   = true
                    });

                    indexColor++;
                }
            }

            eSplineCharts.exporting = new ACCDataStore.Entity.RenderObject.Charts.Generic.exporting()
            {
                enabled  = true,
                filename = "export"
            };

            eSplineCharts.chart.options3d = new Entity.RenderObject.Charts.Generic.options3d()
            {
                enabled = true, alpha = 10, beta = 10
            };                                                                                                                            // enable 3d charts

            return(eSplineCharts);
        }