public static DotNet.Highcharts.Highcharts GetBarChart(List<string> xValues, List<Object> yValues, string YAxisTitle, string chartTitle)
        {
            DotNet.Highcharts.Highcharts chart = new DotNet.Highcharts.Highcharts(chartTitle)
            .InitChart(new DotNet.Highcharts.Options.Chart { DefaultSeriesType = ChartTypes.Column })
            .SetPlotOptions(new PlotOptions
            {
                Column = new PlotOptionsColumn
                {
                    Stacking = Stackings.Normal,
                }
            });

            chart.SetXAxis(new XAxis
            {
                Categories = xValues.ToArray(),

            });
            chart.SetSeries(new DotNet.Highcharts.Options.Series
            {
                Data = new Data(yValues.ToArray()),
                Name = YAxisTitle
            });

            chart.SetTitle(new DotNet.Highcharts.Options.Title { Text = chartTitle });
            return chart;
        }
        public static DotNet.Highcharts.Highcharts GetLineChart(List<DotNet.Highcharts.Options.Series> seriesSet, List<string> xValues, string title,int dimensions=300)
        {
            DotNet.Highcharts.Highcharts chart = new DotNet.Highcharts.Highcharts(title);
            chart.InitChart(new Chart
            {
                Height = dimensions,
                Width = dimensions
            });

            chart.SetXAxis(new XAxis
            {
                Categories = xValues.ToArray()

            });
            chart.SetSeries(seriesSet.ToArray());
            chart.SetTitle(new DotNet.Highcharts.Options.Title { Text = title });
            return chart;
        }
        public static DotNet.Highcharts.Highcharts GetAreaChart(List<DotNet.Highcharts.Options.Series> seriesSet, List<string> xValues, string title)
        {
            DotNet.Highcharts.Highcharts chart = new DotNet.Highcharts.Highcharts(title);
            chart.InitChart(new Chart
            {
                Height = 300,
                Width = 300,
                DefaultSeriesType = ChartTypes.Area
            });

            chart.SetXAxis(new XAxis
            {
                Categories = xValues.ToArray()

            });
            chart.SetSeries(seriesSet.ToArray());
            chart.SetTitle(new DotNet.Highcharts.Options.Title { Text = title });
            return chart;
        }
        public static DotNet.Highcharts.Highcharts GetAreaChart(List <DotNet.Highcharts.Options.Series> seriesSet, List <string> xValues, string title)
        {
            DotNet.Highcharts.Highcharts chart = new DotNet.Highcharts.Highcharts(title);
            chart.InitChart(new Chart
            {
                Height            = 300,
                Width             = 300,
                DefaultSeriesType = ChartTypes.Area
            });

            chart.SetXAxis(new XAxis
            {
                Categories = xValues.ToArray()
            });
            chart.SetSeries(seriesSet.ToArray());
            chart.SetTitle(new DotNet.Highcharts.Options.Title {
                Text = title
            });
            return(chart);
        }
        /// <summary>
        /// Returns a bar chart for a given set of values.
        /// </summary>
        /// <param name="seriesSet"></param>
        /// <param name="xValues"></param>
        /// <param name="title"></param>
        /// <returns></returns>
        public static DotNet.Highcharts.Highcharts GetBarChart(List<DotNet.Highcharts.Options.Series> seriesSet, List<string> xValues, string title)
        {
            DotNet.Highcharts.Highcharts chart = new DotNet.Highcharts.Highcharts(title);
            chart.InitChart(new Chart
            {
                Height = 320,
                Width = 320,
                DefaultSeriesType = ChartTypes.Column
            });

            chart.SetXAxis(new XAxis
            {
                Categories = xValues.ToArray()

            });

            chart.SetLegend(new Legend { Enabled = false });
            chart.SetSeries(seriesSet.ToArray());

            chart.SetTitle(new DotNet.Highcharts.Options.Title { Text = title.Replace("_", " ")});
            
            return chart;
        }