Various Fix attempts
This commit is contained in:
parent
7f90fd1a80
commit
7c3ba29316
6 changed files with 25 additions and 5 deletions
|
@ -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'
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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>
|
||||
);
|
||||
|
|
Reference in a new issue