Fix chart

This commit is contained in:
Jeffrey Serio 2024-11-21 01:45:43 -06:00
parent e98aeaf0e8
commit 4ec691d4e8

View File

@ -959,11 +959,11 @@ func getTemplateContent(name string) string {
new Chart(ctx, { new Chart(ctx, {
type: 'line', type: 'line',
data: { data: {
labels: data.map(d => d.date), labels: data.map((d) => d.date),
datasets: [ datasets: [
{ {
label: '<4 seeders', label: '<4 seeders',
data: data.map(d => d.lowSeedersTB), data: data.map((d) => d.lowSeedersTB),
backgroundColor: 'rgba(255, 99, 132, 0.7)', backgroundColor: 'rgba(255, 99, 132, 0.7)',
borderColor: 'rgba(255, 99, 132, 1)', borderColor: 'rgba(255, 99, 132, 1)',
fill: true, fill: true,
@ -971,7 +971,7 @@ func getTemplateContent(name string) string {
}, },
{ {
label: '4-10 seeders', label: '4-10 seeders',
data: data.map(d => d.mediumSeedersTB), data: data.map((d) => d.mediumSeedersTB),
backgroundColor: 'rgba(255, 206, 86, 0.7)', backgroundColor: 'rgba(255, 206, 86, 0.7)',
borderColor: 'rgba(255, 206, 86, 1)', borderColor: 'rgba(255, 206, 86, 1)',
fill: true, fill: true,
@ -979,7 +979,7 @@ func getTemplateContent(name string) string {
}, },
{ {
label: '>10 seeders', label: '>10 seeders',
data: data.map(d => d.highSeedersTB), data: data.map((d) => d.highSeedersTB),
backgroundColor: 'rgba(75, 192, 192, 0.7)', backgroundColor: 'rgba(75, 192, 192, 0.7)',
borderColor: 'rgba(75, 192, 192, 1)', borderColor: 'rgba(75, 192, 192, 1)',
fill: true, fill: true,
@ -1035,6 +1035,7 @@ func getTemplateContent(name string) string {
createChart(); createChart();
</script> </script>
<h2>Generate a Torrent List</h2> <h2>Generate a Torrent List</h2>
<p>Want to help out with the seeding? You can generate a torrent list of torrents to seed based on size and type preferences. The generated list will be in the format of your choice (XML, TXT, or JSON), and will try to include torrents that currently need the most seeders (i.e. the ones with the fewest seeders).</p> <p>Want to help out with the seeding? You can generate a torrent list of torrents to seed based on size and type preferences. The generated list will be in the format of your choice (XML, TXT, or JSON), and will try to include torrents that currently need the most seeders (i.e. the ones with the fewest seeders).</p>
<form action="/generate-torrent-list" method="POST" target="_blank"> <form action="/generate-torrent-list" method="POST" target="_blank">