private string generateSchoolChart(string[] sources, int[] sourceCounts)
 {
     string uuid = Guid.NewGuid().ToString();
     var filePath = getChartPath(uuid);
     //Theme to hide slice labels
     string chartTheme = @"<Chart>
                             <Series>
                                 <Series Name=""Programs"" ChartType=""Pie"" LegendText=""#VALX (#PERCENT{P2})"" CustomProperties=""PieLabelStyle=Disabled"">
                                 </Series>
                             </Series>
                             <Legends>
                                 <Legend _Template_=""All"" Docking=""Bottom"">
                                 </Legend>
                             </Legends>
                         </Chart>";
     var myChart = new System.Web.Helpers.Chart(width: 250, height: 400, theme: chartTheme);
     myChart.AddTitle("Candidates Selected");
     myChart.AddSeries(
         "Programs", chartType: SeriesChartType.Pie.ToString(),
         xValue: sources,
         yValues: sourceCounts
         );
     myChart.AddLegend("Programs");
     myChart.Save(filePath, "jpg");
     return uuid;
 }
 private string generateFYChart(int[,] sourceCounts, string[] sources, bool byFY)
 {
     string uuid = Guid.NewGuid().ToString(); // Generate unique ID for file name
     var filePath = getChartPath(uuid);
     string chartTheme = @"<Chart>
                             <ChartAreas>
                                 <ChartArea Name=""Default"" _Template_=""All"">
                                     <AxisX>
                                         <LabelStyle Interval=""1""/>
                                     </AxisX>
                                 </ChartArea>
                             </ChartAreas>
                             <Legends>
                                 <Legend _Template_=""All"" Docking=""Top"" LegendStyle=""Column"" DockedToChartArea=""Default"" IsDockedInsideChartArea=""true"" BackColor=""Transparent"" Font=""Times New Roman, 6pt"">
                                 </Legend>
                             </Legends>";
     chartTheme += "<Series>";
     for (var i = 0; i < sources.Length; i++)
     {
         chartTheme += "" +
                         "<Series Name='" + sources[i] + "' ChartType='StackedColumn' Label='#VALY{#}' CustomProperties='SmartLabelStyle=Enabled'>" +
                         "</Series>";
     }
     chartTheme += "</Series></Chart>";
     var myChart = new System.Web.Helpers.Chart(width: 900, height: 130, theme: chartTheme);
     string[] months;
     if (byFY)
     {
         months = new[] { "Prior", "Oct", "Nov", "Dec", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept" };
     }
     else
     {
         months = new[] { "Prior", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec" };
     }
     for (var i = 0; i < sources.Length; i++)
     {
         int[] temp = new int[13];
         for (var j = 0; j < 13; j++)
         {
             temp[j] = sourceCounts[i, j];
         }
         myChart.AddSeries(sources[i],
                 chartType: SeriesChartType.StackedColumn.ToString(),
                 xValue: months,
                 yValues: temp);
     }
     myChart.AddLegend();
     myChart.Save(filePath, "jpg");
     return uuid;
 }