1
0
Fork 0

Various Fix attempts

This commit is contained in:
Neshura 2023-06-02 01:41:58 +02:00
parent 7f90fd1a80
commit 7c3ba29316
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
6 changed files with 25 additions and 5 deletions
components/charts

View file

@ -1,9 +1,8 @@
'use client';
import useSWR from "swr";
import { Chart as ChartJS, registerables } from 'chart.js';
import { Pie } from "react-chartjs-2";
import ChartDataLabels, { Context } from 'chartjs-plugin-datalabels';
import ChartDataLabels, {Context} from 'chartjs-plugin-datalabels';
import { Species } from '../../types/stellaris';
const fetcher = async (url:any) => await fetch(url).then((res) => res.json());
@ -71,7 +70,7 @@ export const PopChart = () => {
}
},
legend: {
display: true
display: false
},
datalabels: {
formatter: (value: any, context: Context) => {
@ -82,7 +81,6 @@ export const PopChart = () => {
return "";
}
},
color: 'black'
},
},

View file

@ -126,7 +126,7 @@ export const RadarChart = (props: { weighted: boolean }) => {
ChartJS.register( ...registerables )
return (
<div className="chart-container min-h-screen aspect-square p-2">
<div className="chart-container h-full aspect-square p-2">
<Radar {...config} />
</div>
);