Skip to content

Commit

Permalink
update download chart to include net9
Browse files Browse the repository at this point in the history
  • Loading branch information
LiorBanai committed Nov 23, 2024
1 parent be96caa commit 88d050d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Analogy/UserControls/DownloadStatisticsUC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ private void DownloadStatisticsUC_Load(object sender, EventArgs e)
var net6Downloads = net6.Sum(r => r.Sum(a => a.DownloadCount));
var net7Downloads = net7.Sum(r => r.Sum(a => a.DownloadCount));
var net8Downloads = net8.Sum(r => r.Sum(a => a.DownloadCount));
var ne9Downloads = net9.Sum(r => r.Sum(a => a.DownloadCount));
var net9Downloads = net9.Sum(r => r.Sum(a => a.DownloadCount));

TotalDownloadFramework = net471Downloads + net472Downloads + net48Downloads;
TotalDownloadNet = net31Downloads + net5Downloads + net6Downloads + net7Downloads + net8Downloads + ne9Downloads;
TotalDownloadNet = net31Downloads + net5Downloads + net6Downloads + net7Downloads + net8Downloads + net9Downloads;
var total = TotalDownloadFramework + TotalDownloadNet;
lblTotal.Text = $"Total Downloads: {total}. Net Frameworks: {TotalDownloadFramework}. NET: {TotalDownloadNet}";
var net471percentage = (double)net471Downloads / (total) * 100.0;
Expand All @@ -60,6 +60,7 @@ private void DownloadStatisticsUC_Load(object sender, EventArgs e)
var net6percentage = (double)net6Downloads / (total) * 100.0;
var net7percentage = (double)net7Downloads / (total) * 100.0;
var net8percentage = (double)net8Downloads / (total) * 100.0;
var net9percentage = (double)net9Downloads / (total) * 100.0;
List<PieChartSingleDataPoint> data = new()
{
new PieChartSingleDataPoint("NET Framework 471", net471Downloads),
Expand All @@ -70,6 +71,7 @@ private void DownloadStatisticsUC_Load(object sender, EventArgs e)
new PieChartSingleDataPoint("NET 6", net6Downloads),
new PieChartSingleDataPoint("NET 7", net7Downloads),
new PieChartSingleDataPoint("NET 8", net8Downloads),
new PieChartSingleDataPoint("NET 9", net9Downloads),
};
CreateChart(data);
}
Expand Down Expand Up @@ -161,6 +163,7 @@ private void cbeReleases_SelectedIndexChanged(object sender, EventArgs e)
new PieChartSingleDataPoint("NET 6", net6Downloads),
new PieChartSingleDataPoint("NET 7", net7Downloads),
new PieChartSingleDataPoint("NET 8", net8Downloads),
new PieChartSingleDataPoint("NET 9", net9Downloads),
};
CreateChart(data);
}
Expand Down

0 comments on commit 88d050d

Please sign in to comment.