public ViewGoogleChartViewData(GoogleChartJson googleChartJson,
                                string chartTitle,
                                int chartHeight,
                                bool showChartTitle) : this(googleChartJson == null ? new List <GoogleChartJson>() : new List <GoogleChartJson> {
     googleChartJson
 },
                                                            chartTitle,
                                                            chartHeight,
                                                            null,
                                                            chartTitle.Replace(" ", ""),
                                                            false,
                                                            SitkaRoute <GoogleChartController> .BuildUrlFromExpression(c => c.DownloadChartData()),
                                                            showChartTitle,
                                                            true)
 {
 }
        public static List <GoogleChartDataSimple> DeriveSimplesFromGoogleChartJson(GoogleChartJson googleChartJson)
        {
            var googleChartColumns = googleChartJson.GoogleChartDataTable.GoogleChartColumns;

            return(googleChartJson.GoogleChartDataTable.GoogleChartRowCs.Select(googleChartRowC =>
            {
                return new GoogleChartDataSimple
                {
                    ColumnValues = googleChartColumns.Where(x => x.ColumnLabel != null)
                                   .ToDictionary(x => x.ColumnLabel,
                                                 x =>
                    {
                        var index = googleChartColumns.IndexOf(x);
                        return index < googleChartRowC.GoogleChartRowVs.Count ? googleChartRowC.GoogleChartRowVs[index] : null;
                    })
                };
            })
                   .ToList());
        }