Skip to content

Commit

Permalink
Merge pull request #165 from waifuvault/fix-charts
Browse files Browse the repository at this point in the history
Hide labels on Media Types chart
  • Loading branch information
VictoriqueMoe committed Jun 28, 2024
2 parents 7423679 + 5280248 commit 3353e8f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/public/secure/stats.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,14 @@
rootMedia.interfaceColors.set("grid", am5.color(0xffffff));
rootMedia.interfaceColors.set("text", am5.color(0xffffff));
const chartMedia = rootMedia.container.children.push(am5percent.PieChart.new(rootMedia, {
layout: rootMedia.horizontalLayout,
layout: rootMedia.verticalHorizontal,
radius: am5.percent(70)
}));
const legendMedia = chartMedia.children.push(am5.Legend.new(rootMedia, {}));
const legendMedia = chartMedia.children.push(am5.Legend.new(rootMedia, {
}));
legendMedia.data.setAll(chartMedia.series.values);
const modalMedia = am5.Modal.new(rootMedia, {
content: "The chart has no data"
});
Expand All @@ -239,6 +242,10 @@
const mediaItems = summarizeProperty(stats.entries, "mediaType", false, false);
mediaItems.sort((a, b) => b.value - a.value);
seriesMedia.data.setAll(mediaItems.slice(0, 10));
seriesMedia.labels.template.setAll({
text: "",
textType: "circular"
});
//Upload velocity
const rootUpload = am5.Root.new("chartUploadVelocity");
Expand Down

0 comments on commit 3353e8f

Please sign in to comment.