mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Move Windows versions chart to ChartJS.
This commit is contained in:
@@ -69,7 +69,8 @@
|
||||
<div class="carousel-item">
|
||||
<canvas id="macosChart"></canvas>
|
||||
</div>
|
||||
<div class="carousel-item" id="windowsChart">
|
||||
<div class="carousel-item">
|
||||
<canvas id="windowsChart"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<a class="carousel-control-prev" data-slide="prev" href="#carouselOses" role="button">
|
||||
@@ -553,10 +554,16 @@ function DrawMacOsPie(macosData)
|
||||
DrawPie("macosChart", `Top ${macosData[0].length} macOS versions`, macosData[0], macosData[1])
|
||||
}
|
||||
|
||||
function DrawWindowsPie(windowsData)
|
||||
{
|
||||
DrawPie("windowsChart", `Top ${windowsData[0].length} Windows versions`, windowsData[0], windowsData[1])
|
||||
}
|
||||
|
||||
window.onload = () => {
|
||||
$.ajax({dataType: "json", url: "/Stats/GetOsData", success: DrawOsPie, cache:false});
|
||||
$.ajax({dataType: "json", url: "/Stats/GetLinuxData", success: DrawLinuxPie, cache:false});
|
||||
$.ajax({dataType: "json", url: "/Stats/GetMacOsData", success: DrawMacOsPie, cache:false});
|
||||
$.ajax({dataType: "json", url: "/Stats/GetWindowsData", success: DrawWindowsPie, cache:false});
|
||||
}
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user